August 2014
Intermediate to advanced
180 pages
3h 41m
English
GeoJSON is a JSON format that encodes geometries. GeoJSON can encode points, line strings, and polygons. It also allows for multipart geometries. You can encode multipoints, multiline strings, and multipolygons. These should sound familiar because they are pretty close to the geometries you learned to draw in Chapter 1, Creating Maps with Leaflet. The following GeoJSON code shows you two points in a feature collection:
{"type":"FeatureCollection", "features":[ {"type":"Feature", "geometry":{ "type":"Point", "coordinates":[-106.62987,35.10418] }, "properties":{ "name":"My Point", "title":"A point at the Big I" } }, {"type":"Feature", "geometry":{ "type":"Point", "coordinates":[-106,35] }, "properties":{ "name":"MyOther Point", ...Read now
Unlock full access