I would like to know if it is possible to change the way the itinerary calculation algorithm works in the Google Maps API (or Bing Maps). Basically, I'd like to add options, like for example "shortest route" or "avoid highways and national roads".
I haven't found anything in the API that might manage the road's cost, so I think it's not possible but maybe someone's got an idea of a way to do that?
There is no way to modify the pathfinder algorithm beyond the avoidHighways and avoidTolls options. See here for documentation:
http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsRequest
Another method would be to specify provideRouteAlternatives and figure out which of these routes is best according to your own heuristic.
Related
Google Maps API allows you to avoid tolls, ferries, and other such common annoyances. Is there some way to have the routing engine avoid specific places? I want to take a list of places from the Places API and then create a route that avoids them ... sort of the opposite of waypoints.
Possible? Or do I need to write my own algorithm for this?
It's basically a yes/no. Either the routing engine can take this info (show me how), or it can't. Apparently the answer is "No, it can't" according to the comment below and this is now solved.
Feature request in the issue tracker:
Issue 214: Ability to influence Directions (e.g. "avoid" / "roadblock")
Once again, I'm trying to deal with something not really well documented on Google Maps API.
I'm doing a small webapp which would require to be able to map indoor areas BUT I've to keep them private.
For now, I don't find any informations related to this question.
I've found many quite similar questions on stackoverflow which seems to feet my needs regarding the title, BUT once I read the question, everything is related to Android or IOS however, I'm looking to do this on a regular WebPlatform using Maps APIs provided for this plateform.
If anyone as a hint, it will really help so, thanks in advance.
The documentation for custom StreetViews you find on https://developers.google.com/maps/documentation/javascript/streetview#CustomStreetView
Keeping the images private is not hard to achieve, the images are loaded directly by the client, so you may e.g. use a serverside script that handles the requests and for example checks for a valid session before it delivers the images.
According to the GoogleMaps community forum (https://support.google.com/maps/thread/124604237/how-can-i-make-indoor-maps-private?hl=en) it is not possible to render google indoor maps private. One solution could be using mapspeople api which uses google maps and draws indoor maps on a top layer, or resort to mapwize which utilizes OpenStreetMaps as a base map to draw indoor maps layers on.
https://www.mapspeople.com/mapsindoors/
https://www.mapwize.io/
note that mapspeople requires payment, while mapwize has a very basic free version.
I am looking for a solution for cloudmade that will let me click a point on the map and set a radius for a circle. I was wanting to get the cleanest interface to do this. I looked on the cloudmade forums and the devs said that they have not put this into the API. I am looking for something like this page. I would use google maps but we are using it for internal use and do not have the 10,000 dollars to pay for google map license.
Thanks in advance.
My solution was to get the point and use MySQL lat long to do the calculations.
I'm looking for a solution to be able determine landscape type by a given coordinate, for example check if current position is water/forest/town/road and so on. I found google.maps.MapTypeStyleElementType object specification in the Google Maps specification, but not sure if it could help me or not.
Probably, there are some another Maps API with such functioality? Or maybe I should refer to the different types of offline maps?
Nope, the link you send is just for styling the proper features, not to tell which feature is at a given coordinate. If you are interested in landscape, then Corine Land Cover is the thing you are looking for. It describes the types of biotops like forest, water, but also land use - meadow, field, buildings etc. However, I don't know if there is such an online service where you could query particular coordinates. Other solution for you would be to import these GIS layers (they are freely available) to your own gis map server. Maybe this is partially solved as there are e.g. projects how to incorporate these into openstreetmap.
Well not quite, but you could get close to what you're looking for by using the Google Reverse Geocoder and the Google Places API
Google Reverse Geocoding
http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding
If you send the service a geocode it will send back an address type and/or one of several adress components http://code.google.com/apis/maps/documentation/geocoding/#Types
Google Places API
http://code.google.com/apis/maps/documentation/places/
You could use the Google places API to search for for what's near. If the geocode is in the middle of the lake, the Places API may return something like "Lake Michigan" and then you'd know the terrain obviously.
I want to find all possible routes from point A to point B (not only shortest ones). So my question is, is there any web service api (because I use Java) for such request in Google Maps, Yahoo Maps etc. it doesn't matter which one..
I've found something about this topic in Google Maps Directions Api: "alternatives (optional), if set to true, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server." But unfortunately, I couldn't use this option, when I include alternatives=true inside request query I get the same result. That would be nice to have such an alternative - it's more flexible, but I found something guarantied one with waypoints (but its much like "hardcoding" - we specify streets that we will pass from). Anyone tried alternatives=true?!
Here's another approach and solution for this problem: convert meters to latitude longitude from any point
Thanks for your responses..
I'm using the fact that google maps' paths uses rounding boxes to get a circle, to do so i just choose the point that i want and create a route to another that is not the same but very very close to it, just like:
http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=color:0x5600FF80|weight:100|51.5285582,0|51.5285583,0&sensor=false&zoom=15
We can choose the weight as the diameter of the circle, note that it is a fixed value, not related to the screen size and the zoom.