Saturday, February 6, 2010

bug when integrating Google maps API with google earth

hello sir,

i am making a project which integrates google maps API with Google
earth API. i am using version 2.x.

i am using the following code:

// add 3D map
var ge;
GEvent.addListener(map, 'maptypechanged', function() {
if (ge) return;

map.getEarthInstance(function(pluginInstance) {
// get the 3d map instance
ge = pluginInstance;

// show the status bar
ge.getOptions().setStatusBarVisibility(true);

// load some layers
ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true);
ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true);
});
});

every things going well except one thing. the LAYER_BORDERS and
LAYER_ROADS are visiable only in the 3d view when i switched to the
"Earth" at the startup of my page. but if i switch again to map and
then to eartgh again, i can not see both of these layers. what is the
problem and how can i fix it????

regards,
ashraf

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

No comments:

Post a Comment