Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm currently working on the exact same thing and, in my case, I could directly edit the KML file. If you have access to it and can edit it, here's what I did:</p> <p>1) Right under <code>&lt;document&gt;</code> tag, paste something like this:</p> <pre><code>&lt;Style id="desired_id"&gt; &lt;IconStyle&gt; &lt;Icon&gt; &lt;href&gt;http://www.yourwebsite.com/your_preferred_icon.png&lt;/href&gt; &lt;scale&gt;1.0&lt;/scale&gt; &lt;/Icon&gt; &lt;/IconStyle&gt; &lt;/Style&gt; </code></pre> <p>The <code>scale</code> parameter is not supported in Google Maps at the moment. Here you can check all supported elements of KML in Google Maps:</p> <p><a href="http://code.google.com/intl/en-EN/apis/kml/documentation/kmlelementsinmaps.html" rel="nofollow">http://code.google.com/intl/en-EN/apis/kml/documentation/kmlelementsinmaps.html</a></p> <p>And here you've got some info about compatibility between KML and GMaps: </p> <p><a href="http://code.google.com/intl/en-EN/apis/kml/documentation/mapsSupport.html" rel="nofollow">http://code.google.com/intl/en-EN/apis/kml/documentation/mapsSupport.html</a></p> <p>2) Once you've defined you're style, you can refer to it on each Placemark item by adding the following to it:</p> <pre><code>&lt;styleUrl&gt;#desired_id&lt;/styleUrl&gt; </code></pre> <p>Now, all your placemarks should display showing your custom icon.</p> <p>Hope it helps.</p> <p><strong>EDIT:</strong> Sorry I didn't see the <strong>on click</strong> part. This isn't quite what you need then. I'll leave it in case it helps someone else. Sorry for that.</p>
    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. This table or related slice is empty.
    1. 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