Vector Diffs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Vector Diffs

Christopher Schmidt-2
Tonight, I went through
svn diff http://svn.openlayers.org/trunk/openlayers/lib/
http://svn.openlayers.org/sandbox/vector-2.4/lib/  and looked at every
line.

Follows is a summary of changes to the existing OpenLayers code. The only
non-documentation/functional changes to existing files were:

Events:
OpenLayers/Events.js
Added registerPriority function, which puts a listener at the beginning of
the list.

OpenLayers/Control.js
 * Added activate/deactivate methods which set active flag and return
   true or false depending on whether the state has changed.
 * Calculate a default displayClass:
   this.displayClass = this.CLASS_NAME.replace("OpenLayers.",
                                    "ol").replace(".","");
 * Added OpenLayers.Control.TYPE_BUTTON, TYPE_TOOL constants for
   building toolbar controls.
 * setMap will now call setMap on any handler property on the control.

OpenLayers/Map.js
default controls changed from using MouseDefaults to using Navigation
control.

OpenLayers/Ajax.js
If given a 'postBody' parameter, the content-type is no longer set to
x-www-form-encoded. This allows us to post WFS data. x-www-form-encoded
data can still be passed using parameters and setting 'method' to 'post'.  

OpenLayers/BaseTypes.js
Add an 'extend' method to Bounds().

OpenLayers/Layer/WFS.js -- still working on this one.

The rest of the changes are either:
 * New files
 * Only documentation changes.

In total, changes in existing files account for only ~50 lines of code.
The rest of the changes are described here.


Controls:


OpenLayers/Control/EditingToolbar.js -- New file.
OpenLayers/Control/DrawFeature.js -- New file.
OpenLayers/Control/DragPan.js -- new file. Used by navigation control.
OpenLayers/Control/ZoomToMaxExtent.js -- new file. demo of 'button' functionality.
OpenLayers/Control/SelectFeature.js -- new file.
OpenLayers/Control/ZoomBox.js -- new file. used by Navigation control.
OpenLayers/Control/Panel.js -- new file. Used for building toolbars
                               (navtoolbar,editingtoolbar)

OpenLayers/Control/MouseDefaults.js -- added deprecation warning.
OpenLayers/Control/MouseToolbar.js -- added deprecation warning.

OpenLayers/Control/Scale.js
OpenLayers/Control/OverviewMap.js
OpenLayers/Control/MousePosition.js
OpenLayers/Control/Permalink.js
Modified classNames to use new 'this.displayClass', so constants like
'olControlOverviewMapElement' can now be overridden by setting displayClass
as an option on the layer. No functional changes.

OpenLayers/Control/KeyboardDefaults.js
Refactored to use Handlers. (Since this has never been released, changing
the internals is not painful.)

OpenLayers/Control/Navigation.js -- replaces MouseDefaults.
OpenLayers/Control/NavToolbar.js -- replaces MouseToolbar.


OpenLayers/Renderer.js
OpenLayers/Renderer/Elements.js
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/VML.js
New files to support vector drawing. Used by Layer.Vector and its
subclasses. Renderer/Elements is a subclass of SVG/VML, used to capture the
similiarities inherent in element-based renderers.


Handlers:

OpenLayers/Handler.js
OpenLayers/Handler/Polygon.js
OpenLayers/Handler/Box.js
OpenLayers/Handler/Keyboard.js
OpenLayers/Handler/Path.js
OpenLayers/Handler/Point.js
OpenLayers/Handler/Drag.js
OpenLayers/Handler/Select.js
OpenLayers/Handler/MouseWheel.js

As part of evaluation of the MouseListener code, we realized that there is
a level of abstraction that was not really well defined in the code.
Essentially, there are a number of core events -- like drawing a box,
dragging the mouse, and drawing point/path/polygon features -- below the level
of the "Controls". In order to make developing controls more modular and
easier, we've migrated this functionality into a set of handlers which
encapsulates these methods. As described in a mailing list post, this has
made things like MouseDefaults a trivial control using these handlers.

-- http://trac.openlayers.org/wiki/Handlers


Formats:

OpenLayers/Format.js
OpenLayers/Format/GML.js -- full read/write
OpenLayers/Format/WFS.js -- subclass of GML, WFS-T writing
OpenLayers/Format/KML.js -- read only
OpenLayers/Format/GeoRSS.js -- write only

Formats define two methods: a 'read' and 'write'. read takes some data --
string, XML document, etc. -- and returns a list of features. KML and
GeoRSS are partial implementations as part of a proof of concept, and can
be finished via interested parties. Formats are new in the vector-2.4
branch.  

Geometries:

OpenLayers/Geometry.js
OpenLayers/Geometry/Curve.js
OpenLayers/Geometry/MultiPoint.js
OpenLayers/Geometry/Rectangle.js
OpenLayers/Geometry/Polygon.js
OpenLayers/Geometry/Surface.js
OpenLayers/Geometry/MultiLineString.js
OpenLayers/Geometry/Point.js
OpenLayers/Geometry/LinearRing.js
OpenLayers/Geometry/Collection.js
OpenLayers/Geometry/LineString.js
OpenLayers/Geometry/MultiPolygon.js

Geometries store geographic information. Features have geometries. (You
can't draw a geometry: you draw a feature, which has a geometry and style.)


OpenLayers/Feature/Vector.js
Subclass of Feature specifically for Vector rendering.

Layers:
OpenLayers/Layer/Vector.js -- Simple base class. Allows for drawing of
 features directly.  
OpenLayers/Layer/GML.js -- Load remote data, parse it based on the chosen
  parser, and display it as vectors. (This means it is also Layer.KML,
  by changing the format in use.)

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Vector Diffs

Erik Uzureau-3
On 3/14/07, Christopher Schmidt <[hidden email]> wrote:

> Tonight, I went through
> svn diff http://svn.openlayers.org/trunk/openlayers/lib/
> http://svn.openlayers.org/sandbox/vector-2.4/lib/  and looked at every
> line.
>
> Follows is a summary of changes to the existing OpenLayers code. The only
> non-documentation/functional changes to existing files were:
>
> Events:
> OpenLayers/Events.js
> Added registerPriority function, which puts a listener at the beginning of
> the list.
>
> OpenLayers/Control.js
>  * Added activate/deactivate methods which set active flag and return
>    true or false depending on whether the state has changed.
>  * Calculate a default displayClass:
>    this.displayClass = this.CLASS_NAME.replace("OpenLayers.",
>                                     "ol").replace(".","");
>  * Added OpenLayers.Control.TYPE_BUTTON, TYPE_TOOL constants for
>    building toolbar controls.
>  * setMap will now call setMap on any handler property on the control.
>
> OpenLayers/Map.js
> default controls changed from using MouseDefaults to using Navigation
> control.

This is the only item in this entire list that peaks my interest. I'm
wondering if
for any reason this might cause problems for some people? Anyone out
there in the community see any danger in this? I have no technical justification
for this curiosity, it just makes me nervous is all.



> OpenLayers/Ajax.js
> If given a 'postBody' parameter, the content-type is no longer set to
> x-www-form-encoded. This allows us to post WFS data. x-www-form-encoded
> data can still be passed using parameters and setting 'method' to 'post'.
>
> OpenLayers/BaseTypes.js
> Add an 'extend' method to Bounds().
>
> OpenLayers/Layer/WFS.js -- still working on this one.
>
> The rest of the changes are either:
>  * New files
>  * Only documentation changes.
>
> In total, changes in existing files account for only ~50 lines of code.
> The rest of the changes are described here.
>
>
> Controls:
>
>
> OpenLayers/Control/EditingToolbar.js -- New file.
> OpenLayers/Control/DrawFeature.js -- New file.
> OpenLayers/Control/DragPan.js -- new file. Used by navigation control.
> OpenLayers/Control/ZoomToMaxExtent.js -- new file. demo of 'button' functionality.
> OpenLayers/Control/SelectFeature.js -- new file.
> OpenLayers/Control/ZoomBox.js -- new file. used by Navigation control.
> OpenLayers/Control/Panel.js -- new file. Used for building toolbars
>                                (navtoolbar,editingtoolbar)
>
> OpenLayers/Control/MouseDefaults.js -- added deprecation warning.
> OpenLayers/Control/MouseToolbar.js -- added deprecation warning.
>
> OpenLayers/Control/Scale.js
> OpenLayers/Control/OverviewMap.js
> OpenLayers/Control/MousePosition.js
> OpenLayers/Control/Permalink.js
> Modified classNames to use new 'this.displayClass', so constants like
> 'olControlOverviewMapElement' can now be overridden by setting displayClass
> as an option on the layer. No functional changes.
>
> OpenLayers/Control/KeyboardDefaults.js
> Refactored to use Handlers. (Since this has never been released, changing
> the internals is not painful.)
>
> OpenLayers/Control/Navigation.js -- replaces MouseDefaults.
> OpenLayers/Control/NavToolbar.js -- replaces MouseToolbar.
>
>
> OpenLayers/Renderer.js
> OpenLayers/Renderer/Elements.js
> OpenLayers/Renderer/SVG.js
> OpenLayers/Renderer/VML.js
> New files to support vector drawing. Used by Layer.Vector and its
> subclasses. Renderer/Elements is a subclass of SVG/VML, used to capture the
> similiarities inherent in element-based renderers.

Just a small note for the record -- Renderer.Elements is a
*super*class of SVG/VML :-)


>
> Handlers:
>
> OpenLayers/Handler.js
> OpenLayers/Handler/Polygon.js
> OpenLayers/Handler/Box.js
> OpenLayers/Handler/Keyboard.js
> OpenLayers/Handler/Path.js
> OpenLayers/Handler/Point.js
> OpenLayers/Handler/Drag.js
> OpenLayers/Handler/Select.js
> OpenLayers/Handler/MouseWheel.js
>
> As part of evaluation of the MouseListener code, we realized that there is
> a level of abstraction that was not really well defined in the code.
> Essentially, there are a number of core events -- like drawing a box,
> dragging the mouse, and drawing point/path/polygon features -- below the level
> of the "Controls". In order to make developing controls more modular and
> easier, we've migrated this functionality into a set of handlers which
> encapsulates these methods. As described in a mailing list post, this has
> made things like MouseDefaults a trivial control using these handlers.
>
> -- http://trac.openlayers.org/wiki/Handlers
>
>
> Formats:
>
> OpenLayers/Format.js
> OpenLayers/Format/GML.js -- full read/write
> OpenLayers/Format/WFS.js -- subclass of GML, WFS-T writing
> OpenLayers/Format/KML.js -- read only
> OpenLayers/Format/GeoRSS.js -- write only
>
> Formats define two methods: a 'read' and 'write'. read takes some data --
> string, XML document, etc. -- and returns a list of features. KML and
> GeoRSS are partial implementations as part of a proof of concept, and can
> be finished via interested parties. Formats are new in the vector-2.4
> branch.
>
> Geometries:
>
> OpenLayers/Geometry.js
> OpenLayers/Geometry/Curve.js
> OpenLayers/Geometry/MultiPoint.js
> OpenLayers/Geometry/Rectangle.js
> OpenLayers/Geometry/Polygon.js
> OpenLayers/Geometry/Surface.js
> OpenLayers/Geometry/MultiLineString.js
> OpenLayers/Geometry/Point.js
> OpenLayers/Geometry/LinearRing.js
> OpenLayers/Geometry/Collection.js
> OpenLayers/Geometry/LineString.js
> OpenLayers/Geometry/MultiPolygon.js
>
> Geometries store geographic information. Features have geometries. (You
> can't draw a geometry: you draw a feature, which has a geometry and style.)
>
>
> OpenLayers/Feature/Vector.js
> Subclass of Feature specifically for Vector rendering.
>
> Layers:
> OpenLayers/Layer/Vector.js -- Simple base class. Allows for drawing of
>  features directly.
> OpenLayers/Layer/GML.js -- Load remote data, parse it based on the chosen
>   parser, and display it as vectors. (This means it is also Layer.KML,
>   by changing the format in use.)
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev
>
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Vector Diffs

Schuyler Erle-2
On Wed, 2007-03-14 at 23:52 -0600, Erik Uzureau wrote:

> >
> > OpenLayers/Map.js
> > default controls changed from using MouseDefaults to using Navigation
> > control.
>
> This is the only item in this entire list that peaks my interest. I'm
> wondering if
> for any reason this might cause problems for some people? Anyone out
> there in the community see any danger in this? I have no technical justification
> for this curiosity, it just makes me nervous is all.

My take on this is that Control.Navigate is supposed to provide *at
least* as much functionality as Control.MouseDefaults. I think our
regular testing and release cycle will quickly demonstrate whether this
is a good idea or not -- so we'll know well before we release 2.4 for
good.

SDE

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Vector Diffs

Erik Uzureau-3
On 3/15/07, Schuyler Erle <[hidden email]> wrote:

> On Wed, 2007-03-14 at 23:52 -0600, Erik Uzureau wrote:
> > >
> > > OpenLayers/Map.js
> > > default controls changed from using MouseDefaults to using Navigation
> > > control.
> >
> > This is the only item in this entire list that peaks my interest. I'm
> > wondering if
> > for any reason this might cause problems for some people? Anyone out
> > there in the community see any danger in this? I have no technical justification
> > for this curiosity, it just makes me nervous is all.
>
> My take on this is that Control.Navigate is supposed to provide *at
> least* as much functionality as Control.MouseDefaults. I think our
> regular testing and release cycle will quickly demonstrate whether this
> is a good idea or not -- so we'll know well before we release 2.4 for
> good.

Right, I guess my vague worry is that people have somehow built something
that not only relies on subclassing MouseDefaults or something like that, but
in some way relies on that being a default control.

I dunno. I may be out of my mind. At any rate, though, you're right. This worry
is not a reason to prevent the merge. It will come out in the release process.
:-)

e
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Vector Diffs

Christopher Schmidt-2
On Thu, Mar 15, 2007 at 12:55:01AM -0600, Erik Uzureau wrote:

> On 3/15/07, Schuyler Erle <[hidden email]> wrote:
> >My take on this is that Control.Navigate is supposed to provide *at
> >least* as much functionality as Control.MouseDefaults. I think our
> >regular testing and release cycle will quickly demonstrate whether this
> >is a good idea or not -- so we'll know well before we release 2.4 for
> >good.
>
> Right, I guess my vague worry is that people have somehow built something
> that not only relies on subclassing MouseDefaults or something like that,
> but
> in some way relies on that being a default control.
>
> I dunno. I may be out of my mind. At any rate, though, you're right. This
> worry
> is not a reason to prevent the merge. It will come out in the release
> process.
> :-)

I had the same thought, but then I looked back and realized that every
time I've documented how to do subclassing or the like off of
MouseDefaults, I've told them to create their own control first. In my
mind, what's in the default controls on the map is not under the user's
control -- if they want it, they need to override it.

I've added the change -- and how to revert to old behavior -- to
http://trac.openlayers.org/wiki/Release/2.4/Notes 

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev