
com.liferay.dynamic.data.mapping.dependencies.ddm.geolocation.ftl Maven / Gradle / Ivy
<#include "../init.ftl">
<#assign latitude = 0>
<#assign longitude = 0>
<#assign fieldRawValue = paramUtil.getString(request, "${namespacedFieldName}", fieldRawValue)>
<#if fieldRawValue != "">
<#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(fieldRawValue)>
<#assign latitude = geolocationJSONObject.getDouble("latitude")>
<#assign longitude = geolocationJSONObject.getDouble("longitude")>
#if>
<@liferay_aui["field-wrapper"] cssClass="form-builder-field geolocation-field" data=data helpMessage=escape(fieldStructure.tip) label=label required=required>
<@liferay_aui.input
name=namespacedFieldName
type="hidden"
value=fieldRawValue
/>
<@liferay_map["map-display"]
geolocation=true
latitude=latitude
longitude=longitude
name=namespacedFieldName
/>
${fieldStructure.children}
@>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy