Mapping - omeka-s - default view (follow up)

Further to closed Mapping - omeka-s - default view where are the files ‘mapping-forms.js’ and ‘mapping-show.js’ that need to be edited to change the default map view (maybe @Emilie can help!)

Those scripts are in the modules/Mapping/asset/js/ directory.

1 Like

Of course! That worked a treat. Thanks.

Sorry to piggyback on this, but in relation to this, could one edit the files here to change the default zoom level of an item when it is displayed on the show page? For example if a marker does not have a view set, the bounds function seems to go to the closest coordinates point to it. I have a site with over 4000 place names that are all zoomed to the max level and thus don’t provide context to the location. I would like to set the default view so it is zoomed out by at least a factor of 4 so that it is possible to see the locations around it?
Many thanks
Sanjin

In asset/js/mapping-show.js, change the following (line 42):

            map.fitBounds(bounds);

To the following:

            map.fitBounds(bounds, {maxZoom: 12});

Adjust maxZoom to your preference.

Dear @jimsafley

Thanks! That is amazing! Appreciate this a lot.

Sanjin

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