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

com.liferay.dynamic.data.mapping.service.dependencies.ddm.geolocation.ftl Maven / Gradle / Ivy

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

<#assign
	latitude = 0
	longitude = 0

	fieldRawValue = paramUtil.getString(request, "${namespacedFieldName}", fieldRawValue)
/>

<#if validator.isNotNull(fieldRawValue)>
	<#assign
		geolocationJSONObject = jsonFactoryUtil.createJSONObject(fieldRawValue)

		latitude = geolocationJSONObject.getDouble("latitude")
		longitude = geolocationJSONObject.getDouble("longitude")
	/>


<@liferay_aui["field-wrapper"]
	cssClass="form-builder-field geolocation-field"
	data=data
	helpMessage=escape(fieldStructure.tip)
	label=escape(label)
	required=required
>
	
<@liferay_aui.input name=namespacedFieldName type="hidden" value=fieldRawValue />
<@clay["icon"] symbol="geolocation" />
<@liferay_map["map-display"] geolocation=true latitude=latitude longitude=longitude name=namespacedFieldName />
${fieldStructure.children}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy