简体   繁体   中英

Possible to use Google Maps JavaScript API on meteor server side?

I am working on google map application which uses the google map version3 api. I am using in particular the utility methods in google.maps.latLng , such as getbounds, computeDistanceBetween, contains, fromLatLngToPoint in order to compute whether the bound lies inside or not.

I am using package dburles/meteor-google-maps which allows me to compute some values at client side, but not at server side. I have to do some calculations on server, particularly at models. I wonder if there is a way use google map api on meteor server.

thanks in advance

You should be able to use any Node module like:

etc. in your backend code in Meteor. Just make sure that it runs only for the server-side.

Of course you will need API keys for that to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM