[Google Maps API v3] Custom routes/roads/paths from Building to Building, through buildings HELP!

26 views
Skip to first unread message

d.gl...@hotmail.com

unread,
Apr 29, 2010, 9:33:32 PM4/29/10
to Google Maps JavaScript API v3
Hey guys. I need to know, and as quickly as possible, if what I need
is achievable.

I need to be able to, using either V2 OR V3 (preferably 3), create
paths which ignore buildings in a sense.

I was trying to create even a kml file to draw out all of the paths
myself, and then find some way to turn them on/off as needed.

For example. The user wants to go from point A to point B. Between
these points is a number of buildings. The user physically CAN walk
through these buildings(it's a campus). I want to show them that on
the map.

This way you don't have to do a loop-de-loop around, say, a parking
lot, just to get to the other end of it.

If there is ANY way AT ALL to do this, I'd love to know.

An example of what I require can be found here: http://www.uottawa.ca/maps/


It's all pre-determined paths based on the two inputs from the user
into the dropdown menu. I can plainly see this. But I have no clue
if a) this can be done in v3, and b) how on earth they did it
themselves.

Assistance required, and greatly appreciated!

--
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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Daniels Lee™

unread,
May 4, 2010, 6:49:59 PM5/4/10
to google-map...@googlegroups.com
Hey d.glover,

It sounds like you're looking for 'walking directions' between two points, which is currently an available travel mode option in V3:
http://code.google.com/apis/maps/documentation/v3/reference.html#DirectionsTravelMode

In order words, you can use the DirectionsService object to retrieve a DirectionsResult object containing walking directions from point A to B.  You could then easily display this on a webpage, with a map, using the DirectionsRenderer object.

Have you explored this option?


Thanks,

Dann
--
Daniels Lee
Developer Programs Engineer
Google, Inc.
345 Spear Street
San Francisco, CA 94105
650 253 0967

William

unread,
May 5, 2010, 4:25:45 AM5/5/10
to Google Maps JavaScript API v3
On Apr 30, 11:33 am, "d.glo...@hotmail.com" <d.glo...@hotmail.com>
wrote:
> It's all pre-determined paths based on the two inputs from the user
> into the dropdown menu.  I can plainly see this.  But I have no clue
> if a) this can be done in v3, and b) how on earth they did it
> themselves.

they did it themselves by applying Dikjstra's algorithm to calculate
the shortest path in a network. See the javascript files:
RoutingAlgorithm.js for the algorithm and PATHS.js for the network,
which is comprised of vertices and paths. For more details see
http://en.wikipedia.org/wiki/Dijkstra's_algorithm

...
Reply all
Reply to author
Forward
0 new messages