is wrong question ? i need dragable marker /placemark on google
earth ?

On Sep 19, 11:04 am, mohammed <[email protected]> wrote:
> hi guys ,
> am using google map API , and i have added new map type (Google
> earth) , my problem when i add dragable marker , its work fine on
> google map , but does not work on google earth , how i can integrate
> it to work on different map types ? for examplehttp://maps.google.com/
> its working fine here
>
> i have tried this
>
> -----------------------------
> var map;
> var ge;
>
> google.load("maps", "2.x");
>
> function init() {
>   map = new GMap2(document.getElementById('map3d'));
>   map.setCenter(new GLatLng(37, -122), 12);
>
>   var mapui = map.getDefaultUI();
>   mapui.maptypes.physical = false;
>   map.setUI(mapui);
>
>   // add 'Earth' as one of the map types
>   map.addMapType(G_SATELLITE_3D_MAP);
>
>   // create a marker
>   var marker = new GMarker(new GLatLng(37, -122),{draggable: true});
>
>   GEvent.addListener(marker, "click", function() {
>     var html = '<div style="width: 210px; padding-right: 10px">Hello
> world!</div>';
>     marker.openInfoWindowHtml(html);
>   });
>
>   map.addOverlay(marker);
>   google.maps.Event.trigger(marker, "click");
>
>   // create a polyline (LineString Placemark in KML)
>   var polyline = new GPolyline([
>       new GLatLng(37.04, -122.04),
>       new GLatLng(37.02, -122.02),
>       new GLatLng(37.03, -122.01),
>       new GLatLng(37.01, -121.99)
>     ], "#ff0000", 10);
>
>   map.addOverlay(polyline);
>
>   // do stuff with Earth when the user switches to it
>   GEvent.addListener(map, 'maptypechanged', function() {
>     if (ge)
>       return;
>
>     map.getEarthInstance(function(pluginInstance) {
>       ge = pluginInstance;
>       doStuffWithEarth();
>     });
>   });
>
> }
>
> can u help me please ?
>
> regards

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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.

Reply via email to