1

I have a Google Map with filterable markers and info-boxes containing simple information about each marker( when you click them ), but was wondering if this is possible:

When you would click on a marker - instead of a default info-box a big div appears on top of the map with tabs which shows all the possible data I will provide about a marker via JSON ( images, links, pictures ).

How would you approach about implementing this functionality?

enter image description here

Bob
  • 1,355
  • 5
  • 19
  • 38
  • [www.whathaveyoutried.com](http://www.whathaveyoutried.com)? – Erik Philips Jun 01 '12 at 16:57
  • @ErikPhilips: You are right. I'm researching on this matter right now, and later on will post the solution as an answer to my own question. Thanks. – Bob Jun 01 '12 at 17:20

2 Answers2

3

In your loop to add markers, add something like this:

google.maps.event.addListener(marker, 'click', (function(marker, i) {
        return function() {
           ... your code ...
        }
     })
)

In your code you need to determine the map size and put a translucent DIV over top, then show your own HTML absolutely-positioned DIV inside the map's weapping element.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176
0

you can also change the map style when clicked in the marker.

google.maps.event.addListener(marker, 'click', (function(marker, i) {
    return function() {
       map.set('styles', markerSelectedStyles);
    }
 })

)

You need to create your own version of a darker map.

Maps Style Wizard

And create a style like this for instance:

var markerSelectedStyles = [ {
"stylers": [
  { "invert_lightness": true }
]}
]
Coen Damen
  • 2,009
  • 5
  • 29
  • 51