I have a small architecture problem. We run an Omeka S as backend and use Wordpress as frontend. Thanks to the Restapi, this works wonderfully. However, we now want to create a map function similar to what the mapping plugin does.
Thanks to Leaflet and the Leaflet Cluster plugin, this was not difficult at all and runs smoothly. The problem is the huge amount of data. We have about 4500 items with coordinates online.
First I tried to query all mapping markers via the resource: https://xxx/api/mapping_markers/?per_page=99999.
That works and doesn’t take that long. Unfortunately, all the markers come back, even if the actual item is “not public”. Of course, I don’t want to display items on the map that people can’t look at. It would also be nice to have a preview picture next to the title (but not mandatory).
That’s why I tried to query all the items. That alone takes a while, but we could cope with that, but that’s not all. For each of our 4500 items, a single api call must be made for the coordinates. That completely explodes!
So what chances do I have? The dream solution would of course be to have an Api endpoint that only gives me the following back
However, I have no idea at all how to do this. Probably write an Omeka S plugin? puhhh. Zero experience. Alternatively, I was thinking of writing a wordpress plugin (bit of experience) that does this and stores it in the wordpress database. Then I could write a wordpress api endpoint that gives me the data I need.
But it all seems so complicated to me.
Can you think of a solution?