integreat-cms
integreat-cms copied to clipboard
Enable setting POI position via drag & drop on map
Short description
This PR enables users to set address and coordinates of POI by drag & drop of pin on the map.
Proposed changes
- Set the map pin draggable.
- After each drag&drop (change in coordinates) the address will be derived.
- New address and coordinates are suggested, user can choose to update the both or one of them or to discard the change.
- If it is a new POI and there is no address/coordinates, the map and pin show the center coordinates of the region.
Side effects
- so far not found
Resolved issues
Fixes: #1035
Code Climate has analyzed commit e59561f6 and detected 2 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 2 |
The test coverage on the diff in this pull request is 23.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 74.2% (0.0% change).
View more on Code Climate.
Works good! Thank you. One little improvement idea I got: may be "Discard" should be another button next to "Confirm"? Rather than radio option. Seems like more common UI to me.
That's a good idea 😃 I'll add a red button for it.
2 fixes:
- Map preview is adjusted so it shows the last status when the discard button is clicked.
- The numbers after decimal point of the region central coordinates were rounded off and a wrong position was shown in the new poi when map is activaed. This is fixed too.
@timoludwig Thank you for the improvement and explanation. It looks and works way better 😻