Box when mouse over the municipality

Asked

Viewed 128 times

0

I am using the Googlemaps3 api and after rendering the map I would like that when you hover over some area (which has already been programmed) the code of the area is shown. What I’ve done so far is:

hover the mouse over the 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);
        }
    }

text display css

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

This way it’s not working,?

1 answer

1


  • ,I will participate yes and that’s what I was looking for. Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.