I am working on a map where I neet to plot multiple routes using the DirectionService, and each marker on the route has an infoWindow.
Instead of having to keep track of which infoWindow binds to which marker, is there a way for me to grab all infoWindows on a map?
There are no way to do what you want.
The map does not know what markers it have or what infowindows those markers have. The Markers know what map they belong to, but that is it. So unfortunatly you will have to keep track of your markers and infowindows if you want to use them after they are created.
Why not just have one infowindow, and set the content of it to be different for each marker? Makes life much simpler (unless you ever need to display more than one infowindow open at the same time)
Related
I was wondering if you could put a custom StreetView with a marker. I am making a map that has city parks. I want it so if someone clicks on a specific marker, the custom StreetView pops up and shows the panorama. For the custom StreetViews I used Google Views. Is this possible?
Thanks in advance.
Yes, this is possible. Something close to it can be done in two ways.
The easiest option is to load Google maps from the main URL and wait. It will let you build a map or view your custom maps just below the search bar. Google Maps itself lets you create a custom map with markers. This doesn't sound like your desired option, but it is quick to implement. You can even add your own style.
The second is to create your own custom Street View tour, this sounds like your focus. You want the actual panographs to use your markers. This is fairly easy to do, but requires some programming. It is possible on both Google Earth and Google Maps. Check out the Google APIs such as https://developers.google.com/maps/documentation/javascript/reference#StreetViewPanoramaOptions. Options include changing out panographs for your own images, defining arrows including labels, overlays, pop-up boxes, action boxes, and more. Check out some options here: http://hpneo.github.io/gmaps/examples.html
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?
I have built a custom Google Map and When the page loads I would like a 'splash screen' to appear over the map inside the map container (this would be an image with some instructions), which could then either be toggled off or would disappear after a set time.
I know that I can do this using CSS/JQuery to create a layer over the map container, but is it possible to do this using the map API?
You could use overlays or a custom infowindow (infobox).
I would suggest overlays. Their existence is for displaying components
over the map. Infowindow would suffice too, but their role is for displaying something
in relation to a specific spot on the map.
See this for more
I have a new google map app using v3 of the API. On it I have a few custom markers with info windows. I use a global variable to ensure only one info window opens at any one time - everything is as it should be.
However the map comes with many local business markers, just like the ones all over this map (http://goo.gl/maps/M6m3), all of which open their own infowindows. If I click on one of these my infowindow doesn't get closed, and if I click on one of my markers, the built in infowindow also doesn't close - leaving multiple windows open.
Can this be resolved?
Sounds like you want the "Points of Interest" (AKA POI) on the map to not be clickable (or to be able to capture the click on them).
This was tracked as an FR in the issue tracker and was recently implemented using a new property clickableIcons in MapOptions
If you set it to false, POI features will no longer be clickable. You can also use the get/setClickableIcons methods on the Map object to change this dynamically.
One other way to deal with them is to remove POIs from the map (using styled maps), if you don't want to have the infowindow open when they are clicked.
Here (How to remove certain places on a map ) is one discussion on the v3 API group about using styled maps to remove them.
And here (Disabling POI's InfoWindows - workaround found) is another.
At least now it doesn't cost more to do that (styled maps used to be more expensive than normal maps).
Using the Google Maps API v3, is it possible to customize the layout and content of the infoWindows that are attached to each route marker that's plotted through the DirectionService?
Thanks to geocodezip at the Google Maps API Groups for this example on how to achieve this:
http://www.geocodezip.com/v3_directions_custom_revgeo.html
There is no out of the box way to do it, you have to essentially place custom markers/infoWindows yourself, and attach dragging listeners to each one of them.