Ticket #2511 (closed feature: wontfix)

Opened 3 years ago

Last modified 2 years ago

Ability to use the Measure control with a point handler

Reported by: fvanderbiest Owned by: fvanderbiest
Priority: minor Milestone:
Component: Control.Measure Version: SVN
Keywords: Cc:
State: Needs Discussion

Description

Currently, getBestArea is called even if we use the Measure control with a point handler. This does not make sense. A patch is attached.

Attachments

openlayers_2511_A0.diff Download (0.7 KB) - added by fvanderbiest 3 years ago.
openlayers_2511_A1.diff Download (7.8 KB) - added by elemoine 3 years ago.

Change History

Changed 3 years ago by fvanderbiest

  Changed 3 years ago by elemoine

  • state changed from Review to Needs More Work

map.getUnits() should be used in place of map.units.

Changed 3 years ago by elemoine

  Changed 3 years ago by elemoine

  • state changed from Needs More Work to Review

openlayers_2511_A1.diff Download makes use of displayProjection should the user wants a specific projection for the position value, modifies the API doc strings as needed, modifies the measure.html example to demonstrate the new feature, and provides unit tests for the measure function. The tests pass in IE8, FF3 and Chromium 5. The measure.html works in these browsers.

fvanderbiest, tell me if this new patch works for you. I'll wait for a few days before committing this patch, in case someone else would like to review it.

Thanks fvanderbiest for the initial patch.

  Changed 3 years ago by fvanderbiest

  • owner changed from tschaub to fvanderbiest
  • status changed from new to assigned

Patch A1 works great. Thanks for the added value, Eric.

follow-up: ↓ 5   Changed 3 years ago by tschaub

It strikes me as a little odd that a point could be measured (the MousePosition control seems more appropriate for this), but I don't want to keep this out if others find it sensible.

And, I assume (but haven't verified) that the displayProjection option plays well with the geodesic option.

in reply to: ↑ 4   Changed 3 years ago by fvanderbiest

Replying to tschaub:

It strikes me as a little odd that a point could be measured (the MousePosition control seems more appropriate for this), but I don't want to keep this out if others find it sensible.

I see your point Tim, but the mousePosition control does not enable drawing of a vector feature, nor is it possible to freeze the measurement at some point. In our case, having a point feature drawn on click is useful, because it enables the user to see where the position measurement was taken.

  Changed 3 years ago by bartvde

  • milestone changed from 2.10 Release to 2.9 Release

  Changed 3 years ago by elemoine

  • state changed from Review to Needs Discussion
  • milestone changed from 2.9 Release to 2.10 Release

This one can be bumped to 2.10 from my perspective.

  Changed 2 years ago by erilem

  • status changed from assigned to closed
  • resolution set to wontfix
  • milestone 2.11 Release deleted

We decided to go another path. Closing as wontfix.

Note: See TracTickets for help on using tickets.