Load pins selectively via Mysql - Maps API

Asked

Viewed 27 times

0

I have a question about loading pins from a Mysql database.

Let’s say I have a database that stores multiple latitudes and longitudes and needs to load some pins from them, via the Gmaps API.

However, this raised a question: My intention is to load a map based on the user’s location and to load the appropriate pins, if they correspond to that location. However, to do this, would it be necessary to go through ANY database at each user drive? If I have a large number of lat/long would that not affect performance? I suggest a better way to do it?

  • I didn’t understand what the exact doubt is, it seems that there are several points mixed in one question. Do you already have the code that carries the pins or not? As for user drive, it makes no sense to search the bank at all times. You can look for what is around it, and only update after it has walked more than n meters or km. For example, if you have loaded what has 5km around the user, you can reload only after it has moved at least 500m away from the previous search center (it is just an example). Or you can organize in sectors, loading by parts and discarding the most distant.

  • So.. but how would my system judge what is 5km around the user? It would have to consult the entire bank, no?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.