5 <%= stylesheet_link_tag 'iD' %>
6 <!--[if !IE || gte IE 9]><!-->
7 <%= javascript_include_tag 'iD' %>
11 <div id='id-container'></div>
13 if (typeof iD == 'undefined') {
14 document.getElementById('id-container').innerHTML = 'This editor is supported ' +
15 'in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. ' +
16 'Please upgrade your browser or use Potlatch 2 to edit the map.';
17 document.getElementById('id-container').className = 'unsupported';
21 .assetPath("/assets/iD/") <%# Can't use asset_path('iD/') in production. %>
23 <% token = @user.access_token(ID_KEY) %>
24 url: "<%= request.protocol + request.host_with_port %>",
25 oauth_consumer_key: "<%= token.client_application.key %>",
26 oauth_secret: "<%= token.client_application.secret %>",
27 oauth_token: "<%= token.token %>",
28 oauth_token_secret: "<%= token.secret %>"
31 id.map().on('move.embed', function() {
32 var extent = id.map().extent(),
33 zoom = ~~id.map().zoom(),
34 center = id.map().center();
47 parent.$("body").on("click", "a.set_position", function (e) {
49 var data = parent.$(this).data();
52 Math.max(data.zoom || 15, 13));
55 d3.select('#id-container')