com.liferay.dynamic.data.mapping.service.dependencies.ddm.geolocation.ftl Maven / Gradle / Ivy
<#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")
/>
#if>
<@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