Changes between Version 3 and Version 4 of MapGuideCommercialOverlays


Ignore:
Timestamp:
May 1, 2009, 7:43:29 AM (15 years ago)
Author:
zjames
Comment:

added VE and Yahoo information

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideCommercialOverlays

    v3 v4  
    11= Using MapGuide Overlays with Commercial Map Service Layers =
    2 
    32Commercial tiled map layers can be used as base layers within MapGuide flexible layouts, provided you make some modifications to your application and map projection.
    43
     
    1817http://code.google.com/apis/maps/signup.html
    1918
    20 After submitting the request, you should get a sample script tag that looks like
     19After submitting the request, you should get a sample script tag like this:
    2120{{{
    2221<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=<your key here>" type="text/javascript"></script>
     
    2423
    2524Note that the sensor argument has been set to false.
     25
     26Microsoft'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
     31Finally, Yahoo's service requires you to obtain a key from:
     32
     33http://developer.yahoo.com/maps
     34
     35You 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}}}
    2639
    2740If 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.
     
    4356= Step 2: Update the projection information in the !MapDefinition =
    4457
    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.
     58Since 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.
    4659
    4760 * 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.
     
    7689}}}
    7790
    78  * If you don't like the default Google map type, you can add an <Options> tag to the Google layer and change 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:
    7992
    8093{{{
     
    114127}}}
    115128
    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. ''
    117130
    118131 * Load the template in a browser: http://localhost:8008/mapguide/fusion/templates/mapguide/standard/
     132
     133To 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}}}
     143for Virtual Earth or
     144{{{
     145      <Map xsi:type="WMSLayerType">
     146        <Type>Yahoo</Type>
     147        <Extension>
     148          <ResourceId>yahoo</ResourceId>
     149        </Extension>
     150      </Map>
     151}}}
     152for 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.''