Google maps api kml not getting all data - google-maps-api-3

I'm trying to do on mouseover instead of on mouse click for google map using google maps api
succeeded in it, but here is the query
it is working fine here: http://code.nebtron.com/o/
however, the popups on mouseover don't have all the data like they have on maps.google.com
obviously kml isn't exporting all of it,
I want the popup cards to be exactly the same as on google map:
http://maps.google.com/maps/ms?msa=0&msid=210314513202687277761.0004add759729f225c40c&hl=en&ie=UTF8&t=m&vpsrc=0&ll=53.758936,-2.358289&spn=6.777111,7.027922&source=embed

Google Maps supports the KML elements mentioned in the link below. Maybe your kml file has some elements not supported.
Moreover:
The KML parser generally silently ignores XML tags it does not understand.
So do not expect any errors.
KML in Google Maps

Related

label a kml file in Google Maps API v3

I am trying to figure out how to use Google Maps API v3 to label a kml polyline that was originally created in ArcGIS Desktop. Unfortunately, the examples that I came across thus far either don't seem to apply to kml files, had dead links, or were examples on how to create pop-ups.
If anyone has an example of how to create labels (not popups) from a kml file let me know.
Side questions:
*In ArcGIS I can use Layer->Properties->HTML Popup to configure the popup for kml. What do I need to do in ArcGIS to specify what attribute I want to use as my label?
*Can I make labels appear only at certain resolutions?
You can't add labels using the Google Maps Javascript API KmlLayer, if your KML isn't too complicated, you can use a third party parser (like geoxml3 or geoxml-v3) to render your KML as native Google Maps Javascript API v3 Polylines, and add labels to those.
labeling options:
polyline with label in javascript
MapLabel
InfoBox

Dynamically addressing kml in Google Earth API for Google Maps v3

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.

How to search only within the displayed map with google maps?

Airbnb has a feature on their main search page that only the results in the map are shown. Is it something that is supported by the google maps api ?
I am using the gem gmaps4rails. I havn't found this in neither in the google maps api not in the gem.
Basically what I want is the bounds of the map so that I know what constraints to search with, so that the results fit in the map.
How do you think it can be done ?
The Map-class has a method called getBounds().

Switch between google maps and google earth

Using a KML file I can show Google Earth in website. Now, can anyone give me idea to implement following specification?
I need following buttons above the Google Earth plugin
a. User must be able to switch between map and earth.
b. User should be able to save and download the map or earth as image
So we have to use same KML file (that is used for google earth) to show google map. After that google earth or the google maps have to be saved as image.
As per i know,same kml will not work for google maps and google earth.Becuase, Google Earth kml is some what different to Google Maps kml.In Google Earth kml we need to declare <LookAt> that is not supported by Google Maps.Please have a look into the following url for Google Earth kml:
http://code.google.com/apis/kml/documentation/kml_tut.html
and the following url explains google maps kml:
http://econym.org.uk/gmap/kml.htm
Here we have to observe one more thing like we have <coordinates> in both cases.But ,the Projection is different in both cases.If we use same lat and lon for Google Earth and Google Maps we cannot able to get the correct result.So,you can use both kml but while passing coordinates from Google maps to Google earth,need to change the lat,lon projections and vice versa.
Hope this helps you :-)

Google Map APIv3: Disable infoWindow when using InfoBox with KML PlaceMarker

I'm using InfoBox for Google Map API v3 with a little customisation to use it with Kml PlaceMarker.
The problem is: When in my KML file I add Extended Data, a infoWindow is displayed with the infoBox. Without this Extended Data, google map doesn't display this infoWindow and it's fine, only the infoBox is displayed.
The question is: How can I force google maps to never display any infoWindow?
I can't tell if you're talking about using KmlLayer because ou didn't post a link, but if you are: use the suppressInfoWindow option.
See the docs for more information.

Resources