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

Joanne Cook j.cook at oxfordarch.co.uk
Thu Aug 9 03:56:25 EDT 2007


Hi Christopher,

Thanks for explaining this to me. While it is entirely possible that marker.js was modified (without my knowledge- I had someone helping me with the map a while back) I can absolutely guarantee that the compressed version was built *after* that happened. 

Having said that, if there is a copy of OpenLayers.js in the build folder already (as there is when it shipped) is it possible that the build process does *not* overwrite that if the user doesn't have enough permissions (ie on Ubuntu)?

Can I get away with just changing the values in the line that you have pointed out?

Regarding the difference between 2.3 and 2.4- I will make the changes that you suggested. 

Many thanks for your help!

Jo

-----------------------------------------------------
Joanne Cook
Information Systems Coordinator
Oxford Archaeology (North)
01524 541000
http://thehumanjourney.net

----- Original Message -----
From: "Christopher Schmidt" <crschmidt at metacarta.com>
To: "Joanne Cook" <j.cook at oxfordarch.co.uk>
Cc: users at openlayers.org
Sent: 08 August 2007 17:33:34 o'clock (GMT) Europe/London
Subject: Re: [OpenLayers-Users] single file library distorts size of markers?

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


 


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com




------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://openarchaeology.net/iso26300 for more information.




More information about the Users mailing list