Closed giannijacot closed 1 week ago
Openlayers aren't as fast as mapbox. Perhaps change to use that instead? (you are currently using openlayers)
I also notice that the tiles are quite large, 1.3mb for some of them. That is a fair bit larger than what is normal as far as I know. For comparison I didn't managed to find a single mapbox tile above 70kb fro a bit of random browsing
I've changed the config to use mapbox - that helped. https://github.com/gbif/hp-swiss-bif/commit/348a233b820d6cd8f49b02fb3416b2a5e46d9482
But it would probably be a good idea to reduce tile sizes (kb) as well.
The map looks nice btw. Especially now that it renders fast with mapbox.
Thanks for the change and the advice ! The rendering time is much better.
I will check if there is also a way to reduce tile size.
We managed to add the Swiss map using Mapbox and similar parameters to another application we are developing (see config.js). It's working well but the map is sometimes freezing when zooming in and out (even with only one occurence displayed). You can see it here : https://swiss-bif.hp.gbif-staging.org/en/occurrence/search?catalogNumber=karch-AMPH-234971&view=MAP
We already checked some parameters on Mapbox and the Swiss map API and it doesn't seem to come from here.
Do you know if something could be done to reduce lag ?
I'm mainly using Google chrome to browse the hosted portal.