All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.view.jsp Maven / Gradle / Ivy

The newest version!
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/init.jsp" %>

<%
String protocol = HttpComponentsUtil.getProtocol(request);

boolean geolocation = GetterUtil.getBoolean(request.getAttribute("liferay-map:map:geolocation"));
double latitude = (Double)request.getAttribute("liferay-map:map:latitude");
double longitude = (Double)request.getAttribute("liferay-map:map:longitude");
String name = (String)request.getAttribute("liferay-map:map:name");
String points = (String)request.getAttribute("liferay-map:map:points");

name = AUIUtil.getNamespace(liferayPortletRequest, liferayPortletResponse) + name;
%>


	
		Liferay.namespace('Maps').onGMapsReady = function (event) {
			Liferay.Maps.gmapsReady = true;

			Liferay.fire('gmapsReady');
		};

		if (!Liferay.Maps.gmapsReady) {
			var apiURL =
				'<%= protocol %>' +
				'://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=Liferay.Maps.onGMapsReady';

			
				apiURL += '&key=' + '<%= googleMapsDisplayContext.getGoogleMapsAPIKey() %>';
			

			var script = document.createElement('script');

			script.setAttribute('src', apiURL);

			document.head.appendChild(script);

			script = null;
		}
	






© 2015 - 2024 Weber Informatics LLC | Privacy Policy