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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

How to add Google map in content fragment modal

Avatar

Level 1

Hi All,

 

There is a requirement where we need to add google map in content fragment modal so authors can search locations and google prompts suggestions by default and upon save of content fragment , it should save longitude, latitude and location name (whatever author has entered).

Below URL for google map reference which we need to integrate in CF modal.

 

developers.google.com/maps/documentation/javascript/examples/places-searchbox#try-sample

 

Kindly help me on this.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ashutoshs255199 ,

 

https://developers.google.com/maps/documentation/javascript/examples/places-searchbox#maps_places_se... 

the URL mentioned above has everything that you need (Typescript, JS, HTML, and CSS). All you need to do here is:

1. convert those into a component and add it to your content fragment modal.

2. On save of the modal (as per your requirement), capture the location details and 
3. trigger a servlet that saves the details in nodes or in any other data format.

Thank you.

Regards,
Sravan

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @ashutoshs255199 ,

 

https://developers.google.com/maps/documentation/javascript/examples/places-searchbox#maps_places_se... 

the URL mentioned above has everything that you need (Typescript, JS, HTML, and CSS). All you need to do here is:

1. convert those into a component and add it to your content fragment modal.

2. On save of the modal (as per your requirement), capture the location details and 
3. trigger a servlet that saves the details in nodes or in any other data format.

Thank you.

Regards,
Sravan