Foren

Including google map api call in a portlet

Omar M, geändert vor 11 Jahren.

Including google map api call in a portlet

New Member Beitrag: 1 Beitrittsdatum: 04.04.13 Neueste Beiträge
I'm trying to include a google map api call in a custom portlet.

In previous versions of liferay I was able to do this by adding it to the liferay-portlet.xml file

<header-portlet-javascript>
http://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=visualization
</header-portlet-javascript>


Doing this now appends the url to my domain name.
http://localhost:port/name-of-projecthttp://maps.googleapis.com/maps/api/js?sensor=false&amp;libraries=visualization


Is there a new approach to do this?

Any suggestions?

Regards,
Omar
Bratumił Rynkiewicz, geändert vor 9 Jahren.

RE: Including google map api call in a portlet

New Member Beitrag: 1 Beitrittsdatum: 04.11.14 Neueste Beiträge
I have to bump this post. I have blocked on the same issue here. I wanted to include google maps api but all <header-portlet-javascript> appends localhost:port/ at beginning making my portlet unable to send valid GET request for it.
Any idea? Couldn't find anything that would solve the issue.
Edit:
By the way if I manually include script in view.ftl it gets passed properly though I wanted it to be global for my portlet, how would I do so?