Issue in using parameter in google map API - google-maps

I am trying to implement google maps print for that i am using API
https://maps.google.com/maps?saddr=&daddr
To initiate print it is said to be that pw is the parameter . And i used like this
https://maps.google.com/maps?saddr=Raleigh%20Road,%20Chapel%20Hill,%20NC,%20United%20States&daddr=Chapel%20Hill%20Road,%20Raleigh,%20NC,%20United%20States&dirflg=r&om=1&pw=2
But it is not showing any result but 404.
Can someone help me with this?

That "API" is "classic" google maps. It was never documented officially and is no longer supported.
It has been replaced by the Embed API

Related

"Google Maps Platform rejected your request" error when trying to use Google Map Embed API

Just sharing because I couldn't find any information on this error, and I wanted the solution to be out there.
I was trying to embed a map on my website using Google Map Embed API, but I kept getting the following error, no matter what I did with my App permissions:
Google Maps Platform rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account
My map src url was structured like so:
https://www.google.com/maps/embed/v1/place?q=Washington,DC&key=[API Key]
and it seemed to match the guidelines, so I couldn't figure out what was wrong.
I can't find this anywhere in the documentation, but it's this simple - the key params is supposed to be first.
Just turn this:
https://www.google.com/maps/embed/v1/place?q=Washington,DC&key=[API Key]
into this:
https://www.google.com/maps/embed/v1/place?key=[API KEY]&q=Washington,DC
and now it works.

Google Maps API error: Google Maps API error: ApiNotActivatedMapError

I am trying to use google maps distance matrix api in my project to get distance between 2 places. I have also enable this api in google developer console. But I am continuously getting error ApiNotActivatedMapError.
I am using sample code provided by google as distance-matrix .
When you use a library or service via the Maps-Javascript-API, and use a key, you only need to activate the Google Maps JavaScript API .
When you get the particular error with the linked example you obviously didn't activate the Google Maps JavaScript API for your project.
Update:
since June 22, 2016 you need also to activate the related API(Webservice) for new applications when you want to use the following features:
geocoding service
directions service
distanceMatrix service
elevation service
places library
Old question.. But.. I had n similar issue recently with a ApiNotActivatedMapError using geocoding but Konerak's comment helped me get to this really nice post.
Basically, you can activate your API's here: https://console.developers.google.com/apis/library
Activating Google Maps JavaScript API along with the already activate Geocoding API solved my problem.
Hope it helps someone in a similar position :)
This link is enabled API https://console.developers.google.com/apis/library. For default emulator and in iOS its disabled, but in this console you can active this API.

How can I use Google Maps with Processing?

I want to use Google Maps API with Processing. Until now I was just able to get Google Places data, but I'm struggling with the map itself. I know about other map options, like unfold or modestMaps, but I need Google. In particular because of the directions API in further progress. I've searched this forum and the web, without any help. I thought it should be quite
easy.
How can I use Google Maps with Processing?
I'm not sure about getting a full featured, dynamic Google Maps within your Processing app, but you might be able to modify the Processing library for the Google Weather API to instead use the Directions or Static Maps APIs. http://www.onformative.com/lab/google-weather-library-for-processing/
If you download the source and check out GoogleWeather.java you can see the constructor is calling the WeatherAPI and getting back the XML result. I think you could do the same thing except use the Directions API in it's place.
Here's a post on a Java blog about showing Static Maps API results in Java, which might be translatable into Processing: http://weblogs.java.net/blog/cajo/archive/2010/10/16/adding-google-maps-your-java-application
For something more dynamic, you might be able to adapt JXMapViewer, check out this article: http://today.java.net/pub/a/today/2007/10/30/building-maps-into-swing-app-with-jxmapviewer.html

Can I run Google Maps API without internet access using OpenStreet Tiles?

Is it permitted to use the Google Maps API (ver 2) in offline mode if I use OpenStreet tiles?
If so, how can I do this? I can store the Google JS file locally (main.js). What else do I need to do?
It is not permitted according to the Terms Of Service
http://code.google.com/apis/maps/terms.html
It is also unlikely to work, as the API Javascript is designed only to work online e.g. it must be able to talk to Googles servers.

'GOverlay is undefined' javascript error in IE 7, in spite of having loaded the Google Maps API

Despite loading the Google Maps API, via this url:
http://maps.gstatic.com/intl/en_ALL/mapfiles/276b/maps2.api/main.js
I'm getting the above error.
Why is it that when I download that URL in my browser and do a find for 'GOverlay' I'm getting zero matches?
Have Google removed this from their API or something, causing all my code to break?
GOverlay is an essential part of the Google Maps API implementation, see the V2 documentation for GOverlay here.
The reason for you not finding "GOverlay" when searching through the Javascript file you provided is simply that the Google Maps API consists of several Javascript files, not all of the code is in main.js. Additionally the code is obfuscated which could mean the build GOverlay by concatenating some crazy strings.
On a basic note: Why do you want to use some static JS file? The offical way to use the Google Maps API is using a key, which you have to obtain by registering with your Google account. So actually the URL you should be using is:
http://maps.google.com/maps?file=api&v=2&key=abcdefg
Or use the AJAX loader as seen on the Google Maps V2 documentation here.
The code is actually loaded asynchronously.
Post a link to your page - it is more than likely that there's some issue with your code.