<% zoom = params['zoom'] || '4' %>
<% end %>
-<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
+<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<%= javascript_include_tag 'map.js' %>
+<% unless @user %>
+<script src="http://www.mappam.com/javascripts/mappam.js" type="text/javascript"></script>
+<% end %>
+
+
<script type="text/javascript">
<!--
- var ie6 = ! ( window.addEventListener || window.XMLHttpRequest );
+ var ie = navigator.appName.indexOf("Microsoft Internet Explorer") != -1;
var map;
function init(){
map.events.register("moveend", map, updateLocation);
updateLocation();
+ <% unless @user %>
+ if ( window.location.hostname == "www.openstreetmap.org" ) {
+ mappam.register( map, '10011756636067178496', '1');
+ } else if( window.location.hostname == "openstreetmap.org" ) {
+ mappam.register( map, '6738410720121976832', '1');
+ }
+ <% end %>
+
document.getElementById('map_OpenLayers_ViewPort').style.position = 'absolute';
- if ( ie6 ) {
+ if ( ie ) {
handleResize();
}
}
var bottom = getStyle( el, 'bottom' );
var right = getStyle( el, 'right' );
var width = el.old_width;
+ var height;
if( ! width ) {
width = getStyle( el, 'width' );
}
if( el.offsetParent.nodeName == 'BODY' || el.offsetParent.nodeName == 'HTML' ) {
if( typeof( window.innerWidth ) == 'number' ) {
pwidth = window.innerWidth;
- height = window.innerHeight;
+ pheight = window.innerHeight;
} else if( document.documentElement &&
( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
pwidth = document.documentElement.clientWidth;
}
map.updateSize();
el.style.display = 'none';
- setTimeout( function() {
- el.style.display = '';
- }, 200 );
+ setTimeout( function() { el.style.display = ''; }, 200 );
}
- if ( ie6 ) {
+ if ( ie ) {
window.onresize = handleResize;
}