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?