2

I have a form that sends data via ajax to be geocoded and inserted into a mysql db.

Once that data is there, can I force the marker layer to refresh so that it displays the new data?

The SQL API for Cartodb includes a layer method .invalidate() which refreshes the data if there has been a change. I don't care about detecting a change, but I do hope to find a similar refreshing capability in pure leaflet.

The map will not be resized or zoomed when the new data is pulled in, so something like map._onResize() won't have any effect.

There will be reference URLs etc that need to be pulled from the db to add to a popup, so just putting on the marker on the front end while pushing to the db via ajax won't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.