DF-1105: Interactive map - replace UMD with ESM#419
Open
davidjamesstone wants to merge 1 commit into
Open
Conversation
|
alexluckett
reviewed
Jun 4, 2026
| mapProvider: defra.maplibreProvider(), | ||
| reverseGeocodeProvider: defra.openNamesProvider({ | ||
| url: `${apiPath}/reverse-geocode-proxy?easting={easting}&northing={northing}` | ||
| }), |
Contributor
There was a problem hiding this comment.
did you intend on removing this?
Contributor
Author
There was a problem hiding this comment.
Yes - we're not using the reverse geocode. It was doing no harm but shouldn't be there.
Contributor
There was a problem hiding this comment.
Do the routes need removing?
Contributor
Author
There was a problem hiding this comment.
Up to you. I kept them in previously in case we ever decided to use them.
/**
* OS names search nearest by E/N
* @param {number} easting - the easting
* @param {number} northing - the northing
* @param {string} apiKey - the OS api key
*/
export async function nearest(easting, northing, apiKey) {
const endpoint = 'nearest'
const url = `https://api.os.uk/search/names/v1/nearest?key=${apiKey}&point=${easting},${northing}&radius=1000&fq=local_type:Airfield%20local_type:Airport%20local_type:Bus_Station....`
return getData(url, endpoint)
}
You think we'll ever need to do reverse geocoding?
Contributor
Author
There was a problem hiding this comment.
If not, I'll remove the nearest service function and route to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Proposed change
Import maps assets via ESM not UMD to avoid needing to webpack copy the assets in host frontend app (e.g. forms-runner)
Jira ticket: https://eaflood.atlassian.net/browse/DF-1105
Type of change
Checklist
README.mdanddocs/*(where appropriate, e.g. new features).npm run test).npm run lint).npm run format).