David,

What do you think about adding the Google Earth plugin button as a map 
view settings?   Yes, I know it's another setting but I don't think 
that's necessarily bad.

Seems like a simple edit in Exhibit.MapView.prototype._constructGMap (in 
map-view.js) is all that's needed (outside of the adding the additional 
setting spec), adding something like the following at the end of that 
function.

if (settings.earthPlugin) {
      map.addMapType(G_SATELLITE_3D_MAP);
}


- John



John Callahan wrote:
> Hi Matt,
>
> Yes, this is rather easy to do, at least just to get your map 
> Earth-enabled.  And it looks pretty cool.  I haven't tried anything 
> sophisticated yet with the GE plugin.  One of these days....
>
>
> There are several ways to do it but I've only tried one.   First, add a 
> mapConstructor function to your map view
>
> ex:mapConstructor="newMapConstructor"
>
> Then, add the javascript function newMapConstructor() somewhere on your 
> page.  Since you are now constructing your own google map from scratch, 
> you need to add a few lines that Exhibit normally does for you.  Here's 
> something that works well
>
> function newMapConstructor(mapDiv){
>   map = new GMap2(mapDiv); 
>   map.setCenter(new GLatLng(39.2,-75.4), 8);
>   map.addControl(new GLargeMapControl());
>   map.addControl(new GHierarchicalMapTypeControl());
>   map.addMapType(G_SATELLITE_3D_MAP);
>   return map;
> }
>
> The "G_SATELLITE_3D_MAP" control enables the Google Earth plugin (which 
> must be installed on the client to work.) 
>
> You can also add any of the map controls listed in 
> http://code.google.com/apis/maps/documentation/reference.html#GControlImpl
>
>
> Hope this helps. 
>
> - John
>
>
>
> Matt Gilbert wrote:
>   
>> On the Gogle Earth API site it says "If you have an existing Maps API
>> site, you can 3D-enable your page with as little as one line of
>> code." (http://code.google.com/apis/earth/)
>>
>> Has anyone tried this on a Google Maps Exhibit? Seems possible.
>>
>>     
>>   
>>     
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to