[OpenLayers-Users] FW: OpenLayers Beginners Questions

Christopher Schmidt crschmidt at metacarta.com
Sun Jun 17 08:04:23 EDT 2007


On Sun, Jun 17, 2007 at 02:11:40PM +1000, Gerd Dowideit wrote:
> Sorry, had problems with sending this. Gerd
> 
>   _____  
> 
> From: Gerd Dowideit [mailto:gdowidei at bigpond.net.au] 
> Sent: Sunday, June 17, 2007 1:58 PM
> To: 'users at openlayers.org'
> Subject: OpenLayers Beginners Questions
> 
> 
> Hi All,
> I am exploring OpenLayers since a few days and encounter typical beginners
> problems:
> 
> 1.	
> 
> 	Trying to make use of "Class Documentation"
> (http://dev.openlayers.org/docs/overview-tree.html
> <blocked::http://dev.openlayers.org/docs/overview-tree.html> ): the docu is
> fine, but I do miss information about 'what each entry is good for' and
> brief examples about 'how to make use'. A list ordered by purpose of classes
> and functions would also be good. Is there such a list which I have not
> found yet?

Each item in the documentation *should* have a chunk of text explaining
what it's good for, like this:

 http://dev.openlayers.org/docs/OpenLayers/Layer/WMS.html#getFullRequestString

Some don't have one because they're seen as 'obvious'.

Others don't have one because they're sipmly not complete. 

I'm assuming that this is what you're looking for: if so, then the
answer is probably "no, there is nothing like what you are looking for",
but http://openlayers.org/dev/examples/ is probably helpful, if you
haven't found that yet. 

Note that there are also two significant changes coming in
documentation: 
 * http://openlayers.org/pipermail/dev/2007-June/000851.html
   Creating examples TOC Sorted by title and by function/method type.
 * http://openlayers.org/pipermail/dev/2007-June/000854.html
   Improving the class reference documentation, which is currently
   segfaulting our documentation generator, resulting in hugely lacking
   documentation.

There are links from each of those emails with some documentation stuff
that will be more useful once it's complete, and I'm working hard on
getting it there.

> 2.	
> 
> 	Problem with "var pointLayer = new OpenLayers.Layer.Vector("Point
> Layer");" and similar (Line and Polygon): All draw controls seem to draw
> points and vertices south-east of where the mouse-click occurred by about
> 1/2 of the diameter of the drawn Point-Circle. That means all drawn features
> are miss-placed. Is this a bug or is it just that I do use the draw feature
> wrongly? Source attached below. The website is at this stage not public for
> administrative reasons; sorry.

Internet Explorer has problems with its 'box model': the 3px border
you're putting on your map is causing the browser to incorrectly report
your mouse position relative to the map. If you remove that border, this
will be fixed: you can instead create a slightly more complicated map
setup, with the map div inside another div which does have a border,
rather than putting it directly on a map.

Erik, this is a bug we might be able to work around, can you file a
ticket for 2.6 to look at this? Gerd, if you or anyone want to submit a
patch before that, then it should be able to make it into 2.5. The
function to look into is OpenLayers.Events.getMousePosition(). 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list