4

I am trying to integrate Google Map API in the Oracle Commerce Cloud template file for a particular functionality. When I tried to use the below tag in my template file,

<script async defer src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY&callback=initMap"></script>

I got an error message "Named entity expected. Got none." for the & symbol in the src.

I tried using &amp; and %26 instead of &, there was no error, but I could not see the script tag in rendered HTML (Used Inspect option in the browser) and the map is also not rendering.

Is there a way to use google map api in occ template file?

Matt Sidesinger
  • 2,124
  • 1
  • 22
  • 18
Sri
  • 49
  • 3

1 Answers1

-1

Try making this call in your javascript. And then with Knockout you'll be able to manipulate where you want to display the map. If you have multiple pages you can use global, otherwise you can use only the javascript of the widget you want.