Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

To find all the nearby locations(latitude and longitude values) within a radius for a provided location(a single latitude and longitude)

Avatar

Avatar
Level 1
RkR_F5
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
RkR_F5
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
RkR_F5
Level 1

06-05-2021

Hi Team,

 

Got a requirement where, we have a path /etc/storelocator in aem. Under this path, we have several child nodes and each node contains 2 properties latitude and longitude. Please see the scrrenshot below:

RkR_F5_0-1620369226387.png

Now, we need to find all those nodes which are nearby to a location within a provided radius.

 

For example, let say radius = 10 km and location is {45.4286698 , -122.5752410}. we need to find all the nearby locations and its corresponding nodes under /etc/storelocator nodes.

 

Any input is highly appreciable.

 

Thanks!

 

@Arun_Patidar 

@kautuk_sahni 

View Entire Topic

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

169 likes

Total Posts

180 posts

Correct Reply

54 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

169 likes

Total Posts

180 posts

Correct Reply

54 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

07-05-2021

Hi @RkR_F5 ],

 

You can find the distance between 2 points by writing code in JS. Please find a related URL here.

 

Hope this helps.

 

Thanks,

Kiran Vedantam