Skip to content

Commit

Permalink
Merge pull request #294 from Zhigal/master
Browse files Browse the repository at this point in the history
Bug fix: Geometry has not been displayed if geometry field name is not 'geom'
  • Loading branch information
Gaël UTARD committed Jul 2, 2020
2 parents 581853a + a7bc54e commit 8f1c1a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,13 @@ Initial map center and zoom level
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

'DEFAULT_CENTER': (6.0, 45.0),
'DEFAULT_ZOOM': 16,
'MIN_ZOOM': 3,
'MAX_ZOOM': 18,
'DEFAULT_PRECISION': 6,

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

Expand Down
2 changes: 1 addition & 1 deletion leaflet/static/leaflet/leaflet.forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ L.FieldStore = L.Class.extend({
return null;
}
// Helps to get rid of the float value conversion error
document.querySelector('#id_geom').value = JSON.stringify(JSON.parse(value));
this.formfield.value = JSON.stringify(JSON.parse(value));
return L.GeoJSON.geometryToLayer(JSON.parse(value));
},
});
Expand Down

0 comments on commit 8f1c1a4

Please sign in to comment.