$(document).ready(function () {
var id = $("#id-embed");
- if (id.data("key")) {
- var hashParams = OSM.params(location.hash.substring(1));
+ if (id.data("configured") === true) {
+ var hash = location.hash.substring(1);
+ var hashParams = hash ? OSM.params(hash) : {};
var mapParams = OSM.mapParams();
var params = {};
if (mapParams.object) {
- params.id = mapParams.object.type[0] + mapParams.object.id;
+ params.id = mapParams.object.type + '/' + mapParams.object.id;
mapParams = OSM.parseHash(location.hash);
if (mapParams.center) {
params.map = mapParams.zoom + '/' + mapParams.center.lat + '/' + mapParams.center.lng;
if (hashParams.photo_username) params.photo_username = hashParams.photo_username;
if (hashParams.presets) params.presets = hashParams.presets;
if (hashParams.source) params.source = hashParams.source;
+ if (hashParams.validationDisable) params.validationDisable = hashParams.validationDisable;
+ if (hashParams.validationWarning) params.validationWarning = hashParams.validationWarning;
+ if (hashParams.validationError) params.validationError = hashParams.validationError;
if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough;
if (id.data("gpx")) {