You've got setZoom to a LatLng pair, should be an integer. Could be other errors, that is the first one that stopped the code from running.
On Sep 4, 3:14 pm, Ben <benh...@gmail.com> wrote: > Hi everybody, > > I am new to google maps so please bear with me. I am hoping to upgrade > this mapping project to the V3 API :http://livingnewdeal.berkeley.edu/map/ > > I am working with a local copy, but created a testing site so > hopefully someone can help me troubleshoot this problem. New map with > API V3: benhass.com/testing/map/ > > showAddressOld() function was used for V2, and I am now working on > showAddress() . I can see in Firebug that the new function is creating > markers, however they are not displaying on the map for some reason. I > know I must be missing something obvious. Can anyone point me in the > right direction? > > Thanks in advance, > Ben > > function initialize() { > > var latlng = new google.maps.LatLng(37.58269, -119.355469); > var myOptions = { > zoom: 6, > center: latlng, > mapTypeId: google.maps.MapTypeId.TERRAIN, > mapTypeControlOptions: { > style: google.maps.MapTypeControlStyle.DROPDOWN_MENU > }, > }; > var map = new > google.maps.Map(document.getElementById("map_canvas"), myOptions); > > displayMarkers(); > > } > > function displayMarkers() { > <?php print $js_string; ?> > } > > var markerInfo = new Array(); > var myLatLng = new Array(); > var marker = new Array(); > > function > showAddress(index,id,address,title,category,latitude,longitude) { > myLatLng[index] = new google.maps.LatLng(latitude, > longitude); > marker[index] = new google.maps.Marker({ > position: myLatLng[index], > title: title, > }); > > } > > // API V2 function > /* function > showAddressOld(index,id,address,title,category,latitude,longitude) { > var infoWindow = "<a href=\"view.php?l=" + id + "<?php print > $admin_qstr; ?>\">" + title + "</a><br>" + address; > var point = new GLatLng(latitude, longitude); > marker[index] = new GMarker(point); > markerInfo[index] = infoWindow; > GEvent.addListener(marker[index], "click", function() > { this.openInfoWindowHtml(markerInfo[index]) }); > map.addOverlay(marker[index]); > var marker_color = String(MarkerLookup[category]); > marker[index].setImage(preload[marker_color].src); > numPoints = numPoints++; > } > */ -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api...@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.