Is it possible to design/write openstreetmap (osm) routeplanner? - leaflet

I can display location on openstreetmap. I can calculate distance in between user location and the search result location based on their co-ordinates.
Now I like to make a routeplanner, like google does. Is there a way to write osm - openstreetmap routeplanner.
I would be highly thankful if some of you could kindly guide me on this

If you are planning to use Leaflet for this task, check the list of Leaflet plugins for route calculation.

Related

Mapbox Studio: landuse=residential not available?

I try to build a map for my stormchasing community. It is very important to see urban areas on the map. I tried to add a landuse=residential layer/filter but it seems Mapbox does not support this at all.
Any ideas or solutions on this?
You are correct that the Mapbox Streets v8 tileset does not contain a landuse=residential field. However, this type of data is available in OSM as shown here and can be downloaded using Overpass Turbo - you can refer to the "Add OpenStreetMap data to your Mapbox project" tutorial for steps on how to do that.
Once you've downloaded this data, you can upload it to your Mapbox account, add it as a new layer to your map, and style it accordingly.

Mapbox : Bulk markers breaks down browser

Could anyone please help me on this,
I am using map box to plot different markers around 10,000+ in a window using GeoJSON format. While loading so, the browser window will get stuck and the user is not able to perform any actions. Is there any other alternative way to get rid of this or optimizing it.
Thanks in advance
You can have a look at Mapbox-GL-JS. The guys at mapbox have implemented a smart strategy to parse and visualize large GeoJSON files using web workers.
Additionally, MapboxGL uses WebGL to visualize the data, so it should perform better with large datasets.
Other options include using an Html5 Canvas to render the data. Here is an example with Leaflet and Canvas overlay: http://bl.ocks.org/sumbera/11114288
Please check this out to optimize the loading & performance :
Optimizing data in mapbox

Using OpenStreet map in website with LeafletJS to display heapmap

Is it possible to download OSM or embed OSM and use leafletjs on top of it to display heat map?
I have searched a lot and could not find anything related. I wanted something like this form Google Maps.
https://developers.google.com/maps/documentation/javascript/examples/layer-heatmap
I did find the mapbox but we need to pay them. I need something open source.
Please suggest me.
You can create heatmaps with Leaflet by using the various available plugins:
http://leafletjs.com/plugins.html#heatmaps
However, you'll need some vector data to build a heatmap, not just the tilelayer. If you want to use OpenStreetMap to get your data, try a service like http://overpass-turbo.eu/ to download the things you want in this format.

How to add Mapbox basemap to leaflet?

I am using the Leaflet example of mapping points from CSV. But I want to use my mapbox basemap.
https://github.com/perrygeo/leaflet-simple-csv
I am new to leaflet. Any help much appreciated.
You can pass Leaflet a URL to the map's TileJSON endpoint. Here's a basic template as well as some more documentation on Mapbox's API.
http://{s}.tiles.mapbox.com/v3/user.map-id/{z}/{x}/{y}.png

OSM Layer in Bing maps

Since Bing Maps last update I can't find OpenStreetMaps layer. Is OSM unsupported by Microsoft in Bing Maps for now?
This is possible - here is a blog post that provides some of the details:
http://alastaira.wordpress.com/2011/04/01/displaying-open-street-map-and-esri-tiles-on-bing-maps-ajax-v7/
The quick pointer is to create a custom tile source representing OpenStreetMaps and add it as a tile layer into the map.
Hope that helps!
For those looking for a Windows Store App solution (WinRT), check the following link
Bing Maps OSM sample