Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlighting whole street with some maps API

Is there any way to highlight/display on Google/Bing/(any other map provider) Maps whole street (from the beginning of the street to the end of)?

I know the existence of Polyline in Google Maps API, but it's just connecting two latitude points, and there is no way of making it automatic so I could display any street in some city.

Also I was thinking about Directions, but many street are 2 way, there is no guarante that you will mark whole street and it's just now user friendly. Example

like image 595
SubZeroFX Avatar asked Jan 28 '10 14:01

SubZeroFX


People also ask

How do I highlight specific roads on Google Maps?

Use the Draw a Line tool (under the search bar, looks a bit like a share-icon), to draw either just a line, or a driving, walking or biking route. Note that your map can have one or more lines in it. Finish off each line by double-clicking on the final point.

Can you highlight an area on Google Maps?

You can trace a path or highlight an area on your map by drawing lines and shapes.

Is Open Street Map API free?

OpenStreetMap is a free, editable map of the whole world that is being built by volunteers largely from scratch and released with an open-content license. The OpenStreetMap License allows free (or almost free) access to our map images and all of our underlying map data.

How do I add multiple markers to Google Maps API?

Follow the below steps and add/show multiple markers on google maps using javascript with infowindows: Step 1 – Create HTML File For Display Multiple Markers. Step 2 – Add Google Maps API V3 in HTML. Step 3 – Implement JavaScript Function To Create Markers/Pins And Show on Google Map.


1 Answers

You may want to check Mike Williams' article on how to snap points and polylines to streets with the Google Maps API:

  • Snap points (and polylines) to street

Especially this example:

  • Click on the map and a path will be drawn that follows the streets.
like image 154
Daniel Vassallo Avatar answered Oct 17 '22 07:10

Daniel Vassallo