/*
* @title OSM <-> Mapillary
* @description Switch between OSM and Mapillary
* @include http://*
* @license MIT License
* @require
*/
var map_url = location.href;
xyz = map_url.match(/\d[0-9.]*/g);
if (map_url.match(/(mapillary)/)){
window.location.href = 'http://www.openstreetmap.org/#map=' + xyz[2] + '/' + xyz[0] + '/' + xyz[1];
}
else if(map_url.match(/(openstreetmap)/)){
window.location.href = 'https://www.mapillary.com/app/?lat=' + xyz[1] + '&lng=' + xyz[2] + '&z=' + xyz[0];
}