[1] | 1 | <html xmlns="http://www.w3.org/1999/xhtml" |
---|
| 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
| 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
| 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
---|
| 5 | i18n:domain="plone"> |
---|
| 6 | <head><title></title></head> |
---|
| 7 | <body> |
---|
| 8 | |
---|
| 9 | <metal:view_macro define-macro="view" |
---|
| 10 | tal:define="result accessor"> |
---|
| 11 | <span tal:condition="result" |
---|
| 12 | tal:define="lat python:result[0]; |
---|
| 13 | lng python:result[1]" |
---|
| 14 | tal:replace="structure string:Latitude: ${lat} <br /> Longitude: ${lng}" /> |
---|
| 15 | <tal:block replace="structure python:here.view_js(result)" /> |
---|
| 16 | <div id="mapView" style="position: relative; height: 480px" |
---|
| 17 | xmlns:v="urn:schemas-microsoft-com:vml"></div> |
---|
| 18 | </metal:view_macro> |
---|
| 19 | |
---|
| 20 | <metal:edit_macro define-macro="edit"> |
---|
| 21 | <metal:use use-macro="field_macro | here/widgets/field/macros/edit"> |
---|
| 22 | <metal:fill fill-slot="widget_body" |
---|
| 23 | tal:define="latitude python: value and value[0] or None; |
---|
| 24 | longitude python: value and value[1] or None"> |
---|
| 25 | <metal:coordinates> |
---|
| 26 | <!-- <label for="latitude">Latitude:</label> --> |
---|
| 27 | <input type="hidden" name="latitude" id="maplatitude" |
---|
| 28 | tal:attributes="name string:${fieldName}_latitude; |
---|
| 29 | tabindex tabindex/next; |
---|
| 30 | value latitude"/> |
---|
| 31 | <!-- <label for="longitude">Longitude:</label> --> |
---|
| 32 | <input type="hidden" name="longitude" id="maplongitude" |
---|
| 33 | tal:attributes="name string:${fieldName}_longitude; |
---|
| 34 | tabindex tabindex/next; |
---|
| 35 | value longitude"/> |
---|
| 36 | </metal:coordinates> |
---|
| 37 | <div id="mapView" style="position: relative; height: 480px" |
---|
| 38 | xmlns:v="urn:schemas-microsoft-com:vml" |
---|
| 39 | tal:attributes="tabindex tabindex/next"></div> |
---|
| 40 | <tal:block define="coord python:test(latitude and longitude, (latitude, longitude), None); |
---|
| 41 | longlat here/getOverlayMarkers|python:[]" |
---|
| 42 | replace="structure python:context.edit_js(coord, longlat)" /> |
---|
| 43 | </metal:fill> |
---|
| 44 | </metal:use> |
---|
| 45 | </metal:edit_macro> |
---|
| 46 | |
---|
| 47 | </body> |
---|
| 48 | </html> |
---|