I am developing an application in which when the I enters an address ,I fetch latitude and longitu开发者_如何学Pythonde of that address and drop the pin. But what I want is like I enter any business or address then a list of that search comes in google maps and multiple pins are dropped for that address. I also want this feature to get include in my app but when I pass my address only one location comes not a list like it comes in google maps. Please help me if anybody knows how google maps searches a couple of locations for that address
ex:- caribou coffee, chapel hil
Any suggestion will be highly appreciated Thanks in advance!
This functionnality is provided by Google Places API.
If you are looking for an algorithm it's using the harvesine forumula or a quadtree data structure. A quadtree or a r-tree in maps applications most likely it uses a space-filling-curve to sort the quadtree. If you look for sfc I recommend a hilbert curve because it has better space fill quality but normally they uses a z-curve.
精彩评论