Changes between Version 3 and Version 4 of MapGuideCommercialOverlays
- Timestamp:
- 05/01/09 07:43:29 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideCommercialOverlays
v3 v4 1 1 = Using MapGuide Overlays with Commercial Map Service Layers = 2 3 2 Commercial tiled map layers can be used as base layers within MapGuide flexible layouts, provided you make some modifications to your application and map projection. 4 3 … … 18 17 http://code.google.com/apis/maps/signup.html 19 18 20 After submitting the request, you should get a sample script tag that looks like19 After submitting the request, you should get a sample script tag like this: 21 20 {{{ 22 21 <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<your key here>" type="text/javascript"></script> … … 24 23 25 24 Note that the sensor argument has been set to false. 25 26 Microsoft's Virtual Earth service can be used by including this script tag: 27 {{{ 28 <script src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script> 29 }}} 30 31 Finally, Yahoo's service requires you to obtain a key from: 32 33 http://developer.yahoo.com/maps 34 35 You should get a script tag that looks like 36 {{{ 37 <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=<your key here>"></script> 38 }}} 26 39 27 40 If you haven't already done so, use the !MapGuide [http://localhost:8008/mapguide/mapadmin/login.php MapAdmin] page to load the Sheboygan sample data which will be used as an example overlay. … … 43 56 = Step 2: Update the projection information in the !MapDefinition = 44 57 45 Since the Google Map system uses a modified Mercator projection, any overlaid !MapGuide data needs to be transformed into the same map projection. !MapGuide can reproject vector data on the fly, meaning the original sample set can be used provided that we modify the !MapDefinition to use the Mercator output projection.58 Since the Google, Microsoft and Yahoo mapping systems all use the same modified Mercator projection, any overlaid !MapGuide data needs to be transformed into that coordinate system. !MapGuide can reproject vector data on the fly, meaning the original sample set can be used provided that we modify the !MapDefinition to use the Mercator output projection. 46 59 47 60 * Using !MapGuide Maestro, connect to the !MapGuide server and make a duplicate of the /Samples/Sheboygan/Maps/Sheboygan !MapDefinition resource using the Edit menu copy and paste commands. Rename the copy to Sheboygan-m. … … 76 89 }}} 77 90 78 * If you don't like the default Google map type, you can add an <Options> tag to the Google layer andchange it:91 * If you don't like the default Google map type, you can add an <Options> tag to the Google layer to change it: 79 92 80 93 {{{ … … 114 127 }}} 115 128 116 Note that the Google layer must be the base layer so any overlays must have the isBaseLayer: false option set. 129 '' Note that the Google layer must be the base layer so any overlays must have the isBaseLayer: false option set. '' 117 130 118 131 * Load the template in a browser: http://localhost:8008/mapguide/fusion/templates/mapguide/standard/ 132 133 To use the Microsoft Virtual Earth or Yahoo mapping services as base maps, remove the google <Map> block from your !ApplicationDefinition and replace it with 134 135 {{{ 136 <Map xsi:type="WMSLayerType"> 137 <Type>VirtualEarth</Type> 138 <Extension> 139 <ResourceId>ve</ResourceId> 140 </Extension> 141 </Map> 142 }}} 143 for Virtual Earth or 144 {{{ 145 <Map xsi:type="WMSLayerType"> 146 <Type>Yahoo</Type> 147 <Extension> 148 <ResourceId>yahoo</ResourceId> 149 </Extension> 150 </Map> 151 }}} 152 for Yahoo. 153 154 ''Support for these layer types is a new addition to Fusion 2.0 so you may encounter compatibility issues. Please help the project by reporting them to the fusion-dev mailing list or filing a bug in the fusion trac instance.''