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 params.id = mapParams.object.type[0] + mapParams.object.id;
11 mapParams = OSM.parseHash(location.hash);
12 if (mapParams.center) {
13 params.map = mapParams.zoom + '/' + mapParams.center.lng + '/' + mapParams.center.lat;
16 <% if @lat && @lon -%>
17 params.map = '16/<%= @lon %>/<%= @lat %>';
19 params.map = (mapParams.zoom || 17) + '/' + mapParams.lon + '/' + mapParams.lat;
23 var hashParams = OSM.params(location.hash.substring(1));
25 if (hashParams.background) {
26 params.background = hashParams.background;
29 if (hashParams.comment) {
30 params.comment = hashParams.comment;
33 <% if params[:gpx] -%>
34 params.gpx = '<%= trace_data_url(params[:gpx], :format => :xml) %>';
37 params.gpx = hashParams.gpx;
41 $('#id-embed').attr('src', '<%= id_url :locale => params[:locale] %>#' + querystring.stringify(params));
44 <script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>