Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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

Avatar

Level 4

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

Avatar

Administrator

Linking Duplicate question:-

Checking with internal expert if something more needed for publishing.



Kautuk Sahni

Avatar

Level 1

Hi @subrato_kha 

I'm facing the same issue.

Did you find any resolution for this?

Avatar

Level 4

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. 

Avatar

Level 1

@subrato_kha thanks for the reply.

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

my personalization works on address object.

Avatar

Level 4

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.