getsmap / smap-responsive

A JavaScript framework for simple creation of web maps with responsive design supporting a range of different browsers and devices
GNU General Public License v3.0
14 stars 12 forks source link

Zoom to extent option for geojson parameter #208

Closed johanlahti closed 8 years ago

johanlahti commented 8 years ago

Create a parameter option for the parameter geojson which makes the map zoom to the extent of all loaded features

johanlahti commented 8 years ago

geojson={String | GeoJSON source (URL)}, {Boolean | Clustering}, {Boolean | Zoom to extent}

For example:

// Zoom to extent with clustering (clustering is omitted here and defaults to true)
http://localhost/smap-responsive/dev.html?config=mmpgreta.js#geojson=http://the-geojson.source/,,true