Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better event and feature handling #16

Merged
merged 6 commits into from
May 6, 2012
Merged

Better event and feature handling #16

merged 6 commits into from
May 6, 2012

Conversation

vmx
Copy link
Member

@vmx vmx commented Apr 22, 2012

This pull requests leads to better event handling and also support for features

The Map Object now contains a reference to the current projection
of the map, and the displayed projection. Both are EPSG identifiers
stored as strings.
Add the layer to OpenLayers after everything within MapQuery
was set properly.
It was a mistake to automatically jQuery events based on the
OpenLayers events. They contained data from OpenLayers which
wasn't nicely wrapped into MapQuery.

Now the "addlayer" event contains the MapQuery layer, not
the OpenLayers one. The same is true for the "removelayer"
event.
There was the one() function, to bind an event only once.
It wasn't used and it's always good to prevent the API
from being bloated. It even had no documentation.
Currentlt all events that OpenLayers triggers from
OpenLayers.Map and OpenLayers.Layer are either wrapped
or removed with a good reason. See the inline comments
for more information.

The events from OpenLayers.Layer.Vector aren't wrapped yet.

All events that are triggered on a layer, also trigger those
events on the map, but with the layer that triggered it included.
MapQuery now supports features. This means that you can retreive,
add, remove or select them. The corresponding events are fired,
which are: (pre)addfeature, (pre)remove, (un)selectfeature

This is a huge commits that also updates the tests and widgets.
@h0st1le
Copy link
Contributor

h0st1le commented May 3, 2012

Volker, some really nice changes in here. Cheers +1

@vmx
Copy link
Member Author

vmx commented May 6, 2012

I haven't heard anything bad, but only good things about this pull request. Hence I dare to merge it :)

vmx added a commit that referenced this pull request May 6, 2012
Better event and feature handling
@vmx vmx merged commit 26a9be0 into mapquery:master May 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants