The built in background maps that are available in 2011 are great (they let you very simply use Google, Yahoo, or Bing vector and/or raster layers as backdrops). However, you may have noticed that zooming all the way to your MapGuide site doesn't get you quite as close as in the Bing. There's a pretty simple workaround. This example is for Bing:
- Open your OpenLayers.js in C:\Program Files\Autodesk\MapGuideEnterprise2011\WebServerExtensions\www\fusion\lib\OpenLayers\OpenLayers.js
- Find OpenLayers.Layer.VirtualEarth (line 27384 for me). Go down to MAX_ZOOM_LEVEL and change 17 to 19.
- Go down a few more lines and add two more lines to the resolutions so that the full set is:
- Save the file, then open index.html for the the template you are using. It'll be somewhere like: C:\Program Files\Autodesk\MapGuideEnterprise2011\WebServerExtensions\www\fusion\templates\mapguide\slate\index.html
- If you have a line like either of these: <script type="text/javascript" src="../../../lib/fusionSF-compressed.js"></script> or <script type="text/javascript" src="../../../lib/fusionSF.js"></script> change it to <script type="text/javascript" src="../../../lib/fusion.js"></script>
- Save it, restart your MGE service, reload the map. You should be able to zoom in just as far as in Bing.
For Google, do the same, but add a few more lines so that you have a total of 22. The last five are:
- 0.00001072883605957031,
- 0.00000536441802978515,
- 0.00000268220901489257,
- 0.0000013411045074462891,
- 0.00000067055225372314453

Comments