Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder noneforit's Avatar
    Join Date
    Apr 2009
    Location
    England
    Posts
    268
    Thanks
    10
    Thanked 20 Times in 20 Posts

    Embed Google Maps?

    Hello

    I am creating a website which will need to embed a google map which needs to be searchable.

    Basically people need to go to the website, put in thier road name and allow comments to be seen.

    I have seen it where a comment can be assigned to a specific point in a map for example zooming in to see someones house, and there is a comment on the map which pops up saying 'so and so's house'

    Now I know how to embed the map in but im not sure how to have the search function (so people can put in their road name) and the comments bit??

    Any help appreciated

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,588
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    You have to call two separate Google methods.

    First, you have to "GeoCode" the location. That gives you the latitude and longitude of the given address (or not! some addresses can't be geocoded or produce multiple geocodings because of ambiguity). *THEN* you can use the lat/long to specify the point on the map.

    Just go to the google maps APIs and look at the many examples they have there. It's tedious coding, but it's not hard.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •