Tag Info

Hot answers tagged


Your units are in decimal degrees and they should be in a projected coordinate system. If you still have the gps unit, you can change it to something like an appropriate UTM projection then download the coordinates and use those in your calculation.


The map object will take on the projection of the first layer you add to it, in the case of your code, the streets basemap is 102100 (web mercator). You have two options to solve this: Use your own basemap service that is in your 102726 projection so that the points from the web service show up in the correct place. Stick with arcgis online basemaps, ...


For the map div sive you can use the getSize() function that returns a openLayers.Size instance that have width and height properties see: http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getSize map = new.OpenLayers.Map('map'); size = map.getSize() width = size.w height = size.h


Working here on Ubuntu 14.04.1 and Firefox 31:

Only top voted, non community-wiki answers of a minimum length are eligible