[mapguide-users] Re: GoogleMap on MGOS
ar_gaeta
ar_gaeta at yahoo.it
Tue Nov 16 07:49:08 EST 2010
Hi all,
I've found a "raw" way to load GoogleMap under my MG layers, in
FlexibleLayouts!!
I explain my steps, maybe they can be useful to someone, and maybe to solve
my problem too.
1-I've copied all the directory about "limegold", and renamed it, so I can
modify it freely;
2-I add these line in the "index.html" just befor the tag: <script
type="text/javascript" src="../../../lib/fusionSF-compressed.js"></script>:
<script
src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=
YOUR_GOOGLE_MAP_KEY_HERE" type="text/javascript"></script>
<script type="text/javascript"
src="http://www.openlayers.org/api/OpenLayers.js"></script>
3-I modify the ApplicationDefinition.xml in the same folder. I substitute
all the MapSet tag with this strings:
<MapSet xsi:type="MapSetType">
<MapGroup id="sheboygan" xsi:type="MapType">
<Map xsi:type="MapGuideLayerType">
<Type>MapGuide</Type>
<SingleTile>true</SingleTile>
<Extension>
<ResourceId>Library://Samples/Sheboygan/Maps/Sheboygan-m.MapDefinition</ResourceId>
<Options>
<isBaseLayer>false</isBaseLayer>
<userOverlay>true</userOverlay>
<projection>EPSG:900913</projection>
</Options>
<SelectionAsOverlay>true</SelectionAsOverlay>
<SelectionFormat>PNG</SelectionFormat>
<SelectionColor>0xFF0000FF</SelectionColor>
</Extension>
</Map>
<Map>
<Type>Google</Type>
<SingleTile>false</SingleTile>
<Extension>
<ResourceId>Google</ResourceId>
<Options>
<name>Satellite Google Maps</name>
<type>G_SATELLITE_MAP</type>
<isBaseLayer>true</isBaseLayer>
</Options>
</Extension>
</Map>
</MapGroup>
</MapSet>
Pay attention that the SheboyganMap must be in the coordinate system
"900913".
4-Launch directly the file "index.html", and that's all!! If we want to
change the map, we must modify the first map tag in the
ApplicationDefinition.xml file. For now, I didn't find a way to make these
changes working with MG Maestro...
Problems: When I want to load this layout on a client PC, all is working
fine if I use GoogleChrome, but when I use Firefox I'm not able to load all
the widgets of LimeGold, and this error message appear (I attach also an
image):
Fusion Error:
WARNING: Exception occurred in AJAX callback.
Message: Node was not found
Location: undefined (1283)
http://osgeo-org.1803224.n2.nabble.com/file/n5743676/Screenshot.png
Screenshot.png
Someone could help me please?
Many thanks,
Riccardo
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GoogleMap-on-MGOS-tp5717706p5743676.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list