Only do mappam for www.openstreetmap.org and openstreetmap.org to stop
the annoying "wrong API key" errors popping up all the time on my test environment.
This commit is contained in:
parent
344fced9a6
commit
4358a6adcb
1 changed files with 8 additions and 10 deletions
|
@ -20,10 +20,9 @@
|
||||||
<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
|
<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
|
||||||
<%= javascript_include_tag 'map.js' %>
|
<%= javascript_include_tag 'map.js' %>
|
||||||
|
|
||||||
<% unless @user %>
|
<% unless @user %>
|
||||||
<script src="http://www.mappam.com/javascripts/mappam.js" type="text/javascript"></script>
|
<script src="http://www.mappam.com/javascripts/mappam.js" type="text/javascript"></script>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -49,12 +48,11 @@
|
||||||
updateLocation();
|
updateLocation();
|
||||||
|
|
||||||
<% unless @user %>
|
<% unless @user %>
|
||||||
if( window.location.host.match( /^www/ ) ) {
|
if ( window.location.hostname == "www.openstreetmap.org" ) {
|
||||||
mappam.register( map, '10011756636067178496', '1');
|
mappam.register( map, '10011756636067178496', '1');
|
||||||
} else {
|
} else if( window.location.hostname == "openstreetmap.org" ) {
|
||||||
mappam.register( map, '6738410720121976832', '1');
|
mappam.register( map, '6738410720121976832', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
document.getElementById('map_OpenLayers_ViewPort').style.position = 'absolute';
|
document.getElementById('map_OpenLayers_ViewPort').style.position = 'absolute';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue