Leaflet.glify
Leaflet.glify copied to clipboard
fix #42 import Multipart-Geometry
fix #42
The issue is caused by GeoJSON structure deference between Multi-Part and not. The two types of GeoJSON's coordinates is not same structure as following.
multipart: [ [ [lon, lat], [lon, lat], [lon, lat]...], [ [lon, lat], [lon, lat], [lon, lat]...]... ] singlepart: [ [lon, lat], [lon, lat], [lon, lat]... ]
So, I've fixed to treat two types in same way by wrapping singlepart coordinates with [].
In case anybody else needs this fix I merged this with latest upstream and published it to a new npm package while we wait for a merge https://www.npmjs.com/package/leaflet.glify.multipoly