/** * Var 'map' is set global, used in 'heatmap_extensions.js'. */ var map; function init_heatmap(){ var lat = getURLParameter('lat'); var lon = getURLParameter('lon'); var zoom = getURLParameter('zoom'); if(lat=='null' || lon=='null' || zoom=='null'){ var lat = 52.15514; var lon = 4.48959; var zoom = 13; } var projection_wgs = new OpenLayers.Projection("EPSG:4326"); // WGS 1984 map = new OpenLayers.Map('heatmap', { theme: null, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.Permalink({ anchor : true, createParams: function(center, zoom, layers) { center = center || this.map.getCenter(); var params = OpenLayers.Util.getParameters(this.base); // If there's still no center, map is not initialized yet. // Break out of this function, and simply return the params from the // base link. if (center) { //zoom params.zoom = zoom || this.map.getZoom(); //lon,lat var lat = center.lat; var lon = center.lon; if (this.displayProjection) { var mapPosition = OpenLayers.Projection.transform( { x: lon, y: lat }, this.map.getProjectionObject(), this.displayProjection ); lon = mapPosition.x; lat = mapPosition.y; } params.lat = Math.round(lat*100000)/100000; params.lon = Math.round(lon*100000)/100000; //layers layers = layers || this.map.layers; params.layers = ''; for (var i=0, len=layers.length; i" + "
" + "" + layer.name + "
" ); } var signallayer = new OpenLayers.Layer.OSM.Overlay4("signallayer", {isBaseLayer: false, visibility: false}); var wlsignalLayer = new OpenLayers.Layer.OSM.Overlay3("Wireless Leiden Coverage", {isBaseLayer: false, visibility: true}); var nodesLayer = new OpenLayers.Layer.GML.NodesOverlay("Node Locations", {isBaseLayer: false, visibility: false}); add_item('default', signallayer); add_item('default', wlsignalLayer); add_item('features', nodesLayer); }