kopia lustrzana https://github.com/robhawkes/vizicities
commit
8bd29363b0
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
var city = new VIZI.City();
|
var city = new VIZI.City();
|
||||||
city.init({
|
city.init({
|
||||||
coords: [-0.01924, 51.50358] // Canary Wharf
|
// coords: [-0.01924, 51.50358] // Canary Wharf
|
||||||
// coords: [-0.1159894466, 51.5045487479] // London Eye
|
// coords: [-0.1159894466, 51.5045487479] // London Eye
|
||||||
// coords: [-73.984762, 40.7516199] // NYC (performance-heavy)
|
// coords: [-73.984762, 40.7516199] // NYC (performance-heavy)
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,12 @@
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hash = window.location.hash.replace('#', '');
|
||||||
|
var coordCheck = /^(\-?\d+(\.\d+)?),(\-?\d+(\.\d+)?)$/;
|
||||||
|
if (coordCheck.test(hash) && !_.has(options, 'coords')) {
|
||||||
|
options.coords = hash.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
_.defaults(options, {
|
_.defaults(options, {
|
||||||
coords: [-0.01924, 51.50358]
|
coords: [-0.01924, 51.50358]
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue