customize source and destination icons in google maps api - google-maps-api-3

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.

Related

Add an existing marker to embed Google Map

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.

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

Can you change the view in Google Earth API from "Earth" to "Map" like in Google Maps?

I am developing a web page which uses the Google Earth plugin. I would like to display the map like in the first image with the "Earth" and "Satellite/Map" view options like you can in Google Maps, or at least be able to just show the map in "Satellite/Map" view:
Currently this is what the view looks like:
Is this possible?
Yes, you can use the Google Maps V3 to switch between Google Maps and the Google Earth Plug-in.
The google-maps-utility-library-v3 can be used to make this easier.
You can see a working example here.
Alternatively you can simulate a reasonable map view buy just turning of the terrain and photo imagery and turning on the borders and roads layers in the Earth Plug-in. If you then lock this view to 'plan' it works well.

Google Maps JS API V3 - Create map and insert fake labels over locations

I'm mocking up an HTML5 web app and I need to incorporate a map with specific locations marked off with custom banners. For the sake of the mockup, I just need to have the default location markers replaced with some sort of graphic of my choosing. How would I do this?
The Maps API documentation has a custom marker icon example (reference). You can use it as a starting point for your own code.

Adding overlays to the Google Maps display itself

I'm looking for a way to add images to the Google Map interface itself, not fixed on a point on the geographical map but on the Google Maps "window". Something to display Map Legends on the map itself.
I've been looking through the net but can't seem to find a way to do this. As you can tell I don't really know what this is called also, so that may be the reason why I ca
You have to open infowindow on map and put image in it.
Try with this answer : google maps api v3 - how to display image thumbnails inside bubble?

Resources