Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Generate "out of view" markers indicators on a map with React Native

$
0
0

For a project, I have to indicate, with colored arrows, in which direction are the markers that aren't shown in the visible region.

When the user scrolls, or zoom on the map, the arrows move accordingly to where the not visible markers are compared to the current center of the visible region.

Here is a picture that demonstrate what is needed :

enter image description here

I am using react-native-mapview and added regular views over the map to show the indicators.

I've started working on this by comparing the coordinates and calculating the point of intersection between lines (border lines and line made by the 2 coordinates) at each frame. It works fine on iOS but is pretty laggy on Android, especially chan there are a lot of markers involved.

What would be the best and optimized way to do this ?


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>