= !MapGuide RFC 72 - Commercial Map Service Support = This page contains an change request (RFC) for the !MapGuide Open Source project. More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. == Status == ||RFC Template Version||(1.0)|| ||Submission Date||(Date/Time submitted)|| ||Last Modified|| Arthur Liu [[Timestamp]]|| ||Author||Arthur Liu|| ||RFC Status||adopted|| ||Implementation Status||implemented|| ||Proposed Milestone||2.2|| ||Assigned PSC guide(s)||Tom Fukushima|| ||'''Voting History'''||(vote date)|| ||+1|| || ||+0|| || ||-0|| || ||-1|| || ||no vote|| || == Overview == Commercial tiled map layers can be used as basemaps within MapGuide flexible layouts. Users can use MapGuide overlays with commercial map service layers(Google maps, Yahoo maps and Bing maps). == Motivation == Fusion provide a solution to integrate the commercial map services into the standard template: [[BR]] 1. Add some script tags to index.html. These scripts indicate commercial mapping api providers and unique api keys supplied by these providers.[[BR]] 2. Modify the application definition to include the commercial map service layers. [[BR]] [Detailed Information] http://trac.osgeo.org/fusion/wiki/MapGuideCommercialOverlays MapGuide templates should also have the capability to support the commercial map services. But it's not proper to add all the commercial api script tags into MapGuide templates by default because of script loading time. We need to provide a more convenient approach to add these scripts. == Proposed Solution == 1. Save the commercial mapping api scripts and keys in the extension part of application definition.[[BR]] 2. MapGuide templates load the extension information from the application definition , and add the script tags into index.html on demand. [[BR]] So users just need to provide an application definition with the extension, then they will obtain the commercial mapping services. To load scripts from the application definition, MapGuide template file need to add a script like {{{ }}} The original Window.onload event will be replaced by init function which will be called on demand. * To get the mapAgentUrl, we can just reuse some code in Fusion * For the lazy loading commercial API scripts, we also need to provide a method to verify if all the needed scripts have been loaded. Then to intitialize the Fusion. == Implications == Existed MapGuide templates(aqua, limegold, maroon, slate and turquoiseyellow) need to be updated to support load commercial api from application definition. == Test Plan == Test 5 MapGuide templates(aqua, limegold, maroon, slate and turquoiseyellow) to verify if they could support the commercial map services. == Funding/Resources == Supplied by Autodesk.