Yes, you can implement a subclass of layer and use layerContainer as container, then embeded an instance of google earth plug in using Earth API. Because earth is a 3D visualization, there are some limitations. You will have to convert all your Graphics layer's feature into KML based objects, and you may not use any of the tiled map services in your existing map. For dynamic map services you would likely convert them to ground overlay and refresh as view point changes. On top of that you may need use the iframe shim technique to embed the plug in to your page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <title>ArcGIS</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAoCCuxJYvQKuOME9a3Fc8KhS3iegp0cxLQXAJedXkaj3wQFFtEhTesTSfWOBzZ-EKH79ER3PXZ-lnhA" type="text/javascript"></script> <script src="http://serverapi.arcgisonline.com/jsapi/gmaps/?v=1.6" type="text/javascript" ></script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2"></script> <script type="text/javascript"> function initialize() { gmap = new GMap2(document.getElementById("gmap")); var centerat = new GLatLng(22.00, 77.00); gmap.addControl(new GLargeMapControl()); gmap.addControl(new GOverviewMapControl()); gmap.addControl(new GScaleControl()); gmap.addControl(new GMapTypeControl()); gmap.setCenter(centerat, 4); gmap.enableScrollWheelZoom(); gmap.addMapType(G_SATELLITE_3D_MAP); gmap.setMapType(G_SATELLITE_3D_MAP); var map = new esri.Map("gmap"); var mapservicelayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://0.0.0.0(myliveip)/ArcGIS/rest/services/javatest/admin_boundries/MapServer",{"opacity":0.75}); map.addLayer(mapservicelayer); } </script> </head> <body onload="initialize();" onunload="GUnload();"> <div id="gmap" style="width: 100%; height:550px;"></div> </body> </html>
Is it Possible to add Google Earth as baselayer using ArcGIS API for Javascript ?
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.