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

Add event to get reference on drawcontrol #49

Merged
merged 2 commits into from Dec 11, 2013

Conversation

leplatrem
Copy link
Collaborator

No description provided.

@leplatrem
Copy link
Collaborator Author

@demiurg what do you think of this ?

  • It does not add a global event
  • It gives a way to detect all fields added to the map
  • It has tests

In your case, it would be simple as that :


$(window).on("map:init", function (e) {
   var map = e.map;
   map.on('map:loadfield', function () {
       map.drawControl.setDrawingOptions(...);
   });
});

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 83ddb79 on add_event_to_get_reference_on_drawcontrol into 5351cb4 on master.

@demiurg
Copy link

demiurg commented Dec 11, 2013

This would work great, thank you!

@leplatrem
Copy link
Collaborator Author

Ok then, I merge !

leplatrem added a commit that referenced this pull request Dec 11, 2013
…n_drawcontrol

Add event for field to get reference on drawcontrol
@leplatrem leplatrem merged commit f42751f into master Dec 11, 2013
@leplatrem leplatrem deleted the add_event_to_get_reference_on_drawcontrol branch December 11, 2013 15:57
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

3 participants