Hi, I'm new with Google map. I need a help to provide the solution on How to display alternative map if location is not found. I'm using Google map search to search a location and display it in street-view level of Google map. However, some location is not found and by default it showed the Google HQ location. What I want is, if the location is not found, then display the country of the location. Please help on how to do that.
Below is an example of my code. It is searching for a location in China, when it didn't find, it shows Google HQ. What I want is to show Hunan city in China, instead of Google HQ, when the location is not found. <script src="http://maps.google.com/maps? file=api&v=2&key=ABQIAAAAK_ZfODPLGLzloBv0UvGyARQ6-_- cI_bdr04DUplZumMzL9cDrRSgdL9ZHpS5J-QC_2ZFLWLaF70qhQ" type="text/javascript"></script> <script src="http://www.google.com/uds/api? file=uds.js&v=1.0&source=uds-msw&key=ABQIAAAAK_ZfODPLGLzloBv0UvGyARQ6- _-cI_bdr04DUplZumMzL9cDrRSgdL9ZHpS5J-QC_2ZFLWLaF70qhQ" type="text/javascript"></script> <style type="text/css"> @import url("http://www.google.com/uds/css/gsearch.css"); </style> <!-- Map Search Control and Stylesheet --> <script type="text/javascript"> window._uds_msw_donotrepair = true; </script> <script src="http://www.google.com/uds/solutions/mapsearch/ gsmapsearch.js?mode=new" type="text/javascript"></script> <style type="text/css"> @import url("http://www.google.com/uds/solutions/mapsearch/ gsmapsearch.css"); </style> <style type="text/css"> .gsmsc-mapDiv { height : 300px; } .gsmsc-idleMapDiv { height : 300px; } #mapsearch { width : 560px; margin: 10px; padding: 4px; } </style> <script type="text/javascript"> function LoadMapSearchControl() { var options = { zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL, title : "Aula sin Fronteras", url : "http://www.spainexchange.com/school-3000-en.htm", idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+1, activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+1 } new GSmapSearchControl( document.getElementById("mapsearch"), "45 Chiling Road, Tianxin District, Changsha, Hunan, 410076, China", options ); } // arrange for this function to be called during body.onload // event processing GSearch.setOnLoadCallback(LoadMapSearchControl); </script> <div id="mapsearch"> <span style="color:#676767;font-size:11px;margin:10px;padding: 4px;">Loading...</span> </div> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. 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 -~----------~----~----~----~------~----~------~--~---