是否有可能在node.js服务器端使用google.maps api库? [英] is it possible to use the google.maps api library on the node.js server side?

查看:90
本文介绍了是否有可能在node.js服务器端使用google.maps api库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究使用google map version3 api的Google地图应用程序,特别是google.maps.geometry.encoding中的实用程序方法,例如decodePath,encodePath,computeDistanceBetween,interpolate,以便计算地点



在Web应用程序的第一个版本中,许多应用程序逻辑位于Web浏览器上,现在我想将一些逻辑移动到基于node.js的服务器。然而,由于应用程序依赖于谷歌API,我不知道是否有一种方法,我仍然可以使用谷歌地图API在Node.js服务器



p>

解决方案

您可以使用像 node-googlemaps https://github.com/moshen/node-googlemaps 已经为您封装了API。或者,您可以使用任何节点模块来帮助您进行API请求:


$ b Mikeal的请求https://github.com/mikeal/request



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



虽然,我不确定具体的实用方法。


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

解决方案

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.

这篇关于是否有可能在node.js服务器端使用google.maps api库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆