I'm working on a project (web application) kind of a trip planner which uses maps to show directions (driving) for the users which they enter destinations of their trip.
and I'm using Mapbox web services to do this.
What I'm trying to do is get the directions for user input which was entered early stage and plot it on a mapbox map.
I know how to get the directions calling the api directly, but I'm having hard time for show this data on a map, I know there is this directions.js which is a pulgin for mapbox but I dont understand how to implement it.
and is there a better or easy way to achieve this. thanks in advance
Mapbox Directions api
Leaflet plugin for the Mapbox Directions API
Check out this code example which does example what you want:
https://www.mapbox.com/mapbox.js/example/v1.0.0/mapbox-directions/
Related
If a client presented a project to make a webpage that displays a custom-styled calendar (with their google calendar events), what would be the best route to go? I'm trying to get started on a project to display a calendar on my tv via a Raspberry Pi. I've tried to search for everything I can on the topic, and it's been difficult to find anything that's clear enough to give me some direction. I figured asking the question on here may draw some attention from more experienced programmers. Much Thanks! I attached an image that's a rough example of what I'm hoping to create:
I want to display google map according to entered multiple locations in the form using php?I tried to find google api for php.Can anyone give some idea how to do this?
Using my android app, I am taking the current location of the user in a regular interval and displaying it on a Google map as marker using,
$map->addMarker($row['lat'],$row['lng'],$isclickable,$title,$info);
Please help me draw a route joining these markers.
One more thing, I am using Location managers Network provider for fetching the coordinates, so most of the points(latitude, longitude) are off the road. Is there any way to get it properly on the road?
Hi I have a database with a list of contacts in which I am displaying onto a page in a list.
As part of this result set I have a post code, is it possible to generate a google map from that postcode and display it as part of the result?
If it is can any one help me get started?
You can use the post code as the location for your map and google will usually be able to find it.
For example, using the static maps API, the following url will give you a map for the zip code 92117 (which is in San Diego, CA):
http://maps.googleapis.com/maps/api/staticmap?center=92117&size=400x400&sensor=false
You can also do something along the lines of what primehunter326 was suggesting and reverse geocode using the javascript API. Which approach is best depends on what you are trying to do.
Start here for info on how to use the various Google Maps APIs:
http://code.google.com/apis/maps/index.html
Yes it is possible. The basic idea is that you use geocode to get longitude and latitude coordinates for the address. You can then use javascript to display a map on your page with all the points as markers. I'll try to find a link with that goes over it in more detail.
Here is a link which goes over geocoding
You'll need an API key in order to use their services, here
I have been looking through the documentation for the API and not sure if it is possible to list multiple select stores near the submitted address.
Ultimately something like the following website: http://www.evolutionofsmooth.com/locator/
It seems like they have each location stored in a db but I can't see it that likely since it would be pretty huge to do something like that.
Any ideas?
They probably did store all the shops in a database. They saved the latitude and longitude of each shop. Then they load, via AJAX, all the shops into the google map. Google maps has a tutorial for creating a storelocator.
Google maps api v3 has a function called ClientLocation this can, on base of the IP-address, return the current position of the user viewing the google map. This way the closest shops can be highlighted or put on top of the list.
Hopes this will help!