Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Google Maps API

Options
  • 03-10-2005 4:52pm
    #1
    Closed Accounts Posts: 334 ✭✭


    Hi,

    Has anyone used the Google Map API. I have added it into a test site and it looks fine. The problem is finding the coordinates of towns that I want to add in. Anyone know a reliable site where I can get them?
    I found this site http://www.mapsofworld.com/lat_long/ireland-lat-long.html but the coordinates are all off, e.g the coordinates for Dublin give you Bray, for Clonmel you are nearly in Waterford etc.
    I want my client to be able to add in locations himself. I have it linked up to a database where all he has to do is add in the coordinates and the details and it will automatically click on the map, but without reliable coordinates it is useless...

    http://www.castlecomer.ie/maptest.php (note, it is very much under construction, trying to get functionality working, before design...)


Comments

  • Registered Users Posts: 884 ✭✭✭Cork Skate


    Has anyone used the Google Map API.

    What is the link for it ???


  • Closed Accounts Posts: 334 ✭✭WhatsGoingOn


    Cork Skate wrote:
    What is the link for it ???

    http://www.google.com/apis/maps/


  • Closed Accounts Posts: 132 ✭✭canker


    From googles map api website
    Google retains the right to put advertising on the map in the future

    if your justin doing something basic it may be worth making it yourself in case you get stuck with ads. I've recently made something similar myself http://www.farmingtheworld.com/map . just uses x and y coordinates on a map jpeg and puts divs in those locations to point to stuff. If you had good detailed maps (like googles ones) you could create really nice stuff just doing this.


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Hi,

    Has anyone used the Google Map API. I have added it into a test site and it looks fine. The problem is finding the coordinates of towns that I want to add in. Anyone know a reliable site where I can get them?
    I found this site http://www.mapsofworld.com/lat_long/ireland-lat-long.html but the coordinates are all off, e.g the coordinates for Dublin give you Bray, for Clonmel you are nearly in Waterford etc.
    I want my client to be able to add in locations himself. I have it linked up to a database where all he has to do is add in the coordinates and the details and it will automatically click on the map, but without reliable coordinates it is useless...

    http://www.castlecomer.ie/maptest.php (note, it is very much under construction, trying to get functionality working, before design...)


    I use the Google API on my site (though only for FireFox users, for some reason I get a blank page, or DNS error when I access the page using IE :( )

    I was able to get the co-ordinates I wanted, but it wasn't too pretty. I went to the http://maps.google.com/, and moved the map around till the location I wanted was in the centre of the map. (Double click on the place that you want centre of the map)

    I then clicked the "link to the page" link, and the title bar displayed the co-ordinates in the querystring.
    http://maps.google.com/maps?ll=53.263968,-6.145928&spn=0.004426,0.012149&hl=en
    I then had to strip this out and enter the co-ordinates.

    However, it may not be too hard to train the client to get as far as the link page and enter the full URL into a page that can strip out the details you need.

    Eoin


  • Closed Accounts Posts: 334 ✭✭WhatsGoingOn


    eoin_s wrote:
    I use the Google API on my site (though only for FireFox users, for some reason I get a blank page, or DNS error when I access the page using IE :( )

    I was able to get the co-ordinates I wanted, but it wasn't too pretty. I went to the http://maps.google.com/, and moved the map around till the location I wanted was in the centre of the map. (Double click on the place that you want centre of the map)

    I then clicked the "link to the page" link, and the title bar displayed the co-ordinates in the querystring.
    http://maps.google.com/maps?ll=53.263968,-6.145928&spn=0.004426,0.012149&hl=en
    I then had to strip this out and enter the co-ordinates.

    However, it may not be too hard to train the client to get as far as the link page and enter the full URL into a page that can strip out the details you need.

    Eoin

    That's a good idea, thanks Eoin.

    (Thanks aswell canker, but that is too much work for what I want curently ;) )


  • Advertisement
  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    That's a good idea, thanks Eoin.

    (Thanks aswell canker, but that is too much work for what I want curently ;) )

    Was quite curious actually - here is an ASP example, don't know if it would be of any use to you:
    <% Option Explicit %>
    <%
    Dim sURL, nStart, nEnd, sCoord, sFirstCo, sSecondCo
    sURL = "http://maps.google.com/maps?ll=53.263968,-6.145928&spn=0.004426,0.012149&hl=en"
    nStart = Instr(sURL, "ll=") +3
    nEnd   = instr(mid(sURL, nStart, len(sURL)),"&")
    sCoord = mid(sURL, nStart, nEnd)
    sFirstCo = mid(sCoord, instr(sCoord, ",")+1,len(sCoord))
    sFirstCo = Replace(sFirstCo, "&", "")
    sSecondCo = mid(sCoord, 1, instr(sCoord, ",")- 1)
    Response.Write sFirstCo & "<BR>"
    Response.Write sSecondCo
    %>
    <pre>
    new GPoint(<%=sFirstCo%>,<%=sSecondCo%>);
    </pre>
    


  • Closed Accounts Posts: 334 ✭✭WhatsGoingOn


    No, I use PHP, thanks anyway, but looks like a good idea

    eoin_s wrote:
    Was quite curious actually - here is an ASP example, don't know if it would be of any use to you:
    <% Option Explicit %>
    <%
    Dim sURL, nStart, nEnd, sCoord, sFirstCo, sSecondCo
    sURL = "http://maps.google.com/maps?ll=53.263968,-6.145928&spn=0.004426,0.012149&hl=en"
    nStart = Instr(sURL, "ll=") +3
    nEnd   = instr(mid(sURL, nStart, len(sURL)),"&")
    sCoord = mid(sURL, nStart, nEnd)
    sFirstCo = mid(sCoord, instr(sCoord, ",")+1,len(sCoord))
    sFirstCo = Replace(sFirstCo, "&", "")
    sSecondCo = mid(sCoord, 1, instr(sCoord, ",")- 1)
    Response.Write sFirstCo & "<BR>"
    Response.Write sSecondCo
    %>
    <pre>
    new GPoint(<%=sFirstCo%>,<%=sSecondCo%>);
    </pre>
    


  • Registered Users Posts: 1 odohertys


    I have a proposition for you
    Can you give me some help with the code for linking a database to a google map and I will give you a list of co-ords for Irish Towns
    Regards
    Séamus
    Hi,

    Has anyone used the Google Map API. I have added it into a test site and it looks fine. The problem is finding the coordinates of towns that I want to add in. Anyone know a reliable site where I can get them?
    I found this site http://www.mapsofworld.com/lat_long/ireland-lat-long.html but the coordinates are all off, e.g the coordinates for Dublin give you Bray, for Clonmel you are nearly in Waterford etc.
    I want my client to be able to add in locations himself. I have it linked up to a database where all he has to do is add in the coordinates and the details and it will automatically click on the map, but without reliable coordinates it is useless...

    http://www.castlecomer.ie/maptest.php (note, it is very much under construction, trying to get functionality working, before design...)


  • Closed Accounts Posts: 334 ✭✭WhatsGoingOn


    odohertys wrote:
    I have a proposition for you
    Can you give me some help with the code for linking a database to a google map and I will give you a list of co-ords for Irish Towns
    Regards
    Séamus

    PM sent.


Advertisement