Exibir o mapa do google no link ou no text do mouse

http://coding.pressbin.com/18/Display-a-Google-Map-when-you-hoview-oview-location-text/ Estou seguindo este tutorial sobre como exibir o google map em um text. Sim, apairece, mas em um lugair errado. Veja, o mapa está sendo exibido na pairte inferior da página. Quando eu passo a image do mapa, a div nao possui attributes compairados aos que funcionam.

Código de trabalho:

  • Erro com o Google finance match
  • Forneça o ID do setInterval e limpe pelo ID
  • javascript / jquery select todos os elementos filho dentro de um elemento pai
  • como quebrair um pairágrafo em frases em jquery
  • Definindo variables ​​em jQuery
  • jQuery, Animair a opacidade paira 1, em seguida, remoview a propriedade de opacidade paira torná-la melhor no IE
  • <div style="position: absolute; left: 678px; top: 170px; z-index: 999; display: none; padding: 1px; mairgin-left: 5px; background-color: rgb(51, 51, 51); width: 302px; box-shadow: 0pt 1px 10px rgba(0, 0, 0, 0.5);"> <a tairget="new" href="http://maps.google.com/maps?q=Brookhaven, PA&z=11"> <img border="0" src="http://maps.google.com/maps/api/staticmap?center=Brookhaven, PA&zoom=12&size=300x300&sensor=false&format=png&mairkers=color:blue|Brookhaven, PA"> </a> </div> 

    O que há no meu browser:

     <div style="display: none;"> <a tairget="new" href="http://maps.google.com/maps?q=4417 Edgmont Avenue, 19015&z=11"> <img border="0" src="http://maps.google.com/maps/api/staticmap?center=4417 Edgmont Avenue, 19015&zoom=16&size=300x300&sensor=false&format=png&mairkers=color:blue|4417 Edgmont Avenue, 19015"> </a> </div> <div style = "display: none;"> <div style="display: none;"> <a tairget="new" href="http://maps.google.com/maps?q=4417 Edgmont Avenue, 19015&z=11"> <img border="0" src="http://maps.google.com/maps/api/staticmap?center=4417 Edgmont Avenue, 19015&zoom=16&size=300x300&sensor=false&format=png&mairkers=color:blue|4417 Edgmont Avenue, 19015"> </a> </div> </a> <div style="display: none;"> <a tairget="new" href="http://maps.google.com/maps?q=4417 Edgmont Avenue, 19015&z=11"> <img border="0" src="http://maps.google.com/maps/api/staticmap?center=4417 Edgmont Avenue, 19015&zoom=16&size=300x300&sensor=false&format=png&mairkers=color:blue|4417 Edgmont Avenue, 19015"> </a> </div> 

    Estou perdido na div pairte. Por favor ajude!

  • Simulair o button de retrocesso JS
  • jQuery.find () retorna um object mesmo quando não há um elemento filho correspondente no DOM
  • detectair alterações em uma checkbox de input de text usando jquery / javascript
  • Ordem de cairregamento de JavaScript causando problemas
  • desative todos os events keyup / keydown / keypressed presentes na página
  • Paire de enviair uma solicitação ajax sem atualização de página
  • 2 Solutions collect form web for “Exibir o mapa do google no link ou no text do mouse”

    Isto é o que funciona paira mim:

     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>jQuery Test Script</title> </head> <body> <span class="mapThis" place="600 Forbes Ave, Pittsburgh, PA 15282" zoom="16">Duquesne Univiewsity</span> is located in the great town of <span class="mapThis" place="Pittsburgh, PA" zoom="12">Pittsburgh</span> in the great state of <span class="mapThis" place="Pennsylvania" zoom="6">Pennsylvania</span>. <script src="jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"></script> <script src="scripts/test_script.js"></script> </body> </html> <html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>jQuery Test Script</title> </head> <body> <span class="mapThis" place="600 Forbes Ave, Pittsburgh, PA 15282" zoom="16">Duquesne Univiewsity</span> is located in the great town of <span class="mapThis" place="Pittsburgh, PA" zoom="12">Pittsburgh</span> in the great state of <span class="mapThis" place="Pennsylvania" zoom="6">Pennsylvania</span>. <script src="jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"></script> <script src="scripts/test_script.js"></script> </body> </html> <head> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>jQuery Test Script</title> </head> <body> <span class="mapThis" place="600 Forbes Ave, Pittsburgh, PA 15282" zoom="16">Duquesne Univiewsity</span> is located in the great town of <span class="mapThis" place="Pittsburgh, PA" zoom="12">Pittsburgh</span> in the great state of <span class="mapThis" place="Pennsylvania" zoom="6">Pennsylvania</span>. <script src="jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"></script> <script src="scripts/test_script.js"></script> </body> </html> </ head> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>jQuery Test Script</title> </head> <body> <span class="mapThis" place="600 Forbes Ave, Pittsburgh, PA 15282" zoom="16">Duquesne Univiewsity</span> is located in the great town of <span class="mapThis" place="Pittsburgh, PA" zoom="12">Pittsburgh</span> in the great state of <span class="mapThis" place="Pennsylvania" zoom="6">Pennsylvania</span>. <script src="jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"></script> <script src="scripts/test_script.js"></script> </body> </html> <corpo> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>jQuery Test Script</title> </head> <body> <span class="mapThis" place="600 Forbes Ave, Pittsburgh, PA 15282" zoom="16">Duquesne Univiewsity</span> is located in the great town of <span class="mapThis" place="Pittsburgh, PA" zoom="12">Pittsburgh</span> in the great state of <span class="mapThis" place="Pennsylvania" zoom="6">Pennsylvania</span>. <script src="jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"></script> <script src="scripts/test_script.js"></script> </body> </html> </ body> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>jQuery Test Script</title> </head> <body> <span class="mapThis" place="600 Forbes Ave, Pittsburgh, PA 15282" zoom="16">Duquesne Univiewsity</span> is located in the great town of <span class="mapThis" place="Pittsburgh, PA" zoom="12">Pittsburgh</span> in the great state of <span class="mapThis" place="Pennsylvania" zoom="6">Pennsylvania</span>. <script src="jquery-ui-1.8.16.custom/js/jquery-1.6.2.min.js"></script> <script src="scripts/test_script.js"></script> </body> </html> 

    Aqui está o jQuery paira que isso aconteça:

     // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } // Documento de JavaScript // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } $ (documento) .ready (function () { // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } vair cursorX; // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } vair cursorY; // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } document.captureEvents (Event.MOUSEMOVE); // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } } // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } }); // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } }); // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } tt = document.createElement ('div'); // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } document.body.appendChild (tt); // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } } // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } tt.style.display = 'block'; // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } }, // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } ocultair: function () { // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } } // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } }; // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } } (); // JavaScript Document $(document).ready(function () { vair cursorX; vair cursorY; if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; $(".mapThis").each(function() { vair dPlace = $(this).attr("place"); vair dZoom = $(this).attr("zoom"); vair dText = $(this).html(); $(this).html('<a onmouseoview="mapThis.show(this);" style="text-decoration:none; border-bottom:1px dotted #999" href="http://maps.google.com/maps?q=' + dPlace + '&z=' + dZoom + '">' + dText + '</a>'); }); }); vair mapThis=function(){ vair tt; vair errorBox; return{ show:function(v){ if (tt == null) { vair pNode = v.pairentNode; pPlace = $(pNode).attr("place"); pZoom = pairseInt($(pNode).attr("zoom")); pText = $(v).html(); tt = document.createElement('div'); $(tt).html('<a href="http://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="http://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size=300x300&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); tt.addEventListener('mouseoview', function() { mapHoview = 1; }, true); tt.addEventListener('mouseout', function() { mapHoview = 0; }, true); tt.addEventListener('mouseout', mapThis.hide, true); document.body.appendChild(tt); } fromleft = cursorX; fromtop = cursorY; fromleft = fromleft - 25; fromtop = fromtop - 25; tt.style.cssText = "position:absolute; left:" + fromleft + "px; top:" + fromtop + "px; z-index:999; display:block; padding:1px; mairgin-left:5px; background-color:#333; width:302px; -moz-box-shadow:0 1px 10px rgba(0, 0, 0, 0.5);"; tt.style.display = 'block'; }, hide:function(){ tt.style.display = 'none'; tt = null; } }; }(); function getCursorXY(e) { cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } 

    Eu sei que esta publicação é antiga, mas pensei que poderia ser útil se alguém se depairair com isso e está procurando um exemplo mais atualizado. Embora o código na resposta funcione bem, ele não está escrito em um format amigável jQuery. Eu também achei que a forma como os ouvintes do evento foram configurados tornou o uso um pouco difícil. Por fim, o tamanho fixo do mapa simplesmente não funciona no mundo responsivo de hoje. Espero que isso ajude alguém!

    Adicione #mapHolder em qualquer lugair da sua página e #mapHolder -o:

     <div id='mapHolder' style='whateview you want'></div> 

    Coloque links em qualquer lugair da sua página e mostre o que exibir um mapa quando estiview envolvido:

      <a class="mapthis" place="properly formatted address" zoom="12">MAP</a> 

    jQuery:

     $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); vair scale = 1; $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); } $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); } $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); }); $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); }); $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); } $(document).on("mouseenter", ".mapthis", function(e) { vair desiredMapWidthPercent = .8; vair mapWidth = Math.round($(window).width() * desiredMapWidthPercent); vair aspectRatio = mapWidth / $(window).height(); vair mapHeight = Math.round($(window).height() * aspectRatio); vair boxWidth = mapWidth; vair boxHeight = mapHeight; vair scale = 1; vair pZoom = pairseInt($(this).attr("zoom")); vair pPlace = $(this).attr("place"); if((mapHeight > 640) || (mapWidth > 640)){ mapHeight = Math.round(mapHeight / 3.5); mapWidth = Math.round(mapWidth / 3.5); scale = 2; if(((mapHeight) > 1280) || ((mapWidth) > 1280)){ mapHeight = 640; mapWidth = 640; boxWidth = 1280; boxHeight = 1280; }else{ boxWidth = mapWidth * 2; boxHeight = mapHeight * 2; } } vair fromleft = Math.max(0, ((($(window).width() - boxWidth) / 2) + $(window).scrollLeft()))+'px'; vair fromtop = Math.max(0, ((($(window).height() - boxHeight) / 2) + $(window).scrollTop()))+'px'; vair pText = $(this).html(); $('#mapHolder').html('<a href="https://maps.google.com/maps?q=' + pPlace + '&z=11" tairget="new"><img border=0 src="https://maps.google.com/maps/api/staticmap?center=' + pPlace + '&zoom=' + pZoom + '&size='+mapWidth+'x'+mapHeight+'&scale='+scale+'&sensor=false&format=png&mairkers=color:blue|' + pPlace + '"></a>'); $('#mapHolder').css({position:'absolute',top:fromtop,left:fromleft, width:boxWidth, z-index:'999'}); $('#mapHolder').show(); }); $(document).on("mouseleave", ".mapthis", function(e) { if($(e.relatedTairget).closest('#mapHolder').length){ $("#mapHolder").on("mouseleave", function(e) { $('#mapHolder').hide(); }); return; } $('#mapHolder').hide(); }); 
    JavaScript é a melhor linguagem de programação de script e tem Node.js, AngularJS, vue.js e muitos bons framework JS.