} else {
var idContext = iD.coreContext();
idContext.connection().apiConnections([]);
+ var url = location.protocol + "//" + location.host;
idContext.preauth({
- url: location.protocol + "//" + location.host,
+ url: url,
+ apiUrl: url === "https://www.openstreetmap.org" ? "https://api.openstreetmap.org" : url,
access_token: container.dataset.token
});
parent.updateLinks(llz, zoom);
// Manually resolve URL to avoid iframe JS context weirdness.
- // http://bl.ocks.org/jfirebaugh/5439412
+ // https://gist.github.com/jfirebaugh/5439412
var hash = parent.OSM.formatHash(llz);
if (hash !== parent.location.hash) {
parent.location.replace(parent.location.href.replace(/(#.*|$)/, hash));
var data = parent.$(this).data();
// 0ms timeout to avoid iframe JS context weirdness.
- // http://bl.ocks.org/jfirebaugh/5439412
+ // https://gist.github.com/jfirebaugh/5439412
setTimeout(function () {
id.map().centerZoom(
[data.lon, data.lat],