batch change placemark icon

5,192 views
Skip to first unread message

Bob Christensen

unread,
Sep 18, 2010, 2:08:57 PM9/18/10
to KML Developer Support - Getting Started with KML
Hi,

I have a .kmz file that includes 400 placemarks linked to photos. I
would like to change the icon for all the placemarks in a batch
operation but I can't figure out how to do that. Please help.

Thanks,

bob

Geobrowser

unread,
Sep 23, 2010, 11:56:53 AM9/23/10
to KML Developer Support - Getting Started with KML
Depending how clean you want to keep your code, you can edit in one of
two ways:

In GE:
- open your KMZ
- right-click on the container (Document or Folder) in which your
placemarks are located
- select properties (get info on Mac)
- under the Style tab there should be an option to "share style"
- click this option and you'll now be able to give everything the same
color/size/opacity of icon and label
- save edited file

In Text Editor:
- unzip KMZ
- open the KML doc in a text editor
- create a piece of Style code, e.g.,

<Style id="mynewpin">
<IconStyle>
<scale>1.3</scale>
<color>ff00ddff</color>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</
href>
</Icon>
</IconStyle>
</Style>

- then you need to make sure each placemark includes the line
<styleUrl>#mynewpin</styleUrl> ....quickly done using copy/paste and
find/replace options.

JB
Reply all
Reply to author
Forward
0 new messages