<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:12.0pt'>I would like to add an
OpenLayers.Layer (specifically google maps) to my MGOS Fusion Layout.
I've been looking through the posts and there is a lot of info regarding both
of these but I'm at a loss as to how to implement it with Fusion.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>I can get the OpenLayers map
using the following code<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>var mapWidget =
Fusion.getWidgetById('Map');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>var olmap = mapWidget.oMapOL;<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>and on a separate page that I
made I can implement google into openlayers using the following script:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>map = new
OpenLayers.Map('map');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'> map.addControl(new
OpenLayers.Control.LayerSwitcher());<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
var gphy = new OpenLayers.Layer.Google(<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
"Google Physical",<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
{type: G_PHYSICAL_MAP}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
var gmap = new OpenLayers.Layer.Google(<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
"Google Streets", // the default<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
{numZoomLevels: 20}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
var ghyb = new OpenLayers.Layer.Google(<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
"Google Hybrid",<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
{type: G_HYBRID_MAP, numZoomLevels: 20}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
var gsat = new OpenLayers.Layer.Google(<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
"Google Satellite",<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
{type: G_SATELLITE_MAP, numZoomLevels: 20}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
map.addLayers([gphy, gmap, ghyb, gsat]);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>
map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 5);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>But I'm not sure how to implement
both together. When I add the google layers to the olMap, nothing breaks
but my normal Fusion layout shows up.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>I'm looking for a push in the
right direction here, or a link to an example that I can explore. The end
goal is to have my normal Fusion map with google as a layer which can be turned
on/off in the legend widget.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>I'm assuming that I will have
to access openlayers via Fusion.getWidgetById('Map').olMap; and add the
openlayers.layer to the olMap. But then how do I register those layers
with the mapWidget in order for them to show up. Also, I'm assuming that I
will have to set some type of bounds or coordinate conversion for the google
layers to know where they are on my map, seeing as my map is on a state plane
coordinate system instead of lat/long.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>Thanks for the help<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt'>-Mark P.<o:p></o:p></span></p>
</div>
</body>
</html>