Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From what I understood, you want a tooltip visible at all times. There's the InfoBox Utility library that can create something like that. It's very flexible, which also means there are a lot of options to set. An annoyance, for example, is if the text gets too long it flows outside the box (so the width would need to be set dynamically).</p> <p>Doc: <a href="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/examples.html" rel="nofollow noreferrer">http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/examples.html</a> Download: <a href="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/src/" rel="nofollow noreferrer">http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/src/</a></p> <p>See the screenshot, if it's what you want, download infobox_packed.js and try the code below. </p> <p><img src="https://i.stack.imgur.com/E2BXu.png" alt="InfoBox example"></p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt; &lt;style type="text/css"&gt; html, body, #map_canvas { margin: 0; padding: 0; height: 100% } &lt;/style&gt; &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="infobox_packed.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var map; var mapOptions = { center: new google.maps.LatLng(0.0, 0.0), zoom: 2, mapTypeId: google.maps.MapTypeId.ROADMAP }; var count = 0; function initialize() { map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); google.maps.event.addListener(map, 'click', function (event) { addMarker(event.latLng, "index #" + Math.pow(100, count)); count += 1; }); } function addMarker(pos, content) { var marker = new google.maps.Marker({ map: map, position: pos }); marker.setTitle(content); var labelText = content; var myOptions = { content: labelText ,boxStyle: { border: "1px solid black" ,background: "white" ,textAlign: "center" ,fontSize: "8pt" ,width: "86px" // has to be set manually ,opacity: 1.0 } ,disableAutoPan: true ,pixelOffset: new google.maps.Size(-43, -50) // set manually ,position: marker.getPosition() ,closeBoxURL: "" ,pane: "floatPane" ,enableEventPropagation: true }; var ibLabel = new InfoBox(myOptions); ibLabel.open(map); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="map_canvas"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload