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

ContextHub doesn't show location value as part of CentextHubPersistence Local storage in publisher

subrato_kha
Level 3
Level 3

Hi All,

We have a requirement where we want to get the exact location details using "ContextHubPersistence" local storage variable.

When we allow the location tracker in author mode to track our location it adds the address details correctly in "ContextHubPersistence" local storage variable.

But this doesn't work in publish mode/publish instance even though we click allow location track when the browser prompts.

for example:

Author:

Screen Shot 2018-09-10 at 15.40.13.png

Publish:

Screen Shot 2018-09-10 at 15.33.43.png

author has the address and addressDetailsOf object present where as it is not present in publish instance.

Is there a way to enable it or publish instance?

5 Replies
kautuk_sahni
Community Manager
Community Manager

Linking Duplicate question:-

Checking with internal expert if something more needed for publishing.

Venkatasainath
Level 1
Level 1

Hi @subrato_kha 

I'm facing the same issue.

Did you find any resolution for this?

subrato_kha
Level 3
Level 3

hey @Venkatasainath : Reverse geocoding is no more available OOTB feature in AEM. Only available in author for demo purpose with limit to number of requests.

You need to use any reverse geocoding api service to get the location for eg:-google api from the latitude and longitude to locate the address. 

Venkatasainath
Level 1
Level 1

@subrato_kha thanks for the reply.

but how do I put address object in localstorage(ContextHubPersistence)?

my personalization works on address object.

subrato_kha
Level 3
Level 3

Hi @Venkatasainath ,

you can paas the latitude and longitude value using servlet to a backend service. Backend service will use any api like google reverse geocoding to give you address object in your format. You can persist the address in contexthub localstorage which will resolve your segment. You can also check if reverse geocoding is available in any web sdk then backend is not needed. It will be faster.