Google Maps V3 (Calc Distance from Route)

Discussion in 'Google API' started by rikkouri, Jun 1, 2011.

  1. #1
    Hi all,

    I was wondering if anyone could off some advice on the following theoretical issue, before I begin development of my app. I have a theoretical database populated with several thousand markers. The user of my site will enter there Start/Destination into my map; which thanks to google’s wonderful API, will provide them with a route. I would then go and add my markers to their map. The problem I have is, that displaying several thousand markers is going to be slow and terribly messy from the user’s point of view.

    Can anyone think of a means of simply displaying only the markers within ‘x’miles from the route?

    Ideally I’d love base the distance calculations upon the driving distance rather than the Air distance, but I don’t believe this is going to be possible as I expect it would require a DirectionRequest for each marker! eeep!
    As it stands none of the data has been populated into the database, which means that I don’t mind using Post Codes or the LatLon; actually, I’d be interested to know which you guys would suggest, although I’m pretty certain that using LatLon would be faster.
     
    rikkouri, Jun 1, 2011 IP
  2. andre01

    andre01 Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #2
    thanks for this information
     
    andre01, Jun 18, 2011 IP