Box when passing mouse over the municipality

0

I'm using the GoogleMaps3 api and after rendering the map I would like to move the mouse over some area (which has already been programmed) to show the area code. What I've done so far was:

hover over area:

google.maps.event.addListener(setores[codarea], 'mouseover', function(){
                        this.setOptions({
                            fillOpacity:0.3,
                            strokeWeight: 2
                        });
                        mostrartexto(this.id);
                    });

Show text

function mostrartexto(codmun)
    {
        var msg = codmun;
        if (msg)
        {
            $("body").append('<div id="mostrartexto"></div>');
            $("#mostrartexto").html(msg);
        }
    }

Show text css

$("#mostrartexto").css({
                "margin-left": e.pageX+15,
                "margin-top": e.pageY+5
            });

This way it is not working, does anyone have any tips?

    
asked by anonymous 15.04.2015 / 21:12

1 answer

1

Rodolfo blz ??

So I do not know if I understood correctly what you need, so I created a small example:

link

Join our community Google Maps Api Brazil

link

    
17.04.2015 / 13:40