I need to make coordinates from the user's input (address he writes there), that's all.
On 24 srp, 21:31, "[email protected]" <[email protected]> wrote: > On Aug 24, 11:52 am, jontes <[email protected]> wrote: > > > Thanks, but I can't get it working. I make in that place a cookie, > > that does display when I use document.write directly in the function, > > but again, it doesn't work outside - when i want to read a cookie with > > php. Is it possible or I do (again) something wrong? > > Take a step back. > You haven't shared your website with us, but is Sydney going to > move? > Why are you trying to geocode it when the page loads? > Can you use the coordinates instead? > > (maybe the answers to the questions above are you need to geocode it, > but for a simple website, unless it is showing the user's address or > your current location, I would think you could simplify things by > taking the geocoder out of the picture) > > -- Larry > > > > > > > code in the HERE section: > > var sou = results[0].geometry.location; > > setCookie('souradnice', sou); // my function (it works) > > > I call it: > > codeAddress(adresa); > > > and then want to display it: > > document.write(readCookie('souradnice'); > > > and it says "null" > > > I know it's not a topic directly tied to Google Maps, but I'd really > > like to be able to get it working. > > > On 24 srp, 20:20, Rossko <[email protected]> wrote: > > > > > Thanks for a quick reply. But i still don't understand it. I need to > > > > get the location to php script (through cookies). How can i do this? > > > > function codeAddress(adresa) { > > > var geocoder = new google.maps.Geocoder(); > > > geocoder.geocode( { 'address': adresa}, function(results, status) > > > { > > > if (status == google.maps.GeocoderStatus.OK) { > > > > Do whatever it is you need to do with the results HERE.- Hide > > > quoted text - > > > - Show quoted text - -- 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 [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-js-api-v3?hl=en.
