diff --git a/components/src/components/Map/services/MapService.ts b/components/src/components/Map/services/MapService.ts index 2e0f72121..3698d1e0e 100644 --- a/components/src/components/Map/services/MapService.ts +++ b/components/src/components/Map/services/MapService.ts @@ -54,10 +54,13 @@ class MapService { map.on('draw:created', (e) => { const layer = e.layer; if (drawnItems.getLayers().length === options.numPoints) { + map.closePopup(); L.popup() - .setLatLng(layer.getLatLng()) - .setContent('

Only one marker for submission

') - .openOn(map); + .setLatLng(map.getCenter()) + .setContent( + `

Only ${options.numPoints} features per submission

` + ) + .addTo(map); } else { drawnItems.addLayer(layer); }