Ticket #2509 (closed feature: wontfix)

Opened 3 years ago

Last modified 3 years ago

MeasureToolbar: New toolbar to measure length, areas and shapes.

Reported by: jorix Owned by: jorix
Priority: minor Milestone: Addins
Component: Control Version: SVN
Keywords: Cc:
State:

Description

To measure with OpenLayers is necessary use measure control, but work with it requires some API user effort. I think this ticket simplify API use to measure.

MeasureToolbar is a toolbar to measure. It is easy to use for end user. It displays a toolbar with buttons and the measure value.

Characterized by:

  • Show the data in a div into the Panel, the developer may forget to make a div for this.
  • Shows the area and perimeter length simultaneously for polygons.
  • Allows measurement of features in vectors layers and also reports the name of the feature.

Other features:

  • Measures are not rounded to a fixed number of decimals, are showing only the significant digits (default 4, shows for example: 134.2 m, 3.437km or 453,500 km)
  • Can copy the text of the measure obtained. Some mouse events on the div of measure value are disabled.
  • The vector layers are automatically detected to measure features option, see measureLayers option.
  • The buttons have title (currently only in English, Spanish and Catalan [my native language])

This require ticket #2501. They are necessary for to give length and area simultaneously, and also to allow for measuring a geometry from a vector layer.

Also uses the #2508, but is not required to work.

For better appearance, in non quirks mode on can add this in CSS:

.olControlMeasureToolbar {width: auto;}

NOTE: The attached patch also contains an example of using.

Work ok in IE8, FF35 and CH4.

SVN Revision Number: 10094

Attachments

MeasureToolbar-2509.patch Download (28.0 KB) - added by jorix 3 years ago.
MultiToolbar.png Download (40.8 KB) - added by jorix 3 years ago.
I forgot, missing the icons, an extension of "editing_tool_bar.png" with and good transparency in the corners.

Change History

Changed 3 years ago by jorix

  Changed 3 years ago by jorix

  • keywords review added
  • state set to Review

please review this ticket, and the others who have opened today.

follow-up: ↓ 4   Changed 3 years ago by ahocevar

  • state changed from Review to Needs More Work

Looks great. This would make a perfect addin. For going into trunk, it is too much focused on a specific use case. Please have a look at Addins to learn how to contribute an addin.

  Changed 3 years ago by ahocevar

  • milestone changed from 2.9 Release to Addins

Changed 3 years ago by jorix

I forgot, missing the icons, an extension of "editing_tool_bar.png" with and good transparency in the corners.

in reply to: ↑ 2   Changed 3 years ago by jorix

Replying to ahocevar:

Looks great. This would make a perfect addin. For going into trunk, it is too much focused on a specific use case. Please have a look at Addins to learn how to contribute an addin.

Your proposal to addins passing was not exactly my purpose. I think in OL missing controls in the trunk to facilitate work to basic users. For example to use Popups, Measure or SelectFeature requires considerable effort. And yet there are controls on the trunk that are nothing more than examples of use as EditingToolbar, NavToolbar.

My approach has been to grouping all this into a toolbar and has all these components working together. I named it MultiToolbar and MeasureToolbar is only one component of it.

In the same, I have also proposed the tickets #2507, #2501 and #2508, please review it.

Well, if trunk is not possible: when I have finished the MultiToolbar I put entire it in a proposal for addins. (today I ask access to sandbox to PSC).

Thanks ahocevar.

  Changed 3 years ago by jorix

  • owner set to jorix

  Changed 3 years ago by jorix

  • keywords review removed
  • status changed from new to closed
  • state Needs More Work deleted
  • resolution set to wontfix

I'm not going to work in this direction by using "lib" in this way.

Note: See TracTickets for help on using tickets.