Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to use the google.maps api library on the node.js server side?

I am working on google map application which uses the google map version3 api, in particular the utility methods in google.maps.geometry.encoding, such as decodePath, encodePath, computeDistanceBetween, interpolate, in order to compute where the places

In the 1st version of web app, much of application logic is on the web broswer, and now I want to move some logic to the node.js based server. however, since the application depends on google api, I wonder is there a way that I can still use google map api on the node.js server

thanks in advance

like image 433
user824624 Avatar asked Apr 11 '13 18:04

user824624


People also ask

How do I contact Google Maps API in node JS?

use(bodyParser. urlencoded({ extended: true })); app. set('view engine', 'ejs') // Initialize and add the map function initMap() { // The location of Uluru var uluru = { lat: -25.344, lng: 131.036 }; // The map, centered at Uluru var map = new google. maps.

Is JavaScript Google Maps API free?

The Maps JavaScript API uses a pay-as-you-go pricing model. Maps JavaScript API requests generate calls to two different SKUs depending on the type of request: map loads or panoramas.


1 Answers

You could use a module like node-googlemaps https://github.com/moshen/node-googlemaps that has already wrapped the API for you. Or, you could use any node module that will help you make API requests:

Mikeal's Request: https://github.com/mikeal/request

Restler: https://github.com/danwrong/restler

Although, I'm not sure about the utility methods specifically.

like image 196
Zim Avatar answered Sep 29 '22 00:09

Zim