diff options
author | Mark Campbell-Smith <mcampbellsmith@gmail.com> | 2014-04-02 11:50:11 +1100 |
---|---|---|
committer | Mark Campbell-Smith <mcampbellsmith@gmail.com> | 2014-04-02 11:50:11 +1100 |
commit | 95a61601f3c8d15bdaa8bbd7cbb7eee50595da2e (patch) | |
tree | dbe0762dda54aa119421ca0127eaf939de744c29 /api_openlayers.js | |
parent | 7e5b03076d4acb4384a67fad9ef021573aa13239 (diff) | |
download | RunnerUpLive-95a61601f3c8d15bdaa8bbd7cbb7eee50595da2e.zip |
add geolocation for initial map
Diffstat (limited to 'api_openlayers.js')
-rwxr-xr-x | api_openlayers.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api_openlayers.js b/api_openlayers.js index 87f0abf..7795a5b 100755 --- a/api_openlayers.js +++ b/api_openlayers.js @@ -74,8 +74,8 @@ function init() { 'http://3.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png']); map.addLayer(ump); } - var position = new OpenLayers.LonLat(21.01,52.23).transform(wgs84, mercator); - var zoom = 8; + var position = new OpenLayers.LonLat(geoip_longitude(),geoip_latitude()).transform(wgs84, mercator); + var zoom = 6; map.setCenter(position, zoom); // init layers layerTrack = new OpenLayers.Layer.Vector('Track'); |