[mapguide-users] Google Layers Not Showing - Fix to Open Layers
Lisa Weber
lisaw at precisionmanagementsolutions.com.au
Mon May 30 16:23:17 PDT 2016
Gordon,
Great post! Thanks for the fix, I have tested and it's now working in MGOS 3.0. The fix will only allow the google map base to work for a given layout, not multiple base layer external providers that a user can switch between , not bing or openstreet maps and google bae maps at the same time. Trying that results in errors. I tried a number of template changes to get it to work and was resigned to waiting for the next release, I'm interested in knowing how you thought of this approach and did it happen at 3am in the morning? :)
Thanks again, much appreciated.
Kind Regards,
Lisa
-----Original Message-----
From: mapguide-users [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of GordonL
Sent: Friday, 27 May 2016 12:06 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Google Layers Not Showing - Fix to Open Layers
Hi All,
If you are using MapGuide 2.6 or newer (even AIMS) you will have noticed that Google is behaving badly lately.
Since Open Layers 2.13.1 is the last OpenLayers version and there are no longer fixes (yes MapGuide/AIMS must move away from OL 2).
Here is how to fix (see https://github.com/openlayers/ol2/issues/1450)
What I did to quickly fix:
1. Change the Template index.html page to point to FusionSF.js rather than FusionSF-compressed.js (i.e. C:\Program
Files\OSGeo\MapGuide\Web\www\fusion\templates\mapguide\slate\index.html)
2. Open FusionSF.js - (C:\Program
Files\OSGeo\MapGuide\Web\www\fusion\lib\fusionSF.js)
3. Find the following line: * if (container.parentNode !== map.div) {* around line 87241 4. Replace this code:
with this code:
This works in MapGuide 2.6 and MapGuide 3 - and AIMS 2015 and 2016
regards
gordon
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Google-Layers-Not-Showing-Fix-to-Open-Layers-tp5268375.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list