1 <% if defined? ID_KEY %>
3 <iframe frameBorder="0" id="id-embed" class="id-embed"></iframe>
8 var mapParams = OSM.mapParams();
9 if (mapParams.object &&
10 mapParams.object.type !== 'note' &&
11 mapParams.object.type !== 'changeset') {
12 params.id = mapParams.object.type[0] + mapParams.object.id;
14 <% if @lat && @lon -%>
15 params.map = '16/<%= @lon %>/<%= @lat %>';
17 params.map = (mapParams.zoom || 17) + '/' + mapParams.lon + '/' + mapParams.lat;
21 var hashParams = OSM.params(location.hash.substring(1));
23 if (hashParams.background) {
24 params.background = hashParams.background;
28 params.gpx = hashParams.gpx;
31 $('#id-embed').attr('src', '<%= id_url :locale => params[:locale] %>#' + querystring.stringify(params));
34 <script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>