SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Google Maps all f*%cked up in IE7

    Please check out

    http://www.nightcure.com/Miami/clubs...n/Mansion.html

    and you will get an idea of what I am talking about.

    Code:
    	<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAo0tTEOQ8gvr3hUl6EhA31RTrV5OUKVMtbMkCzesa__gkVY_OUhTFmemeDgCqaGqJkxkQGBxH7VNV5A" type="text/javascript"></script>
    	<script type="text/javascript">
    		//<![CDATA[
    				
    		var map = null;
    		var geocoder = null;
    			
    		    function load() {
    		      if (GBrowserIsCompatible()) {
    		        map = new GMap2(document.getElementById("map"));
    				map.addControl(new GSmallMapControl());
    				// map.addControl(new GMapTypeControl());
    		        geocoder = new GClientGeocoder();
    				// sets center of the map to the address
    				if (geocoder) {
    					geocoder.getLatLng(
    		          	'<?php=$map_address ?>',
    						function(point) {
    							if (!point) {
    								alert(address + " not found");
    							} else {
    		        				map.setCenter(point, 16);
    							}
    						}
    					);
    				}
    				// uses functin to add a marker to the map.
    				addPoint('{/literal}{$map_address}{literal}');
    		      }
    		    }
    		
    		    function addPoint(address) {
    		      if (geocoder) {
    		        geocoder.getLatLng(
    		          address,
    		          function(point) {
    		            if (!point) {
    		              alert(address + " not found");
    		            } else {
    		              var marker = new GMarker(point);
    		              map.addOverlay(marker);
    		            }
    		          }
    		        );
    		      }
    		    }
    		    //]]>
    	</script>
    This is the JavaScript that produces the map and then it sticks it into this div

    HTML Code:
    <div id="map" style="width: 235px; height: 150px; overflow: hidden"></div>
    I don't remember it always having this problem in IE7. To see how it should look as always just check firefox.

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried it in IE8 running in IE7 mode and it looks ok, odd because IE8 normally messes up google maps horribly.

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is what I got



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •