On 22 June 2012 12:17, az az <
left...@bgnet.bg> wrote:
> Now the arrow is a bit misplaced compared to the pin. It must be on top of
> it instead.
>
> The eye icon calls this:
>
> onclick="addMarker(53.82606610334190123,-1.50467414437569991);
>
> and these are the coordinates in the kmz file for this pin as well:
>
> <Placemark><name>LS82JB</name>
> <description>LS82JB</description>
> <styleUrl>#a2</styleUrl>
> <Point><coordinates>-1.50467414437569991,53.82606610334190123,0</coordinates></Point>
> </Placemark>
>
> The question is why the kmz is not positioned correctly on the map and a
> marker is?
The relationship between the two markers (the small golf-ball and the
large arrow) remains constant no matter how the zoom level is altered.
That means that the two markers are anchored to the same location on
the map, but the anchor-point of one or both of them is not in the
obvious place.
Either your large arrow does not have its anchor-point specified at
its tip, or your numbered marker doesn't have its anchor-point at its
tip, or both.
KML generally assumes that the anchor-point is in the middle at the
bottom, so that marker is probably right.
The image you use for your large arrow does appear to have a large
amount of white space between the arrow and the bottom border, so the
API is doing its best -- it's assumed that the anchor-point is at the
centre of the bottom edge. To use an arrow image like yours, you need
to fully specify the MarkerImage in order that you define the anchor
point.
https://developers.google.com/maps/documentation/javascript/reference#MarkerImage