Closed udaynwa closed 1 year ago
Community Dashboard
Mobile app - iOS (Exists in the LIVE app too)
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.
@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
@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)?
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
Android - React Native 0.71.3
Community Dashboard - User's profile page
Community Dashboard - User group page