jumpinjackie / mapguide-react-layout

An openlayers-based modern map viewer for MapGuide
https://jumpinjackie.github.io/mapguide-react-layout/
MIT License
62 stars 13 forks source link

Display Segment wise length for line measure, area in different units - sqm, sqy, acres,hectares #192

Closed saivaradula closed 6 years ago

saivaradula commented 7 years ago

Hi Jackie, We would like to modify measure in Task pane to display

  1. Segment wise length for line measure
  2. Area in different units - sq meters, sq yards, acres, hectares for polygon

Kindly expose the api to access and modify measure.

Reference: The attached image which explains our requirement.

Thanks,

measure-segment length display-area in sqm sqy acres hect

jumpinjackie commented 7 years ago

I'm happy to port across the segment length display on the panel, but not the live display for the actual geometry as that is OpenLayers 2.x code that I am not certain we have the ability to replicate with current OpenLayers

saivaradula commented 7 years ago

Jackie:

Please port segment length display on the panel and with a different color for each segment in the geometry.

Thanks,

JBurkinshaw commented 7 years ago

Hi Jackie,

Functionality similar to that outlined by Sai would also be very useful in an application we are developing to replace our Fusion based application:

Has any progress been made on either of these? Is there anything we can do to assist with their implementation?

Thanks, Joe

jumpinjackie commented 7 years ago

@JBurkinshaw <Units> element support will eventually be covered through work on #239 but that is kind of blocked by the segment display, which I have not made any progress on. If you have an idea how the segment display could be implemented, I'm happy to accept a pull request.

JBurkinshaw commented 7 years ago

@jumpinjackie I appreciate the quick response. Is it possible to treat the <Units> element support and the segment display separately?

I have been thinking about the segment display for line geometry. The idea I had would involve the following:

Does that approach make sense to you?

jumpinjackie commented 7 years ago

@JBurkinshaw Your approach sounds solid. My only point of contention would be around pushing measurement segment state to the redux store vs state local to the Measure component.

Which really boils down to: Would there be possibly anything else in the entire application that would care about the fact that [measurement is currently taking place and here's the measured segments]? I don't really see that right now, so I think pushing this state to a redux store is overkill and measurement segments as component-local state instead for the immediate short term.

The other thing to be aware of is that your approach needs to also work in a multi-map manner. When we switch maps, we also need to be able to switch active measurements, overlays, etc related to those maps as well. MeasureContext has helped insulate the Measure component from this, so your approach should build on what MeasureContext provides.

jumpinjackie commented 6 years ago

Measure now shows segments, but only in geodesic mode and only for the current measurement.

measure-segments