google maps api V3 - MarkerClusterer combine with Infobubble - javascript

I'm looking for a way to combinate the MarkerClusterer from google-maps-utility-library-v3 with the Infobubbles. My idea is to show the Infobubbles only when the icon is unclusted (visible). And maybe see a summary for each clustericon with Infobubbles. Unfortunately I didn't find any possibility to control that Infobubbles is only visible after the unclustering.
Maybe someone has an idea or an approach how to achieve this?
Thank you
Robert

If you listen to the 'clusterclick' event on the MarkerClusterer you will receive the cluster that is clicked in the callback. From that cluster you can call:
getSize, getMarkers, getCenter and getBounds.
With that info you can then open a InfoBubble at with the result of getCenter() and you and display the content that you want.

Related

Api google maps list name marker

I have a div with maps and another div for the list of pointer markers on the map. How to update the list with the name of the markers on the current map when zooming in on the map?
Thanks!!!!
I think this answer is exactly what you need:
answer on stackoverflow
It has a link to a code pen that quite well seems to describe what you want.

Bing maps draggable infobox

I have pretty simple question. Is it possible to create draggable infobox with Bing Maps Javascrtipt API?
Ergo when i click on pushpin on map the infobox will be shown and will be draggable within the map div.
Thanks!
This isn't built in, but you could create a custom infobox control that could do this. This isn't something I've seen anyone ask for before, so not aware of any blogs out there with samples. You would have to use the mouse events to do this.

How to insert my picture to google maps

i need insert my map picture to my google map with markers, at sites. I have map without draggable, static zoom. Can you help me?
Thanks
So you're trying to lay an image on to google maps, in a specific location? If so, I think this should be able to help you:
https://developers.google.com/maps/documentation/javascript/examples/overlay-simple

Show/hide div when clicked on marker

I'm new to javascript and no idea where to start digging information how to implement my idea. I want to open a div like a pop-up over the map when a marker is clicked. I have around 15 markers and every marker has different content and images. The pop-up layout will stay the same. I believe making a div is easier than making a infobox, true?
this is my photoshop sketch:
Sketch
And this is what I have so far:
Demo
What should I try, read and investigate?
You could just use the info window of google maps
see https://developers.google.com/maps/documentation/javascript/reference#InfoWindow
and customize it's contents.
like in this question: Google Maps API v3: Custom styles for infowindow

How do I monitor for clicks on polygons with Google Maps API v3

My polygons are loaded dynamically from a .kml file using KMLLayer.
I need these polygons (on click) to link to a page.
Can anyone advise me or provide a solution please?
Thanks!
You can just simply add a listerer to the polygon.
var polygon = google.maps.Polygon(....);
polygon.addListener('click', function(){
});
Polygon reference
If i'm not mistaken i think that features loaded from kml cannot have listeners attached to them.Please take a close look here

Categories