Changeset 81063 in spip-zone
- Timestamp:
- Feb 26, 2014, 9:58:48 AM (5 years ago)
- Location:
- _plugins_/gis/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/gis/trunk/javascript/gis_init_map.js
r81062 r81063 139 139 }).addTo(map); 140 140 geojson.addData(data); 141 if (mapcfg['autocenterandzoom']) 142 map.fitBounds(geojson.getBounds()); 141 if (mapcfg['autocenterandzoom']) { 142 if (data.features.length > 1) 143 map.fitBounds(geojson.getBounds()); 144 else 145 map.setView(geojson.getBounds().getCenter(), mapcfg['zoom']); 146 } 143 147 if (mapcfg['open_id'].length) 144 148 gis_focus_marker(mapcfg['open_id'],map_container.substring(3)); … … 182 186 map.addLayer(map.markers); 183 187 184 if (mapcfg['autocenterandzoom']) 185 map.fitBounds(map.markers.getBounds()); 188 if (mapcfg['autocenterandzoom']) { 189 if (data.features.length > 1) 190 map.fitBounds(map.markers.getBounds()); 191 else 192 map.setView(map.markers.getBounds().getCenter(), mapcfg['zoom']); 193 } 186 194 } 187 195 } -
_plugins_/gis/trunk/paquet.xml
r81061 r81063 2 2 prefix="gis" 3 3 categorie="divers" 4 version="4.19. 1"4 version="4.19.2" 5 5 schema="2.0.5" 6 6 etat="stable"
Note: See TracChangeset
for help on using the changeset viewer.