Map with all items via API

Hello folks,

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

Square thumbnail

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?

1 Like

Unfortunately, all the markers come back, even if the actual item is “not public”.

This is a bug. Without authentication, you should not be able to see mapping_markers that belong to private items. This will be fixed in the next release. Note that it will require an as-of-yet unreleased version of Omeka S, which should be released within the month.

I’m confident that the next core release will come within two weeks.

Then I stay with the first variant and wait for the updates. Thanks a lot!

Unfortunately, the bug still exists. Is there any news here?

We introduced the fix in version 1.5.0. Have you upgraded the module to that version?

ahh, here was the problem! we have only updated omeka. Now it works wonderfully - thank you!

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.