I read this article here which says that I can use the exact address as a string for the setCenter() function. So here I have my code -
var search_location = "City+Hall,New+York,NY"; //var searchLocation_LatLng = new GLatLng(37.7916,-122.4418); function load() { map = new GMap2(document.getElementById("map")); GEvent.addListener(map, "load", function() {updateMap();}); map.setCenter(search_location, 13); ..................... ................... }. The above code does not work if using the 'search_location' variable. It gives the error - a.lng is not a function in main.js file! But the code works if I use the 'searchLocation_LatLng' variable. Can you please help. I need to be able to use the address directly if possible in setCenter() function. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-api/-/AMSHdta2NEMJ. To post to this group, send email to google-maps-api@googlegroups.com. To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.