can anyone tell me if it is possible to display an ArcGIS dynamicMapService on GoogleEarth via the GoogleMaps API? It works fine with KML but my services are only visible on the 2D maps.
Any ideas?
HI,
I got some help in the ESRI forum (thanks guys!) and what I they told me is that it is NOT possible to display an ArcGIS mapservice in the google-earth-plugin (=maptype: G_SATELLITE_3D_MAP) ! What should work is to allow the mapservice to have KML capability and then use the KML version instead.
Here some info on displaying mapservices as KML in ArcGIS Server environment.
http://webhelp.esri.com/arcgisserver/9.2/dotNet/manager/publishing/kml_service.htm
best
Jens
Related
I am building a web-page using Google maps js api. I need the map type which shows all 3D buildings view provided by Google earth, just like the Google's map application where you can see all 3D buildings in the earth view.
I don't want to use the Google earth API because it's deprecated.
Any way to achieve that?
Google seems to be silent about 3D features in Javascript API. Closest I can get to this are Styled Maps but nowhere does it specifically indicate 3D. Only Android implementations are available as of now.
At this moment, the javascript API generates 3d buildings in map-view, with no option to turn this off.
The google maps website shows 2d buildings, which includes housenumbers. This information seems more accurate than the 3d-buildings map-view. But the options to toggle between various map layers is a long standing omission in the javascript API.
I'm using Google Earth API for Google Maps v3 to display kml files in a window which can then be switched between Maps and Earth browsers. This is a different plugin to that officially provided by Google, and I've run into a problem dynamically switching kml in the Earth window. I use checkboxes to switch them in the Maps API V3, window, but when the browser is switched to Earth it no longer listens to the checkbox actions. Essentially what I'm trying to do is a replication of the interactive checkbox example on the google code playground, but I think I should be using the Maps V3 scripts?
I've included a link to the example script here:
http://commondatastorage.googleapis.com/webgistank/TRMM_Checkbox_Example.html
Any help is greatly appreciated!
Regards,
Kerry
You have errors in your code. For example, the line
google.maps.event.addListenerOnce(map, 'tilesloaded', addOverlays);
references the non-existent function addOverlays
Also, I'm not sure what you mean...
"This is a different plugin to that officially provided by Google"
...as it is the exact same plugin.
You also state that...
"...it no longer listens to the checkbox actions."
It is the browser listens for the actions, not the Earth plug-in. The checkboxs event are still firing, the reason the code doesn't work is that the "Google Earth Api" (the api for controlling the plugin) uses totally different objects and methods to the Google Maps Api (the api for controlling the map). Things like google.maps.KmlLayer just don't exist in the Earth Api at all. So when the checkbox event fires it causes and error because you are calling methods on objects that don't exist.
From looking at your code, after initialising the Earth plugin via
googleEarth = new GoogleEarth(map);
You don't do anything else with it...You mention in your question the interactive checkbox example on the Google code playground, but as far as I can see you haven't actually implemented any of the code from that example.
Take another look at the function loadKml method in that example - it clearly shows how to load and display data in the Earth plugin.
Is there a way in the Google Earth Plugin API to find and highlight the nearest point placemark from a given point(lat,long) on GE plugin? The KML file with few point placemarks is loaded to GE plugin through javascript code uging network link.
I don't know of any way to do this kind of query using the API, and in fact, NetworkLinks are intentionally made to be opaque to the API (for instance they don't show up in the KML DOM).
In the past, libraries built on top of the Earth API have worked around this by emulating NetworkLink functionality in Javascript, loading the KML via fetchKml or loading via XHR and then into the plugin via parseKml. At that point you can select all the placemarks either by parsing the locations yourself (if you loaded the KML by XHR), or you can use getElementsByType('KmlPlacemark') and then (finally) use a normal algorithm to find which is closest and highlight it in some way.
I'm currently creating an interactive web map using Google Maps Javascript API version 3. I'm not sure if this is possible but I would like to create a series of map layers consisting of different kml files that could be toggled from the side bar. I would also like to be able to access the individual points within the kmls so that when the user clicks on a particular point, photos, text etc. can be loaded outside the map window...
Any ideas on how to accomplish this? I've been searching for a while and only found ways of configuring the infowindow which I personally find unattractive...
There is a way to load KML into a google maps application natively, there is actually a pretty good example of how this is done here:
http://gmaps-samples-v3.googlecode.com/svn/trunk/layers/layers.html
One trick I will mention is that since the KML is downloaded to Google's servers in order to be rendered on the map, it must exist on a public facing web server somewhere, Google won't be able to access it from your local machine.
I found this tutorial which seems like it'll do the trick!
Hi I have one web application where i am using google map in my site. For Fetching Marker points I am using ajax request. In First time When I am using this it's working perfect but when i tried for second time (ANY refresh). Then it's showing only half google map.
I am using version 2 google map api.
Please help me to find the solution.
Thanks in Advance.
hard to say what is your problem here. You might want to try to redraw the map by using
map.checkResize();
or in google maps api v3:
google.maps.event.trigger(map, 'resize');
But this normaly shouldn't be needed...