Skip to content

Commit 8f1c1a4

Browse files
author
Gaël UTARD
authored
Merge pull request makinacorpus#294 from Zhigal/master
Bug fix: Geometry has not been displayed if geometry field name is not 'geom'
2 parents 581853a + a7bc54e commit 8f1c1a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/templates.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ Initial map center and zoom level
107107
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108108

109109
In addition to limiting your maps with ``SPATIAL_EXTENT``, you can also specify
110-
initial map center, default, min and max zoom level::
110+
initial map center, default, min and max zoom level, coordinate values precision::
111111

112112
'DEFAULT_CENTER': (6.0, 45.0),
113113
'DEFAULT_ZOOM': 16,
114114
'MIN_ZOOM': 3,
115115
'MAX_ZOOM': 18,
116+
'DEFAULT_PRECISION': 6,
116117

117118
The tuple/list must contain (lat,lng) coords.
118119

leaflet/static/leaflet/leaflet.forms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ L.FieldStore = L.Class.extend({
8383
return null;
8484
}
8585
// Helps to get rid of the float value conversion error
86-
document.querySelector('#id_geom').value = JSON.stringify(JSON.parse(value));
86+
this.formfield.value = JSON.stringify(JSON.parse(value));
8787
return L.GeoJSON.geometryToLayer(JSON.parse(value));
8888
},
8989
});

0 commit comments

Comments
 (0)