Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 1.32 KB

File metadata and controls

19 lines (10 loc) · 1.32 KB

CoordinateSelectionMap

The CoordinateSelectionMap is used in the LocalityTab of localities when editing. It is opened by clicking the Get coordinates button.

The map has a draggable marker for selecting coordinates, and a search box for searching for a location. The search uses the GeoNames free API. The API call is handled by the server on the backend, see geonamesReducer and the geonames-api route. The API-key for GeoNames is a simple username. To use the search during development, create a free account on geonames.org and set GEONAMES_USERNAME in the appropriate .env file. Note that you also need to enable the use of the webservice for your account here: https://www.geonames.org/manageaccount.

Note

  • The default coordinates are in Kumpula, not in the location already in the locality you're editing

Possible later features/to-dos

  • while editing, make marker's default position match the current coordinates

  • make modal window smaller / more fit with the map

  • show which country the marker is on

    • insert this to the form when saved in edit mode