[OpenLayers-Users] single file library distorts size of markers?

Christopher Schmidt crschmidt at metacarta.com
Wed Aug 8 12:33:34 EDT 2007


On Wed, Aug 08, 2007 at 11:32:14AM +0100, Joanne Cook wrote:
> Hi List,
> 
> I am experimenting with the compressed single file version of OpenLayers and have come across a couple of issues with the size of the markers I use for wfs. I'm sure there's a simple reason for it but I can't figure it out.
> 
> I have replaced the default marker (/img/marker.png) with a custom one, and when I use the compressed library it makes the marker much larger. To see this behaviour in the examples below, please zoom in far enough to swap from wms to wfs- it's quite clear when the markers change. 
> 
> http://mapdata.thehumanjourney.net/index_nocomp_gs.html uses the non-compressed library (OL2.3)
> http://mapdata.thehumanjourney.net/index_comp_gs.html uses the compressed library (OL2.3)


> The only difference between the two is that the non compressed version uses the /lib/OpenLayers.js and the compressed one uses OpenLayers.js.

This isn't true.

The non-compressed version uses a modified version of Marker.js:
specifically, the size of the default icon is changed from 21,25 to 15,
15. Presumably, the compressed version was built prior to making this
change, since line 471 has "21,25" in it in the appropriate code.

Rebuild your compressed library, and check to make sure that the string
'15,15' is in it somewhere, and that '21,25' is not.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list