-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #135 (LeafletWidget behaviour on GeometryCollectionField)
- Loading branch information
1 parent
f2e57f1
commit bebb6fd
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bebb6fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just noticed that this update is causing an javascript error (with multipoints in a map anyway):
TypeError: geojson.geometry is undefined
L.FieldStore<._serialize()
leaflet.forms.js:38
L.FieldStore<.save()
leaflet.forms.js:13
L.GeometryField<.onCreated()
leaflet.forms.js:201
L.GeometryField<.addTo/<()
leaflet.forms.js:139
o.Mixin.Events.fireEvent()
leaflet.js:6
L.Draw.Feature<._fireCreatedEvent()
leaflet.draw.js:9
L.Draw.Marker<._fireCreatedEvent()
leaflet.draw.js:9
L.Draw.Marker<._onClick()
leaflet.draw.js:9
o.Mixin.Events.fireEvent()
leaflet.js:6
o.Marker<._onMouseClick()
leaflet.js:7
o.DomEvent.addListener/s()
leaflet.js:8
leaflet.forms.js:38:13
Updating it to
var is_geometrycollection = (geojson.geometry && geojson.geometry.type == 'GeometryCollection'); fixes it. I will submit a pull request.