I have problems with polygons. When I draw a new polygon, it distort with zoom level. I don't know if I'm doing something wrong. I'm using mapbox gl v0.22.1.
http://codepen.io/Naimikan/pen/mENbEj
map.addSource("markers", {
"type": "geojson",
"data": {
"type": 'Feature',
"geometry": {
"type": 'Polygon',
"coordinates": [[[-1.8035947381652875,40.2803612648338],[-1.8100962483371745,40.27866598480085],[-1.8119729101643145,40.27655793855459],[-1.8087571228122101,40.276212586829075],[-1.804852911774958,40.27685292509017]]]
}
}
});
map.addLayer({
id: 'test',
type: 'fill',
source: 'markers',
interactive: true,
paint: {
'fill-color': '#12A5CC',
'fill-opacity': 0.5
}
});
That GeoJSON is invalid:
If you correct these issues, in particular the latter one, then you will observe the desired behavior.
@jfirebaugh Thanks! It works!
Most helpful comment
That GeoJSON is invalid:
If you correct these issues, in particular the latter one, then you will observe the desired behavior.