Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Omar M
Including google map api call in a portlet
5. April 2013 07:44
Antwort

Omar M

Rang: New Member

Nachrichten: 1

Eintrittsdatum: 4. April 2013

Neue 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

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


Doing this now appends the url to my domain name.
1http://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
RE: Including google map api call in a portlet
4. November 2014 03:59
Antwort

Bratumił Rynkiewicz

Rang: New Member

Nachrichten: 1

Eintrittsdatum: 4. November 2014

Neue 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?