[8987] | 1 | function init(){
|
---|
[8988] | 2 | map = new OpenLayers.Map('heatmap', {
|
---|
| 3 | controls: [
|
---|
| 4 | new OpenLayers.Control.Navigation(),
|
---|
| 5 | new OpenLayers.Control.PanZoomBar(),
|
---|
| 6 | new OpenLayers.Control.ScaleLine(),
|
---|
| 7 | new OpenLayers.Control.LayerSwitcher()
|
---|
| 8 | ],
|
---|
| 9 | maxExtent: new OpenLayers.Bounds(-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892),
|
---|
| 10 | numZoomLevels:18,
|
---|
| 11 | maxResolution:156543.0339,
|
---|
| 12 | units:'m',
|
---|
| 13 | projection: "EPSG:900913",
|
---|
| 14 | displayProjection: new OpenLayers.Projection("EPSG:4326")
|
---|
| 15 | });
|
---|
| 16 |
|
---|
[8987] | 17 | layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
|
---|
| 18 | map.addLayer(layerMapnik);
|
---|
[9082] | 19 | layerHeatmap = new OpenLayers.Layer.OSM.Overlay1("Huub_1", {isBaseLayer: false, visibility: true});
|
---|
[8988] | 20 | map.addLayer(layerHeatmap);
|
---|
[9082] | 21 | layerHeatmap = new OpenLayers.Layer.OSM.Overlay2("Huub_2", {isBaseLayer: false, visibility: true});
|
---|
[8990] | 22 | map.addLayer(layerHeatmap);
|
---|
[9082] | 23 | layerHeatmap = new OpenLayers.Layer.OSM.Overlay3("Huub_3", {isBaseLayer: false, visibility: true});
|
---|
| 24 | map.addLayer(layerHeatmap);
|
---|
[8988] | 25 |
|
---|
[8987] | 26 | var lon = 4.4585017;
|
---|
| 27 | var lat = 52.1406583;
|
---|
| 28 | var zoom = 13;
|
---|
| 29 |
|
---|
| 30 | var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
|
---|
| 31 | map.setCenter (lonLat, zoom);
|
---|
[9082] | 32 | }
|
---|