Find all items in a area (Example)

Let say you are building an app for a chain of Candy stores. You want your customer to be able to find the nearest Store from their location so they can buy your new Sparkling Mango lolipop . How do you do?

There are multiple ways to bring geospatial query in Wix but this time I decided to test geohash . For this challenge, I limit myself to only rely on Wix technology without support of an external platform to handle the geo query

The idea behind geoHash is to encode location (latitude, longitude) into a string. That string can be store in a database and filter with simple equality. I won’t go into details regarding the algorithm but you can find a good explanation here .

Using a npm package , collection hooks, wixData and google map I was able to produce the following prototype:

https://quentinces.wixsite.com/wix-geo-query

Given a point and a radius( in km ), it filters all the items for that area. As you can see, Wix can easily look into thousands (+40,000 in my test) of location in no time.

Other resources:

  1. Display multiple point on google map

I’m interested to know if you have posted the code anywhere.

@lizrooney09 No I didn’t. This is part of my code studio IP. But I shared everything I used to create the demo. A good coder should be able to replicate :slight_smile:

And you can always hire me if need :wink:

Quentin@enhancement.studio