[OpenLayers-Users] OpenLayers Book

Christopher Schmidt crschmidt at metacarta.com
Wed Jan 14 11:13:15 EST 2009


On Wed, Jan 14, 2009 at 09:15:55AM -0600, David Fawcett wrote:
> To me, an area of documentation that would be very useful would be the
> higher level stuff.  (e.g. What are the current best practices?
> [vector layer with markers vs. marker layer] , How do all of these
> contexts, strategies, etc. fit together and when would you use them?)
> I can often/sometimes hack something together that works, but is it
> really the best way to do it?

Part of the reason for this type of documentation not existing yet is
because there is n best practice here. At the moment, strategies,
protocols, etc. are not a strongly represented part of our API, but we
have a dichotomy: People who are looking forward know that strategies
and protocols will be the way to go, but people who want to write code
right now have the possibility to get screwed by changes we make in the
formats/protcols. (I dno't think it's likely, but it is possible.)

I started work on a comparison of when/why you would use vectors vs.
markers:

  http://docs.openlayers.org/library/overlays

A month ago or so. The cnofusion between markers and vectors is probably
one of our bigger stumbling blocks for users getting slightly beyond the
'newbie' level. 

A short paragraph from that doc that is relevant, for example:

 "In general, the Vector layer provides more capabilities, with the
 ability to draw lines, polygons, and more. The Vector-based Layers are
 better maintained, and are the place where most new OpenLayers
 development is taking place. There is more support for various styling
 options, and more configurability over layer behavior and interactions
 with remote servers.

 However, the Markers layer is maintained for backwards compatibility,
 because there are some things you can not do with vectors as they are
 currently implemented, and they provide a different type of interface
 for event registration."

That type of text doesn't exist outside that document, I dn't think, and
(I think) it may be valuable in answering questions like this. 

I'm assuming this is the kind of prose documentation you feel the
OpenLayers project is currently lacking in some cases.

I think one way to have a developer tell you "Is this the right way to
do it" is to write up prose description of what you did, probably in a
wikipage, and ask for feedback. I'm much more likely to look at
something like that -- because it can feed directly into docs -- than I
am to look at your applicatino code and offer a code review. 

Best Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list