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

com.liferay.journal.web.portlet.template.dependencies.geolocation.ftl Maven / Gradle / Ivy

There is a newer version: 5.0.177
Show newest version
<#include "init.ftl">

<#assign encodedName = name />

<#if !repeatable>
	<#assign encodedName = stringUtil.replace(name, ".", "_") />


	${r"<#assign"} latitude = 0>
	${r"<#assign"} longitude = 0>

	${r"<#if"} (${variableName} != "")>
		${r"<#assign"} geolocationJSONObject = jsonFactoryUtil.createJSONObject(${variableName})>

		${r"<#assign"} latitude = geolocationJSONObject.getDouble("lat")>
		${r"<#assign"} longitude = geolocationJSONObject.getDouble("lng")>

		${r"<@liferay_map"}["map-display"]
			geolocation=true
			latitude=latitude
			longitude=longitude
			name="${encodedName}${r"${random.nextInt()}"}"
		/>
	${r""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy