Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I encountered this same problem. Google appears to have recently changed their api to make the base map labels "clickable" and there is not yet a simple API call to disable their clickablility. <a href="http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/f1ac9ad4da3606fe" rel="noreferrer">http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/f1ac9ad4da3606fe</a></p> <p>I would like to see google add a simple map option like this, but alas it doesn't exist yet</p> <pre><code>var opts = { clickableLabels:false }; var map = new maps.google.com.map(div,opts); </code></pre> <p>The following solution works, but because it relies on custom styled map tiles, free maps are limited to (2,500 maps loads per day) - <a href="http://code.google.com/apis/maps/faq.html" rel="noreferrer">See Google Maps FAQ</a>.</p> <pre><code>function initialize() { // For more details see // http://code.google.com/apis/maps/documentation/javascript/styling.html var noPOILabels = [ { featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" } ] } ]; // Create a new StyledMapType object, passing it the array of styles, // as well as the name to be displayed on the map type control. var noPOIMapType = new google.maps.StyledMapType(noPOILabels, {name: "NO POI"}); // Create a map object, and include the MapTypeId to add // to the map type control. var mapOptions = { zoom: 11, center: new google.maps.LatLng(55.6468, 37.581), mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'no_poi'] } }; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); //Associate the styled map with the MapTypeId and set it to display. map.mapTypes.set('no_poi', noPOIMapType); map.setMapTypeId('no_poi'); } </code></pre>
    singulars
    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. 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