styles: {
node: options.style,
way: options.style,
- area: options.style
+ area: options.style,
+ changeset: {
+ weight: 1,
+ color: '#FF9500',
+ opacity: 1,
+ fillOpacity: 0
+ }
}
});
map._objectLayer.addData(xml);
- if (options.zoom) map.fitBounds(map._objectLayer.getBounds());
- if (options.callback) options.callback(map._objectLayer.getBounds());
+ var bounds = map._objectLayer.getBounds();
+
+ if (options.zoom && bounds.isValid()) map.fitBounds(bounds);
+ if (options.callback) options.callback(bounds);
map._objectLayer.addTo(map);
}