Demo

LocationBox JavaScript Demos

Add Heat Map (POI)

Add Brand Heat 1:     Add Brand Heat 2:     Add Brand Heat 3:  

Add Category Heat :     Remove Layers:  

Instructions

Use the "Add" buttons to add heatmap by brand and category on the map. Use "Remove" button to remove the layers. Edit the source code to .
See the JavaScript API for more information.

Source Code

The Javascript code for the above map is:

<script language="Javascript" 
	src="http://www.locationbox.com.tr/locationbox/services?
	Key=key&Cmd=APIV2&Typ=JS"></script>

<script language="JavaScript">
var mapper  = new IMapper();
var layer = new ILayer();


function startup() {
  mapper.initMap(41.1, 29.1, 6, IMapper.BASEMAP_POI);
  mapper.addNavigationPanel();
  return;
} 

function add() {
  layer.createBrandHeatmapLayer(ILayer.HEATMAP_IL, "opet", "OPET", true);
  return;
} 
 
function add12() {
  layer.createBrandHeatmapLayer(ILayer.HEATMAP_IL, "ziraat", "T.CZIRAATBANKASI", true);
  return;
} 

function add13() {
  layer.createBrandHeatmapLayer(ILayer.HEATMAP_IL, "teknosa", "TEKNOSA", true);
  return;
} 

  function add2() {
  layer.createCategoryHeatmapLayer(ILayer.HEATMAP_IL, "banka", "BANKA", true);
  return;
} 

function remove() {
  layer.removeLayer();
  return;
}  
        

Buttons:

  <a href="javascript:add()"><img src="images/add.gif" border=0></a>
  <a href="javascript:add12()"><img src="images/add.gif" border=0></a>
  <a href="javascript:add13()"><img src="images/add.gif" border=0></a>
  <a href="javascript:add2()"><img src="images/add.gif" border=0></a>
  <a href="javascript:remove()"><img src="images/remove.gif" border=0></a>
        
Notes

You may get "Request string is too long for Oracle Maps' non-AJAX remoting" error while creating a layer. See this post on LocationBox blog.

Download working page
Remember that you need to use your key code as Key attribute.