Hello, I am here by a friend of mine, but I am very bad in English (do this also translated via Google Translate: $).
I have a page where people can post news. It should be also possible to locate only. That is the system display: 1 They fill all fields. 2 Men + fills the address space, and then press search 3 The location is searched (the page is not updated, only the directory) 4 Using the marker, the exact location found All this can be found at: http://www.nieuwshoorn.nl/test/maps/13.php code: <script src="http://maps.google.com/maps? file=api&v=2.x&key=ABQIAAAAh2UQO90DoyWAQxuy0_jDABT1IKIuLIgvk8j_Q_l4vA6LgWbF9BSXFHz67vKWhWCMZI8QFNW1mOTi9Q" type="text/javascript"></script> <script type="text/javascript"> var map = null; var geocoder = null; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(52.64454, 5.05513), 13); geocoder = new GClientGeocoder(); } } function showAddress(address) { if (geocoder) { initialize(); geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 14); var marker = new GMarker(point, {draggable: true, bouncy: false}); GEvent.addListener(marker, 'dragend', function(){ document.getElementById("lat").value = marker.getPoint().lat(); document.getElementById("lng").value = marker.getPoint().lng(); }); map.addOverlay(marker); ; } } ); } } </script> </head> <body onload="initialize()" onunload="GUnload()"> <? ini_set('arg_separator.output','&'); ini_set('arg_separator.output',';'); ini_set('session.use_trans_sid','0'); if ($HTTP_POST_VARS["titel"] && $HTTP_POST_VARS["msg"] && $HTTP_POST_VARS["datum"]) { echo "volgende pagina"; echo "titel:".$_POST['titel']."<br/> bericht:".$_POST['msg']."<br/> cootje:".$_POST['lat']."<br/> cootje2:".$_POST['lon']."<br/> "; } if ($HTTP_POST_VARS["submit"]) $err = "Enkele velden vergeten."; if ($HTTP_POST_VARS["datum"]) $cdate = $HTTP_POST_VARS["datum"]; else $cdate = date("d-m-Y"); $ctijd = date("H:i"); $ip = $_SERVER['REMOTE_ADDR']; echo " <form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\"> <div class=\"nieuwsberichtboven\">(Sport)Nieuws toevoegen</ div> <div class=\"midden\"> <input type=\"hidden\" name=\"pagina\" value=\"add\" /> <input type=\"hidden\" name=\"datum\" value=\"". $cdate. "\" /> <input type=\"hidden\" name=\"tijd\" value=\"". $ctijd. "\" / > <input type=\"hidden\" name=\"ip\" value=\"". $ip. "\" /> <table width=\"100%\"> <tr> <td width=\"25%\">soort nieuwsbericht:</td> <td width=\"75%\"> <select name=\"soortnieuws\"> <option value=\"nieuws\">nieuws</option> <option value=\"sport\">sport</option> </select> </td> </tr> <tr> <td>titel:</td> <td><input type=\"text\" style=\"width: 100%;\" name= \"titel\" value=\"titel\" /></td> </tr> <tr> <td valign=\"top\">bericht:</td> <td><textarea name=\"msg\" rows=\"10\" style=\"width: 100%;\">bericht</textarea></td> </tr> <tr> <td>bron:<a onmouseover=\"Tip('indien dit bericht van een andere site komt, graag even de bron vermelden')\" onmouseout= \"UnTip()\"><img src=\"../images/vraagteken.gif\" alt=\"?\"/></a></td> <td><input type=\"text\" style=\"width: 100%;\" name= \"bron\" value=\"bron\" /></td> </tr> </table> </div> <br/> <div class=\"nieuwsberichtboven\">Over U</div> <div class=\"midden\"> <table width=\"100%\"> <tr> <td width=\"25%\">uw naam:</td> <td width=\"75%\"> <input type=\"text\" size=\"70\" name=\"poster\" value= \"uw naam\" /> </td> </tr> <tr> <td>uw IP-adres:</td> <td>"; echo $_SERVER['REMOTE_ADDR']; echo "</td> </tr> </table> <br/> <input type=\"submit\" name=\"setLatLon\" value=\"Toevoegen \" /> </form> </div> <br/> <div class=\"nieuwsberichtboven\">Kaart</div> <div class=\"midden\"> <form onsubmit=\"showAddress(this.adres.value + this.plaats.value); return false\"> <p> <input type=\"text\" size=\"60\" name=\"adres\" value= \"Dorpsstraat\" /> <input type=\"text\" size=\"60\" name=\"plaats\" value= \"Zwaag\" /> <input type=\"submit\" value=\"Zoek op kaart\" /> </p> <div id=\"map_canvas\" style=\"width: 500px; height: 300px \"></div> <table> <tr> <td width=\"230\"> x: <input type=\"text\" style=\"width: 200px;\" name= \"lat\" id=\"lat\" value=\"\" readonly=\"readonly\" /><br/> </td> <td width=\"230\"> y: <input type=\"text\" style=\"width: 200px;\" name= \"lon\" id=\"lng\" readonly=\"readonly\" /> </td> </tr> </table> Indien u niet weet hoe u met de kaart kunt werken, <a href= \"http://www.nieuwshoorn.nl/thick/?pagina=kaart- nieuwstoevoegen&height=200&width=650\" title=\"Handleiding: kaart\" class=\"thickbox\">hier vindt u een handleiding</a>.<br/> <br /> </div> <br/> </form> "; ?> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
