Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think, you would be comfortable to use a <a href="https://developers.google.com/maps/documentation/javascript/overlays?hl=en#Polylines" rel="nofollow">Polyline</a>.</p> <p>Try this variant:</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;meta charset="utf-8"&gt; &lt;title&gt;Complex polylines&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="https://developers.google.com/maps/documentation/javascript/examples/default.css"&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"&gt;&lt;/script&gt; &lt;script&gt; var poly; var map; function initialize() { var chicago = new google.maps.LatLng(18.210885,-67.140884); var mapOptions = { zoom: 20, center: chicago, mapTypeId: google.maps.MapTypeId.SATELLITE }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var lineCoordinates = [ new google.maps.LatLng(18.210885,-67.140884), new google.maps.LatLng(18.211685,-67.141114), new google.maps.LatLng(18.211685,-67.141684) ]; var polyOptions = { path: lineCoordinates, strokeColor: '#dd4b39', strokeOpacity: 1.0, strokeWeight: 5 } poly = new google.maps.Polyline(polyOptions); poly.setMap(map); for (i = 0; i &lt;= lineCoordinates.length; i++) { if (lineCoordinates[i] !== undefined) { new google.maps.Marker({ position: lineCoordinates[i], title: 'some title', map: 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.
    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