mapswipe / python-mapswipe-workers

MapSwipe Back-End
https://mapswipe-workers.readthedocs.io
Apache License 2.0
26 stars 10 forks source link

Quick-testing bugs/confussion #752

Closed udaynwa closed 1 year ago

udaynwa commented 1 year ago

Community Dashboard - User's profile page

Image Image

Image Image

Community Dashboard - User group page

udaynwa commented 1 year ago

Community Dashboard

udaynwa commented 1 year ago

Mobile app - iOS (Exists in the LIVE app too)

danbjoseph commented 1 year ago

for this one: "While dragging the contribution heatmap to the left side or right side, the heatmap is not showing in the maps."

Do all the normal Leaflet parameters apply? Can you set worldCopyJump to true?

With this option enabled, the map tracks when you pan to another "copy" of the world and seamlessly jumps to the original one so that all overlays like markers and vector layers are still visible.

https://leafletjs.com/reference.html#map-worldcopyjump

tnagorra commented 1 year ago

@danbjoseph We will have to check if the parameter applies to the heatmap layer

EDIT: Looks like there is not option to show copies Reference: https://github.com/Leaflet/Leaflet.heat#reference

danbjoseph commented 1 year ago

@tnagorra From React Leaflet docs:

When creating a MapContainer element, its props are used as options to create the Map instance.

so I would think you could add a line with something like worldCopyJump={true} just below index.tsx#L117?

you might also try something like maxBounds={[[-90,-180],[90,180]]} which should make it so that if the user pans off the map it will bounce back instead of into another world (with the heatmap layer only displayed on the first world)? and noWrap={true} to only display the one world (not multiple like below)?

Screen Shot 2023-01-11 at 11 33 49 AM
tnagorra commented 1 year ago

Sorry that I missed your comment.

We were using worldCopyJump on the wrong place. Thanks for your thorough comment on how this problem can be solved.

We have used worldCopyJump on leaflet container. Although, the behavior is not identical to how mapbox handles this, it has solved the problem

PR: https://github.com/mapswipe/python-mapswipe-workers/pull/655

udaynwa commented 1 year ago

Android - React Native 0.71.3