<% end -%>
var hash;
- if (coord.object && coord.object.type !== 'relation') {
+ if (coord.object) {
hash = '#id=' + coord.object.type[0] + coord.object.id;
} else {
hash = '#map=' + (coord.zoom || 17) + '/' + coord.lon + '/' + coord.lat
}
- $('#id-embed').attr('src', 'id_iframe' + hash);
+ $('#id-embed').attr('src', '<%= id_url :locale => params[:locale] %>' + hash);
</script>
<% else %>
<script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>