I have built a very simple page that integrates Maps with the GE
plugin.
http://www.lme.noaa.gov/maps_with_earth.htm
Using the code below, I am able to add the G_SATELLITE_3D_MAP and use
it as the default view when the page loads. In addition, I have used
getEarthInstance to add a navigation control and country borders.
The page loads fine with all of my simple modifications, however, when
the user switches to either the MAP or SATELLITE view and then returns
to the EARTH view, the LAYER_BORDERS is no longer visible. The
navigation control still works as expected.
How can I ensure that LAYER_BORDERS remains visible as a user
navigates the page? I appreciate any direction people can provide. I
searched the group for answers to no avai, but might not have used to
proper terms.
//////////////////////////////////////////////////////////////////////////////////////////
var map;
var ge;
google.load('maps', '2.x');
function init() {
map = new GMap2(document.getElementById('map3d'));
map.setCenter(new GLatLng(37, -72), 3);
// set up the base maps available in the window
var mapui = map.getDefaultUI();
mapui.maptypes.physical = false;
mapui.maptypes.satellite = true;
map.setUI(mapui);
// add 'Earth' as one of the map types and set 'Earth' as default
vire
map.addMapType(G_SATELLITE_3D_MAP);
map.setMapType(G_SATELLITE_3D_MAP);
// add data layers and navigation controls to Earth view
map.getEarthInstance(function(ge) {
ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);
ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true);
});
}
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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/google-maps-api?hl=en.