googlemaps / google-maps-services-js Goto Github PK
View Code? Open in Web Editor NEWNode.js client library for Google Maps API Web Services
License: Apache License 2.0
Node.js client library for Google Maps API Web Services
License: Apache License 2.0
Hi all,
Please consider this as a suggestion.
One of our microservices uses only geocoder hence I was trying to see if I could only source the required script.
Something like:
const Geocode = import "@google/maps/geocode"
What do you think?
Hey guys,
I'm using this library v0.3.1 in a node v6.9.5 application. Actually the application runs inside docker container but I'm able to reproduce the problem with following script. The script is
'use strict';
const googleMapsClient = require('@google/maps').createClient({
key: '...'
});
setInterval(() => {
googleMapsClient.geocode({
address: '1600 Amphitheatre Parkway, Mountain View, CA'
}, function(err, response) {
if (!err) {
console.log(response.json.results[0].formatted_address);
}
});
}, 2000);
and I see memory increasing as every new address gets geocoded. Is it supposed to increase like this or am I doing something in a wrong way? Memory heap snapshots are here Heap.zip
Instead, "undefined is not a function" at index.js line 27
Thank you for this module.
placesAutoComplete seems to work great, but when I was looking for query autocomplete
https://developers.google.com/places/web-service/query
and according to that page, the url to call is "/place/queryautocomplete/"
https://maps.googleapis.com/maps/api/place/queryautocomplete/output?parameters
which appears to be the same as here for "Places"
https://github.com/googlemaps/google-maps-services-js/blob/master/lib/apis/places.js#L191
On this page for place autocomplete
https://developers.google.com/places/web-service/autocomplete
the url called is "/place/autocomplete/"
https://maps.googleapis.com/maps/api/place/autocomplete/output?parameters
Are they mixed up? Are they interchangeable?
via google map api guide https://developers.google.com/places/web-service/autocomplete :
For example: components=country:us|country:pr|country:vi|country:gu|country:mp would restrict your results to places within the United States and its unincorporated organized territories.
but I cannot figure out how to pass multiple countries to the components parameter.
I tried {
...
components:['country:us','country:ca']
}, doesn't work.
Thanks for providing a formal Node.js Client library for Google Maps Services 👍
But, I ended up wasting many hours to find out why my geocoding API calls stopped working suddenly with no error :-(
Investigating into it, found that instead of an error, the response had this:
{ error_message: 'Browser API keys cannot have referer restrictions when used with this API.',
results: [],
status: 'REQUEST_DENIED' }
Given there is an error(err) object in the callback function, shouldn't that be set as well for proper error handling instead of sticking the error message just to the response object?
// Geocode an address.
googleMapsClient.geocode({
address: '1600 Amphitheatre Parkway, Mountain View, CA'
}, function(err, response) {
if (!err) {
console.log(response.json.results);
}
});
I am able to make a request and get a response just fine omitting this parameter. However, including 'traffic_model: ''' does not work, and results in the generic 'InvalidValueError'. can be any of the available options (pessimistic, optimistic, best_guess)
When I use the library in Node and do something like
"use strict";
googleMapsClient.geocode({ address: 'Sesame Street 1' }, function(err, result) {
raise_ReferenceError = true;
});
the ReferenceError that would normally be raised is caught by the Maps Lib. This is very annoying because it hides errors that are explicitly requested by "use strict". Maybe I get some fundamental point wrong here but right now I think the error handling of the maps module should detect "use strict" errors and throw them.
When type: 'restaurant' is added to the query, the result is completely different.
For example
client.places({
query: 'Helena\'s',
language: 'en',
location: [21.4389123,-158.0000565],
radius: 5000
})
returns (some fields removed for clarity):
{
formatted_address: '1240 N School St, Honolulu, HI 96817, United States',
geometry:
{ location: { lat: 21.3309439, lng: -157.8650871 },
id: 'cd54478b5f6e13b50b181dda17b6201b4c190ba0',
name: 'Helena\'s Hawaiian Food',
place_id: 'ChIJ-aNpcIduAHwRlVpxYVxnvxs',
types: [ 'restaurant', 'food', 'point_of_interest', 'establishment' ]
}
Whereas
client.places({
query: 'Helena\'s',
language: 'en',
location: [21.4389123,-158.0000565],
radius: 5000,
type: 'restaurant'
})
returns:
{
formatted_address: '95-1840 Meheula Pkwy, Mililani, HI 96789, United States',
geometry:
{ location: { lat: 21.4680956, lng: -158.0023998 },
id: 'ad5b2180a1119d6be0005f51eb8111116ca03769',
name: 'Mililani Mauka Chinese Cuisine',
place_id: 'ChIJVQGveXZnAHwRnvJ_xnrSS5w',
types: [ 'restaurant', 'food', 'point_of_interest', 'establishment' ]
}
If using type: 'food', it correctly returns "Helena's Hawaiian Food"
Thanks
class Places {
constructor (key) {
this.client = require('@google/maps').createClient({ key });
}
getDetails (placeId) {
return this.client.place({ placeId }).asPromise();
}
}
const places = new Places(API_KEY);
places.getDetails('ChIJj0YI_QPj20ARuhrB8tXzHAo')
.then(console.log)
.catch(console.error);
throw new InvalidValueError('missing property "' + key + '"');
^
Error
at new InvalidValueError (/home/gureev_cr/repos/matchplayer-backend/node_modules/@google/maps/lib/internal/validate.js:23:17)
at Object.validator (/home/gureev_cr/repos/matchplayer-backend/node_modules/@google/maps/lib/internal/validate.js:83:17)
at Object.place (/home/gureev_cr/repos/matchplayer-backend/node_modules/@google/maps/lib/index.js:51:25)
at Places.getDetails (/home/gureev_cr/repos/matchplayer-backend/server/services/Places.js:48:28)
at Object.<anonymous> (/home/gureev_cr/repos/matchplayer-backend/server/services/Places.js:54:8)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Process finished with exit code 1
Hi,
Thanks for putting together this awesome library!
I'm not sure if the instructions here are out of date but nowhere do I see Server
API keys. I've tried numerous things:
Chose project
Copied API Key
Response:
The provided API key is expired
(Already enabled)
Any help would be appreciated!
Thank you again 😄
I could not find in the documentation how to properly use promises after initializing the client with a promise constructor. I, luckily, found a reference in an issue about something else.
It would be helpful to edit this line in the "Making API requests" part of the documentation:
NOTE: Promises are only available if you supply a Promise constructor to the createClient() method.
Something along the lines of:
NOTE: Promises are only available if you supply a Promise constructor to the createClient() method. You must also chain .asPromise() to the method before any .then() or .catch() methods.
I would be happy to make this change. Should I open a PR?
Thanks!
From the documentation there is the ability to perform a nearby search within the Places api:
https://developers.google.com/places/web-service/search
From the code: places.js and tests I was unable to find a way to use nearby search.
Here is what I would like to do:
googleMapsClient.places({
location: [-33.8670522,151.1957362],
rankby : 'distance',
type: 'restaurant',
name:'cruise'
},function(err, response) {
if (!err) {
console.log(response.json.result);
}
});
Is this something you would be willing to add in or is there another way? I can provide a pull request.
Also, I understand this can be done with the text search request. The issue is that the text search has a quota multiplier:
That is, each Text Search request that you make will count as 10 requests against your quota
The nearby search api url is as follows:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&type=restaurant&name=cruise&key=YOUR_API_KEY
I have just added the following to places.js, to get my use case working:
exports.places = {
url: 'https://maps.googleapis.com/maps/api/place/nearbysearch/json',
validator: v.object({
location: utils.latLng,
radius: v.optional(v.number),
rankby : v.optional(v.string),//prominence, distance,
type : v.optional(v.string),
name : v.optional(v.string),
keyword : v.optional(v.string),
language: v.optional(v.string),
minprice: v.optional(v.number),
maxprice: v.optional(v.number),
opennow: v.optional(v.boolean),
pagetoken: v.optional(v.string),
retryOptions: v.optional(utils.retryOptions),
timeout: v.optional(v.number)
})
};
When trying to set bounds to find a street in Hamburg and not the Bering Strait (Sea), I don't get any response from geocoder.
{ address: 'behringstraße',
language: 'de-DE',
region: 'de',
bounds: {
northeast: { lat: 53.5760189802915, lng: 9.841728980291503 },
southwest: { lat: 53.5733210197085, lng: 9.839031019708498 }
}
}
As I don't use Promises, I can not see what's going wrong inside callback function.
So basically, are LatLngBounds not supported in Node.js client?
When making a timezone request with GoogleMapsAPI.timezone
, the returned timezone offset is incorrect.
It seems the provided timestamp is shortened/rounded to 7 digits before hitting the API.
This method call:
googleMapsClient.timezone({
location: "51.47060013,-0.46194100",
timestamp: 1481714646
});
Invokes this API request:
GET https://maps.googleapis.com/maps/api/timezone/json?location=51.47060013%2C-0.46194100×tamp=1481715&key=API_KEY
{
"dstOffset": 0,
"rawOffset": 3600, // Incorrect
"status": "OK",
"timeZoneId": "Europe/London",
"timeZoneName": "GMT+01:00"
}
As you can see the timestamp gets rounded and as a result the returned offset is incorrect. If I pass the timezone directly to the API then the correct offset is returned.
GET https://maps.googleapis.com/maps/api/timezone/json?location=51.47060013,-0.46194100×tamp=1481714646&key=API_KEY
{
"dstOffset": 0,
"rawOffset": 0,
"status": "OK",
"timeZoneId": "Europe/London",
"timeZoneName": "Greenwich Mean Time"
}
Is there any plan to support localization?
such as passing the localization in the constructor, http://stackoverflow.com/questions/14815192/setting-language-for-reverse-geocoding-gmaps-v-3
If been using the directions and the geocoding calls to the Maps API and both of them seem to have an issue. after firing a request and handling the response node doesn't exit the script due to the keep alive's in the response. isn't there a way to manipulate the request in a way, that the connection is not kept alive, or a call to actively close the connection (process.exit is not an option)
Lacking support for strictbounds in the current Google Places Autocmplete API.
I had a major issue with our product today when all of our app's requests were timing out and we couldn't figure out why.
After fixing the issue and looking for the root cause, we pinpointed it down to the fact that if the request results in a OVER_QUERY_LIMIT
error, this library will keep trying to make a request until it doesn't result in an error or it times out (at 60 seconds). Because our routing mechanism timed out at 30 seconds, this library never showed an error and the request simply timed out silently, even though Google's API was getting blasted with retries.
Given that it is extremely likely that if an OVER_QUERY_LIMIT
response is returned it will be most likely returned again within the 60 second timeout window, would it be sensible to not try to make the request again?
This is the line in question.
@stephenfarrar as discussed - the timeout handlers registered for an API call currently aren't cancelled if a request succeeds/fails. This has a couple of minor side effects such as one-off scripts not terminating, and handlers consuming memory (until the actual no-op timeout occurs).
Documentation says it's query.types
but implementation is query.type
. Also mismatching on array vs string.
https://github.com/googlemaps/google-maps-services-js/blob/master/lib/apis/places.js#L185
Is there a way to use this library with Typescript? I tried installing the @typings/google-maps but couldn't get it to work. Any direction appreciated. Thank you.
When i add the types
parameter to a places autocomplete request, it throws an InvalidValueError
error.
googleMapsClient.placesAutoComplete({
input: locationHint,
language: 'en',
types: '(cities)'
})
Shows:
name: 'InvalidValueError',
message: 'unexpected property "types"',
Types is a valid parameter as per https://developers.google.com/places/web-service/autocomplete?authuser=1#place_types
Any ideas how to solve CORS restrictions?
Code below throws "No 'Access-Control-Allow-Origin' header is present on the requested resource." Key is correct. Outside of my app I see the correct json-response. It doesn't work with localhost (webpack-dev-server with correct headers settings), and the same issue with production server.
const googleMapsClient = require('@google/maps').createClient({
key: API_KEY
});
const getTest = () => {
googleMapsClient.placesNearby({
radius: 100,
type: 'city_hall,museum',
location: '59.922329,30.22241'
}, function(err, response) {
if (!err) {
console.log(response.json());
}
});
}
on cli direction api is working fine but if i call it from a program it doesn't work. it gives me an error on console of browser.
# error:
Fetch API cannot load https://maps.googleapis.com/maps/api/directions/json?destination=12.9766%2C…origin=12.9097695%2C77.6814536&key=AIzaSyCUJND4EXkdBpb0BTE_TURO1dEAb5PPf8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
TypeError: Failed to fetch
# call-
var googleMapsClient = require('@google/maps').createClient({
key: 'AIzaSyCUJND4EXkdBpb0BTE_TURO1dEAb5PPf8'
});
googleMapsClient.directions({
origin: '12.9097695,77.6814536',
destination: '12.9766,77.5993',
}, function(err, response) {
if (!err) {
console.log(response.json.results);
}
else{
console.log(err);
}
});
When using this in angular 2 app, I get this error. How do I pass in withCredential: false
?
A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:4200' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
I have a script that makes a lot of google maps API calls (geocoding). Requests are made less than 50 times a second (50 is a Google Maps API limit). After a minute or so, google-maps-services-js starts to returning an error: timeout
.
I've dug into sources, and I found that this happens in the make-api-calls.js
external module. Does timeout simply mean that a request was sent to the Google Maps API but no response was returned?
I have a poor internet connection. Is it possible that this is the reason and I should simply make less API calls per second and increase the timeout limit (passing a timeout parameter to the client)?
Hello, i currently have the npm version 3.10.9 and as i tried to install the package using the sugested command npm install @google/maps
i get the following error:
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.2.1/bin/node" "/usr/local/bin/npm" "install" "@google/maps"
npm ERR! node v6.2.1
npm ERR! npm v3.10.9
npm ERR! code E404
npm ERR! 404 no such package available : @google/maps
npm ERR! 404
npm ERR! 404 '@google/maps' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Am i missing something? Is the npm version not right?
When requesting details for a place using:
`
const googleMapsClient = require('@google/maps').createClient(
{
key: '[my key]'
}
)
const googleMapsClientplace = googleMapsClient.place({ placeid: 'fbd360e5d31edc4b889f19daa70cf802f483f0a2' }, function(err, response) { if (!err) { const details = response.json.results; console.log('place details: ' + details) reply.view('location', { details: details }) } });
Whatever the placeid I declare, no response is returned.
Doing a places search however, does return a results list:
const gPlaceslookup = googleMapsClient.places({ query: 'supermarket', location: locatie }, function(err, response) { if (!err) { const locations = response.json.results; console.log(response.json.results); reply.view('index', { locations: locations }) } });
What seems to be going on here?
EDIT: my bad, it was a conflict in hapi.
Edit 2: the keen observer noticed I used this for the place response:
const details = response.json.results;
This shouldn't be plural, but just
const details = response.json.result;
Would love to be able to use this library within React Native, as I use this already in a complimentary React web-based app, however RN has more specific networking requirements: https://facebook.github.io/react-native/docs/network.html
This results in dependency issues that I can't seem to get past:
How to get more than 10 photos from placesPhoto api? Currently, the places api returns an array of 10 photos. Is there a way to page for the next set of 10 photos?
Hi, is there a function to show fading trails, and will you have ASP MVC?
Hi,
npm install is failing due to https://registry.npmjs.org/google/maps is an empty JSON. This is the stack trace output.
npm http 404 https://registry.npmjs.org/google/maps npm ERR! TypeError: Cannot read property 'latest' of undefined npm ERR! at next (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/lib/cache.js:687:35) npm ERR! at /usr/local/Cellar/node/0.10.21/lib/node_modules/npm/lib/cache.js:675:5 npm ERR! at saved (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7) npm ERR! at /usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7 npm ERR! at Object.oncomplete (fs.js:107:15) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <[email protected]>
I'm interested in using the containsLocation method of the Google Maps Javascript Geometry Library, but this is more of a general question regarding how to access any of the Google Maps APIs not listed in this project.
I initially tried to use a require
statement in my Node,js file, using the source url as is listed on the Javascript libraries Overview page. That didn't work so I then attempted to use node's vm
module like so:
var fs = require("fs")
var http = require("http");
var vm = require('vm')
http.get("http://maps.googleapis.com/maps/api/js?key=my-key&libraries=geometry", function(res) {
var rawData = "";
res.on('data', function(data) {
rawData += data;
});
res.on('end', function() {
vm.runInThisContext(rawData);
});
});
That didn't work either because of window
not being defined in Node. My next approach was to try and understand how this Node.js client library makes calls to the APIs supported. I looked in the source code under /lib/apis/road.js as an example and it seems like each function belonging to that API has its own url and configurations used for the makeUrlRequest
function inside /lib/interal/make-url-request.js. So I attempted to find an equivalent geometry.googleapis.com url inside the Javascript source file but none existed.
How would I be able to make a get/post request (and what url to use) in order to get the same results as the containsLocation function?
Please, add version for latest commit in master "add keep-alive"
The Geocode JS API defines the componentRestrictions
key in the GeocoderRequest object [1]. The geocode method of this API client does not allow this key, but has the components
key which seems to have the same function. I am wondering if the components
key should be renamed to componentRestrictions
in geocode.js.
[1] https://developers.google.com/maps/documentation/javascript/reference#GeocoderRequest
Promises are the new hotness. They're superior.
And we want our client library to be the new hotness too.
I've just written one test, that uses the client library without promises. 2360d93
It's gross. I really dislike the asymmetry between success (callback) and error (event listener).
Problems:
CORS error with a distancematrix request. But geocoder request works fine. What am I missing?
Fetch API cannot load https://maps.googleapis.com/maps/api/distancematrix/json?destinations=New%2…%20Lake%20City%2C%20UT%2084116&key=AIzaSyAaXJs0ZDx3rjhxrsjUO6pT7WU2yNI. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Format and rationale explained in the design doc: https://docs.google.com/document/d/1maC5bLsSoYfrzAOG8K0YVWvzqV-Z5t2hoAvPRzpfoS0/edit#heading=h.o2yc1g32l472
Where can I get the language codes ("en", "fr", etc) supported by google maps if I want to use them in direction services api?
Hello,
how can I make a static map with this package?
Like in this example from Google: https://developers.google.com/maps/documentation/javascript/examples/map-simple?hl=de
I need to replace https://maps.googleapis.com with http://maps.google.cn.
My code:
var geocodeApi = require('@google/maps/lib/apis/geocode');
geocodeApi.geocode.url = geocodeApi.geocode.url.replace('maps.googleapis.com', 'maps.google.cn');
geocodeApi.reverseGeocode.url = geocodeApi.reverseGeocode.url.replace('maps.googleapis.com', 'maps.google.cn');
var googleMapsClient = require('@google/maps').createClient({
key: 'my api key'
});
it works, but looks not an elegant way, is it possible to pass the base url var the options argument?
For some strange reason, the following place_id hang silently and indefinitely for a place query. 32,000 succeeded fine. I don't know how to trap for the error. For me, it is consistently repeatable.
Using version 0.3.1 -- I didn't test an earlier release
const query = {
placeid: 'EiJNYWdocmViLCA1NSBBZ2FkaXIsIFNhbMOpLCBNb3JvY2Nv' // any of the following place_id
};
googleMapsClient.place(query, (err, res) => {});
using any of the following place_id
const place_id = [
'EiJNYWdocmViLCA1NSBBZ2FkaXIsIFNhbMOpLCBNb3JvY2Nv',
'EitNYWdocmViLCA1NCBCb3VsZXZhcmQgQWhmaXIsIE91amRhLCBNb3JvY2Nv',
'EjxNYWdocmViLCA1NCBSdWUgQWhmaXIsIENhc2FibGFuY2EsIEdyYW5kIENhc2FibGFuY2EsIE1vcm9jY28',
'EhtNYWdocmViLCA1OSBSb3V0ZSBBa2hmZW5uaXI',
'EkxUcnVuZyDEkMO0bmcsIEFra2F5YSBLw7Z5w7wgWW9sdSwgQWtrYXlhIEvDtnnDvC_EsGhzYW5nYXppL0thc3RhbW9udSwgVHVya2V5',
'EjJNYWdocmViLCA1NSBBZGFyLCBrc2FyIGhhcnQgZWwgbW9yYWJpdGluZSwgTW9yb2Njbw',
'Ej1NYWdocmViLCA1OCBSdWUgQWtub3VsLCBDYXNhYmxhbmNhLCBHcmFuZCBDYXNhYmxhbmNhLCBNb3JvY2Nv',
'ElhUcnVuZyDEkMO0bmcsIEFrw6dhcMSxbmFyIEvDtnnDvCBZb2x1LCBBa8OnYXDEsW5hciBCdWNhxJ_EsS_Dh2VtacWfZ2V6ZWsvVHV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YWxrYXJhL1Rla2lyZGHEnywgVHVya2V5',
'EkhUcnVuZyDEkMO0bmcsIEJhbGzEsSBLw7Z5w7wgWW9sdSwgQmFsbMSxIEvDtnnDvC9VbHVkZXJlL8WexLFybmFrLCBUdXJrZXk',
'ElZUcnVuZyDEkMO0bmcsIEJhbHDEsW5hciBLw7Z5w7wgWW9sdSwgQmFscMSxbmFyIEJlbGVkaXllc2kvQmF0bWFuIE1lcmtlei9CYXRtYW4sIFR1cmtleQ',
'ChIJr33-GkkmzEAR203ZNme6tjc',
'EmxUcnVuZyDEkMO0bmcsIEhhdGlwbGVyIE1haGFsbGVzaSwgQmFsdmVyZW4gS8O2ecO8IFlvbHUsIEJhbHZlcmVuIEJlbGVkaXllc2kvxZ7EsXJuYWsgTWVya2V6L8WexLFybmFrLCBUdXJrZXk',
'ChIJOY2xfjhZIpQR_bkYu2G1acU',
'ChIJ03fYmaO0GgcRLJ_N_L54dog',
];
We use the google maps services to geocode a lot of addresses. To debug failures it is important that we have the original request URL with which the call was made.
I know it is possible and would open a PR for this (currently having issues signing the CLA for our company).
Is it something you would add?
i used this service in node js app as part of a request sent from my angularjs application. when i tried to render the the route in the map id got an error:
js?libraries=places,geometry&key=AIzaSyCvJtDqLEt7guqj_lDjOn5LYzlB0oC0-Us&language=he:61 Uncaught InvalidValueError: not a LatLngBounds or LatLngBoundsLiteral: unknown property southwest.
i dig deeper and realized that the route i get from node is different from the route i'm getting from the service in js. the bounds object is different and there is a "overview_path" witch do not exist in the route made in nodejs.
this is very strange perhaps i'm missing something?
thank you.
It is sending an Invalidate Error
throw InvalidValueError.prepend('in property "' + key + '"', error); ^ Error at new InvalidValueError (/node_modules/@google/maps/lib/internal/validate.js:23:17) at /node_modules/@google/maps/lib/internal/validate.js:132:11 at /node_modules/@google/maps/lib/internal/validate.js:112:21 at /node_modules/@google/maps/lib/internal/convert.js:40:13 at /node_modules/@google/maps/lib/internal/validate.js:43:43 at /node_modules/@google/maps/lib/internal/validate.js:78:21 at /node_modules/@google/maps/lib/internal/validate.js:163:15 at Array.forEach (native) at Object.validator (/node_modules/@google/maps/lib/internal/validate.js:162:16) at Object.directions (/node_modules/@google/maps/lib/index.js:51:25)
when ever i am setting the key
var googleMapsClient = require('@google/maps').createClient({ key: 'AIzaSyBLAUk9O8q3jmSlPWpoZ3mdqfqMU0vq0yA' });
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.