[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1582
  • Last Modified:

Using Google Maps to pinpoint an exact location

Objective: I want to let my clients refine my geolocation data.

Here's what I have working so far...

Given a ZIP code and street address, I call a geocoder service and get back a latitude/longitude pair (geolocation).  I can open a new web page with a Google Map showing this geolocation with a pushpin.

Required...

I want to enable the client to see and approve that Google Map.  If the client wants to change the location, I want him to be able to reposition the pushpin to the correct location.  When he is satisfied with the final location of the pushpin, I want the client to "click OK" and I want to be able to get the new latitude/longitude pair back into my PHP script.  In a perfect world, the return data would arrive synchronously, as if it were presented in a form via $_POST.

Desirable...

I want the Google Map embedded in my site for consistent look and feel.

Thanks and regards to all,
Ray

PS:  I'm comfortable at any level in PHP, and better than novice in Javascript.  I'm looking for documentation links, guidance and code examples that I can adapt.
0
Ray Paseur
Asked:
Ray Paseur
  • 3
  • 3
  • 2
  • +1
1 Solution
 
Tony McCreathTechnical SEO ConsultantCommented:
I've created the same thing for the same reason. I've just added a downloadable zip to  make it easy to embed it into your own website.

You would have to enhance it to post to a php file and do your submission.

http://www.mccreath.org.uk/Article/Google-Maps-Location-Finder_42.aspx

0
 
alain34Commented:
Tiggerito,

Thanks for your comment.
However, when I want to select something outside australia, The address is not changing.
Is it normal?

Cheers,

Alin34
0
 
Tyler LaczkoCommented:
luckily i monitored this question. what a great solution thank you very much!!!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Tony McCreathTechnical SEO ConsultantCommented:
You should be able to enter any address in the world. Works for me!

You do have to click the go button. (responding to the enter key is on my list)

The downloadable zip version lets you easily specify the starting location
0
 
Tyler LaczkoCommented:
for the enter button pressed just place the input boxes in a <form>
0
 
Tyler LaczkoCommented:
heres the code if anyone wants it
            <tr>
                <td style="white-space: nowrap;">
                    <b>Address: </b>
                </td>
                <form>
                <td style="white-space: nowrap;">
                    <input id="TextBoxAddress" style="width: 266px;" type="text"/></td>
                <td style="white-space: nowrap;" align="right">
                    <input value="Go" onclick="moveEditorMarkerAddress();return false;" type="submit"/></td>
                </form>
            </tr>

Open in new window

0
 
Tony McCreathTechnical SEO ConsultantCommented:
Should work for most. I use Asp.Net and it does not allow you to add your own form tags.

0
 
Ray PaseurAuthor Commented:
That is fucking perfect!  Awesome.  Thanks very much for the info - I can adapt it to exactly what I need.
0
 
Ray PaseurAuthor Commented:
@Tiggerito: Very cool.  Thanks again, ~Ray
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now