[mapguide-users] Mapguide fusion 2.6 | geolocation issue

Hans Milling hm at geograf.dk
Thu Jan 30 04:41:41 PST 2014

You can use the Proj4js library to convert the GPS coordinates from WGS84 to
something else. Then you can see what coordinates your GPS device is
reporting relative to the projection that your map is using. This is what I
do to convert to UTM32N:

Proj4js.defs["EPSG:25832"] = "+proj=utm +zone=32 +ellps=GRS80 +units=m
+no_defs"; // Not sure if needed or this is just related to my OpenLayers

var gpsll = new Proj4js.Point(gpslongitude, gpslatitude);
var source = new Proj4js.Proj('EPSG:4326');
var dest = new Proj4js.Proj('EPSG:25832');
var utm32n = Proj4js.transform(source, dest, gpsll);
console.log("x: "+umt32n.x+", y: "+utm32n.y); //<-Does not work in old
versions of IE

Best regards
  Hans Milling

View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-fusion-2-6-geolocation-issue-tp5100877p5100913.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list