# How can I only show map markers based on the user's current view?

**URL:** https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216
**Category:** Maps
**Created:** [January 25, 2023, 7:49am UTC](https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216 "2023-01-25T07:49:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hdawc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hdawc/32/119068_2.png) [@hdawc](https://community.thunkable.com/u/hdawc)
#### Post date: [January 25, 2023, 7:49am UTC](https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216/1 "2023-01-25T07:49:50Z")

</div>

I have between 10,000 and 50,000 map points that need to be shown within a city space.

Each of those markers has a lat and lon, but when loading them into google maps with blocks I can only really load all of them, this takes a while.

How can I store them and only show them based on the coordinates?

Google Maps itself has a “Search This Area” button to only load results.

I can create a button (thought I would rather it be automatic), so how can I load them (very quickly) based on that area?

Can I find the grid that maps is showing and the run through a stored list of points to filter out the ones that fit within that?

Thank you.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 25, 2023, 9:37am UTC](https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216/2 "2023-01-25T09:37:49Z")

</div>

I’d recommend letting a backend handle this type of work. Xano, backendless, Firebase/firestore can all do this for you quite easily

---

<div class="post-metadata">

### Author: ![hdawc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hdawc/32/119068_2.png) [@hdawc](https://community.thunkable.com/u/hdawc)
#### Post date: [January 25, 2023, 10:24am UTC](https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216/3 "2023-01-25T10:24:56Z")

</div>

I have thought about that, but as phones are powerful enough to do this kind of compute when the data is already on the device (especially if it’s in a local DB), I thought it might be a better idea to generate this locally and save myself cloud compute.

But thanks, I’ll look into it some more.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 25, 2023, 10:51am UTC](https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216/4 "2023-01-25T10:51:08Z")

</div>

In that case, check out this solution and the supplement

[[Solved] How do I find/add Map Markers Nearest to the User (Haversine formula)](https://community.thunkable.com/t/solved-how-do-i-find-add-map-markers-nearest-to-the-user-haversine-formula/598411)

[Distance between two coordinates](https://community.thunkable.com/t/distance-between-two-coordinates/591014)

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:37pm UTC](https://community.thunkable.com/t/how-can-i-only-show-map-markers-based-on-the-users-current-view/2240216/5 "2024-11-08T13:37:08Z")

</div>


