return str;
},
- addObject: function(object) {
+ addObject: function(object, callback) {
var objectStyle = {
color: "#FF6200",
weight: 4,
map._objectLayer.addData(xml);
map._objectLayer.addTo(map);
- if (!window.location.hash) {
- var bounds = map._objectLayer.getBounds();
- if (bounds.isValid()) {
- OSM.router.moveListenerOff();
- map.once('moveend', OSM.router.moveListenerOn);
- map.fitBounds(bounds);
- }
- }
+ if (callback) callback(map._objectLayer.getBounds());
}
});
},