
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
googlemapsutil-https
Advanced tools
wrapper to use Google Maps API from node.js with https fix from andrepcg
For the original author see: https://github.com/yupitel/googleMapsUtil
wrap Google Maps API
geocoding(address, options, cb, sensor, isHttps, isRequest)
parameter
reverseGeocoding(lat, lng, options, cb, sensor, isHttps, isRequest)
parameter
setProxy
setParameter
clearParameter
setOutput
setProxy
setParameter
clearParameter
setOutput
// call api
var gmaputil = require('googlemapsutil');
// call api from class object
var cb = function(err, result) {
if (err) {
console.log(err);
}
console.log(result);
};
// directions api sample
gmaputil.directions('Toronto', 'Montreal', null, cb);
gmaputil.directions('Toronto', 'Montreal', {avoid: 'highways', mode: 'bicycling'}, cb);
// distance matrix api sample
gmaputil.distancematrix(['Vancouver+BC', 'Seattle'], ['San+Francisco', 'Victoria+BC'], {mode: 'bicycling', language: 'fr-FR'}, cb);
// elevation api sample
// locations
gmaputil.locations([{lat:39.7391536, lng:-104.9847034},{lat:36.455556,lng:-116.866667}], null, cb);
// this is same with above
gmaputil.locations('39.7391536,-104.9847034|36.455556,-116.866667', null, cb);
// path
gmaputil.path([{lat: 36.578581, lng:-118.291994},{lat:36.23998,lng:-116.83171}],3, null, cb);
// geocoding api sample
// geocoding
gmaputil.geocoding('1600+Amphitheatre+Parkway,+Mountain+View,+CA', null, cb);
// geocoding with components filter
gmaputil.geocoding('Torun', {components: {administrative_area:'TX', country:'US'}}, cb);
// geocoding components filter only
gmaputil.geocoding(null, {components: {route:'Annegatan', administrative_area:'Helsinki',country:'Finland'}}, cb);
// reverse geocoding
gmaputil.reverseGeocoding(40.714224,-73.961452, null, cb);
// change output format
// xml
gmaputil.setOutput('xml');
// json
gmaputil.setOutput('json');
// call api from class object
var cb = function(err, result) {
if (err) {
console.log(err);
}
console.log(result);
};
var Directions = require('googlemapsutil').Directions;
directions = new Directions();
// directions api sample
directions.directions('Toronto', 'Montreal', null, cb);
directions.directions('Toronto', 'Montreal', {avoid: 'highways', mode: 'bicycling'}, cb);
// distance matrix api sample
var Distancematrix = require('googlemapsutil').Distancematrix;
distancematrix = new Distancematrix();
distancematrix.distancematrix(['Vancouver+BC', 'Seattle'], ['San+Francisco', 'Victoria+BC'], {mode: 'bicycling', language: 'fr-FR'}, cb);
// elevation api sample
var Elevation = require('googlemapsutil').Elevation;
elevation = new Elevation();
// locations
elevation.locations([{lat:39.7391536, lng:-104.9847034},{lat:36.455556,lng:-116.866667}], null, cb);
// this is same with above
elevation.locations('39.7391536,-104.9847034|36.455556,-116.866667', null, cb);
// path
elevation.path([{lat: 36.578581, lng:-118.291994},{lat:36.23998,lng:-116.83171}],3, null, cb);
// geocoding api sample
var Geocoding = require('googlemapsutil').Geocoding;
geocoding = new Geocoding();
// geocoding
geocoding.geocoding('1600+Amphitheatre+Parkway,+Mountain+View,+CA', null, cb);
// geocoding with components filter
geocoding.geocoding('Torun', {components: {administrative_area:'TX', country:'US'}}, null, cb);
// geocoding components filter only
geocoding.geocoding(null, {components: {route:'Annegatan', administrative_area:'Helsinki',country:'Finland'}}, null, cb);
// reverse geocoding
geocoding.reverseGeocoding(40.714224,-73.961452, null, cb);
(The MIT License)
Copyright (c) 2013 Shunsuke <qfoori@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
utility to use google map easily with https fix
The npm package googlemapsutil-https receives a total of 3 weekly downloads. As such, googlemapsutil-https popularity was classified as not popular.
We found that googlemapsutil-https demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.