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

Roald de Wit rdewit at users.sourceforge.net
Tue Mar 11 00:55:54 EDT 2008


Hi Lance,

On Sun, 2008-03-09 at 13:38 -0500, Lance Dyas wrote:
> In OpenLayers nightly Trunk
> http://www.dyasdesigns.com/geoxml/kml-point-layer.html
> 
> in Google Maps
> http://www.dyasdesigns.com/geoxml/japan.htm
> 
Thank you for reporting this. I've created a ticket [1] and attached a
patch that solves part of your problem.

The KML styling code did not properly handle hotSpot nodes. That should
be fixed in the patch. Hopefully this fix will make it into 2.6.

In your case, you need to change your KML styles a bit. This is because
your icons are 64x64 pixels and OL has no way of knowing this.
You can do one of the following:
- set the <w> and <h> value within <Icon> to 64
- set the hotspot units to 'fraction' and set <x> to 0.5

Hope this helps.

Regards, Roald

[1] http://trac.openlayers.org/ticket/1426
-- 
Roald de Wit
Software Engineer
roald.dewit at lisasoft.com

Commercial Support for Open Source GIS Software
http://lisasoft.com/LISAsoft/SupportedProducts/




More information about the Dev mailing list