Add an existing marker to embed Google Map - google-maps-api-3

I just started using the Google Maps API and need help understanding how to add an already existing marker to my map.
This is the link to my marker: https://www.google.com/maps/d/viewer?mid=zmt3eGOnKE00.kcaYcH09dEv8, from which I can get the marker ID. How can I add it to my embedded map? Thanks.

Use the downloaded KML or a KML network link (from your map) to display that data in a KmlLayer on your Google Maps Javascript API v3 map.

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

customize source and destination icons in google maps api

I am using Google Maps JavaScript API v3 and I want to show direction on the map by giving start and end points. when I draw the direction google automatically sets its default icons for source and destination. Is there any way to remove those icons and I use my own marker icon? I couldn't find it in google documentation.
You can use option
suppressMarkers: true
see Google Maps API docs for DirectionsRenderer. And then create your markers at start and end point.

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.

Google maps api kml not getting all data

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

Resources