Demo

LocationBox JavaScript Demos

Add Heat Map (UserPoint)

Add UserPoint Heat :     Remove Layer:  

Instructions

Use the "Add" buttons to add heatmap by your user points 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=API&Typ=JS"></script>

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


function startup() {
  mapper.initMap(41.0, 29.0, 8);
  mapper.addNavigationPanel();
  return;
} 

function add() {
  layer.createHeatmapLayer(ILayer.HEATMAP_IL, "pnt", ILayer.USER_POINT, null, true);
  return;
}     

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

Buttons:

  <a href="javascript:add()"><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.