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
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With