Polylines over Directions - correct approach? District heating plan - google-maps

My small rural village considers installing tubes in the streets to build a renewable district heating network. To get an idea of the necessary tubing and to involve villagers, i thought about setting up a simple webapp, where villagers can enter their addresses to indicate interest.
I'd then use Geocode API to obtain coordinates where i can place a marker. I'd also use the Directions API to get directions to the local power station. These directions would be converted to Polylines and drawn on the map. I can then color them according to the amount of heat a specific branch needs to supply. And where Polylines intersect, i can reduce to one common Polyline and build a tree-structure.
As i am not that experienced with the Google Map API, is this approach correct? That is using
Geocode API to resolve addresses to locations
Directions API to get directions from location to power plan
Polylines to draw the tree-like-structure of the network
And hints and ideas are very welcome! Thanks.

Related

Plotting a Google defined "route"

When using the Google Places Autocomplete to return a "route" type, such as a street, I want to take that route and plot several markers along it on the map.
Example: Take the entire route of "Yonge Street, Toronto, ON, Canada" and place markers all along that street from the beginning to end.
Currently searching for "Yonge Street, Toronto, ON, Canada" returns a single Lat/Long point for the entire route.
This needs to be done in a way that doesn't involve me manually selecting each point as I need this to function for any Google "route" on the globe.
I am stumped as to way to do this using Google Maps API v3.. perhaps there is another service that can help me get the Lat/Long points I need which I can then feed to the Google Maps API?
What you are looking for is currently not possible with the Google Maps API v3. You could add an enhancement request to the issues list, but doesn't seem likely to happen.
The geocoder actually returns 3 points along the road for your query ("Yonge Street, Toronto, ON, Canada"). You can get the coordinates of the street using the directions service, but you have to manually find the start and end, and possibly walking directions, maybe even add waypoints. But you said you didn't want to do that...

Find neighbors delimitations with google maps or google api

I need to find points that define delimitations of neighbors from Chicago.
My question is: How can I find a list with latitudes/longitudes of all the points that delimit neighbors. For example:
Gold Coast from Chicago is a polygon with 6 points as seen on google map: http://maps.google.com/maps/ms?ie=UTF8&t=m&vpsrc=6&source=embed&oe=UTF8&msa=0&msid=206241844247425110008.0004b43f0262868b8037f
What is the best way to extract this points so I can draw poly-lines over google map with google API for specific neighbors?
Edited:
So with addresses, which you already have, you can create a Maps API site:
http://code.google.com/apis/maps/
and use the Geocoding API to get the latitude and longitude of each of the addresses.
Added: Seems based on your comment that you're looking for neighborhood boundary data. Google Maps doesn't provide that data. There are different venders that do, one I have heard of is the Zillow Neighborhood API. I have never used it so I don't know much about it.

How to find a closest street

I'm reading through Google Maps API documentation and I wonder if such a think is possible:
I specify the point (by coords)
I search for all roads, and junctions around the node (say in 1km radius)
I get parameters for the streets around (polyline coords)
Is it reachable, or google do not share that data?
Thanks in advance
Rafal
I can image writing up a little script that generates a bunch of random points within a 1km radius and then performs directions services via Google Maps API to obtain all possible routes and thus streets within a 1km radius. However, this is problematic since it is kinda against the Google Maps TOS of displaying this information only on a map within a website and not extracting data for you personal use as this would be.
A better approach would be looking into utilizing Open Street Map data where you can download street data from a specific viewport. If buying street network data is an option, you can go to a commercial outlet such as NAVTEQ or PTV which post-processes NAVTEQ data to a format for use in the transport modeling software package you mention on your blog.

Google Maps API Driving Directions

I use Google Maps API and I have a map with 20 points on it.
Can I find an API call to give me driving directions and draw lines between them?
Yes, it can be done. The Google Maps API Documentation describes how to this very accurately:
"You can add the ability to calculate directions (using a variety of methods of transportation) by using the GDirections object. The GDirections object requests and receives direction results using either query strings (e.g. "New York, NY to Chicago, IL") or textual lat/lons.
The GDirections object also supports multi-part directions using a series of waypoints. Directions may be displayed as either a polyline drawing the route on a map, as a series of textual description within a <div> element (e.g. "Turn right onto the Williamsburg Bridge ramp") or both."
Unfortunately driving directions are not yet available for all countries. You may want to check the following spreadsheet to see if driving directions are available for a particular location:
Google Code - Map Coverage Filtered

Google Maps API (Google Directions) not working for particular location

While I m trying to draw a route for multi locations using google Map API, the route not available for some locations so the google maps not returning the map. I got the same result while trying by using the lattitude and longitude. One such location is orchha in uttarpradesh India to Delhi.
Driving directions is not yet officially supported in India. See this spreadsheet of supported features by country, so you might expect some inconsistencies.
Despite that, some directions requests work in India, for example most individual towns in Uttar Pradesh work. Perhaps the problem is that the geocoded point for Uttar Pradesh happens to be at a very blank area of farmland with no roads nearby. There's a limit to how far from a road a location can be for GDirections to work.