Skip to content

Commit

Permalink
Allow removing a point from the map
Browse files Browse the repository at this point in the history
  • Loading branch information
theduckylittle committed Jun 9, 2023
1 parent 52aa1a6 commit 1470972
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/desktop/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ app.loadMapbook().then(function() {
app.add(gm3.components.ServiceManager, 'service-tab', {
services: true,
measureToolOptions: {
pointProjections: point_projections,
pointProjections: point_projections.slice(0,1),
initialUnits: 'mi'
}
});
Expand Down
1 change: 1 addition & 0 deletions src/gm3/components/coordinate-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default class CoordinateDisplay extends React.Component {
return (
<div className="gm-grid">
<table>
{this.props.children}
<tbody>
{this.projections.map((projection) => {
const data = this.getData(projection);
Expand Down
15 changes: 14 additions & 1 deletion src/gm3/components/measure/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,20 @@ export class MeasureTool extends Component {
coords={g.coordinates}
projections={this.props.pointProjections}
resolution={this.props.map.resolution}
/>
>
<thead>
<tr key="header">
<th></th>
<th style={{ textAlign: "right" }}>
<RemoveFeatureButton
removeFeature={this.props.removeFeature}
targetLayer={this.props.targetLayer}
properties={properties}
/>
</th>
</tr>
</thead>
</CoordinateDisplay>
);
} else if (g.type === "LineString") {
return this.renderSegments(
Expand Down

0 comments on commit 1470972

Please sign in to comment.