See this thread

http://groups.google.com/group/Google-Maps-API/browse_thread/thread/9871913ff01f4025/534bb43bffb635c8?hl=en&lnk=raot#534bb43bffb635c8

Ralph

On Feb 4, 3:14 pm, Goooglias <[email protected]> wrote:
> i have written the script where the site shows the map with the
> adress from customers. but if there is a adress not found, the
> standard alert message is shown and a blank google map. But i want,
> that if adress not found, there should be a echo or something where
> stands: Google map : Adress not found and then he should NOT show a
> blank map. Only a echo message, that the adress is not found in
> google
> maps. this is my code, unfortunately i can`t show it, yet because
> it`s
> not on a server. Can anybody help me and show me what i have to
> change. It´s not much. Thanks a lot!
>
> <script src="http://maps.google.com/maps?
> file=api&amp;v=2&amp;key=xxxxx" type="text/javascript"></script>
> <script type="text/javascript">
>
>  //<![CDATA[
>
> var map = null;
> var geocoder = null;
>
> function load() {
>   if (GBrowserIsCompatible()) {
>     var map = new GMap2(document.getElementById("map"));
>     var control = new GLargeMapControl();
>     map.addControl(control);
>     control = new GMapTypeControl();
>     map.addControl(control);
>     map.setCenter(new GLatLng(49.403769,8.67538), 14);
>     map.setMapType(G_NORMAL_MAP);
>
>     var marker = new GMarker(point);
>     map.addOverlay(marker);
>     GEvent.addListener(marker, "click", function() {
>     marker.openInfoWindowHtml("Das hier ist ein Marker");
>
>     });
>   }
>
> }
>
> function load() {
>
> if (GBrowserIsCompatible()) {
>
>       map = new GMap2(document.getElementById("map"));
>
>       map.addControl(new GSmallMapControl());
>
> map.addControl(new GMapTypeControl());
>
>  geocoder = new GClientGeocoder();
>
>  }
>
>  }
>
> function showAddress(address) {
>
>       if (geocoder) {
>
>         geocoder.getLatLng(
>
>           address,
>
>           function(point)
>
>          {
>             if (!point)
>
>              {
>             alert(address + " not found");
>
>              }
>
>             else {
>                 map.setCenter(point, 13);
>
>               var marker = new GMarker(point);
>
>               //Marker setzen
>               map.addOverlay(marker);
>
>              }
>           }
>         )
>       }
>     }
>     //]]>
>    </script>
>
> </head>
>
> <body background="../../pics/hg.jpg" onload="load(); showAddress('<?
> php echo $oSch->strasse ?>, <?php echo $oSch->plz ?>, <?php echo
> $oSch-
>
> >ort ?>, <?php echo $oSch->land ?>');" onunload="GUnload()">
>
>     <script language="javascript">
>     if (1)
>     {
>     document.write("<center><div id='map' style='width: 339px;
> height:
> 300px'></div></center>");
>     }
>     else
>     { document.write("Map not found") }
>     </script>
>
>         <?php unset($oSch); ?>
>
> <script type="text/javascript">
> x = screen.availWidth;
> y = screen.availHeight;
> window.scrollTo(1,1);
> window.resizeTo(x,y);
> </SCRIPT>
>
> </body>
> </html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to