[OpenLayers-Dev] bad misaligning of KML point layers?

Lance Dyas lancelot at inetnebr.com
Tue Mar 11 09:56:12 EDT 2008


For google earth scale feels like the dominant element of how it 
renders... whatever the images
pixel x pixel dimension.. 

The KML parsing code built in to the API's GGeoXml is server side at google
so I am uncertain what magic it does I do know it isnt always perfect 
and doesnt
even always find the marker styles correctly.

And creating custom Markers are very persnickety in the Google Maps API
as an image map to indicate the clickable parts has to be created 
explicitly for
most browsers but IE uses the images transparency.

There was even a fairly recent error where the default icon became 
unclickable
in IE6 for what seemed like nearly a week

The extensions to the google api where people make there own kml parsers
have a basic over-ride where they can define a default icon of there own
and which the the hotspots etc are all defined by.

Not certain what is wise ... there are tricks... pre-load an image and 
it will give
you its dimensions perhaps this could be leveraged

var aimg = new Image();
aimg.src = "http://maps.google.com/mapfiles/kml/paddle/purple-stars.png";
aimg.onload= function () { alert(aimg.height); }

Roald de Wit wrote:
> On Tue, 2008-03-11 at 17:14 +1100, Roald de Wit wrote:
>   
>> I created another patch that assumes that all Icon urls starting with
>> http://maps.google.com/mapfiles/kml have 64x64 icons.
>> Can anybody confirm/deny the validity of this assumption btw?
>>     
>
> I can confirm myself that the above is not true. The following url has a
> 32x32 icon:
> http://maps.google.com/mapfiles/kml/pal4/icon28.png
>
> But, since the scale halves the size of the icon that just got doubled
> in size, it effectively stays the same and the positioning still works,
> unless one uses a hotspot with a offset in pixels for that icon.
>
> What is a wise thing to do here?
>
> Regards, Roald
>
>   




More information about the Dev mailing list