Javascript 如何在服务器上使用google maps islocationonedge?
我正在尝试从服务器端使用GoogleMapsAPI中的函数(使用node.js) 我想看看谷歌地图上是否有一个点,指示从a点到B点的路线Javascript 如何在服务器上使用google maps islocationonedge?,javascript,google-maps,Javascript,Google Maps,我正在尝试从服务器端使用GoogleMapsAPI中的函数(使用node.js) 我想看看谷歌地图上是否有一个点,指示从a点到B点的路线 isLocationOnEdge(point:LatLng, poly:Polygon|Polyline, tolerance?:number) 我使用了GoogleMaps文档中的示例代码,并添加了一个console.log语句。但是,它不会向控制台输出任何内容 function initialize() { var mapOptions = {
isLocationOnEdge(point:LatLng, poly:Polygon|Polyline, tolerance?:number)
我使用了GoogleMaps文档中的示例代码,并添加了一个console.log语句。但是,它不会向控制台输出任何内容
function initialize() {
var mapOptions = {
zoom: 5,
center: new google.maps.LatLng(24.886, -70.269),
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var cascadiaFault = new google.maps.Polyline({
paths: [
new google.maps.LatLng(49.95, -128.1),
new google.maps.LatLng(46.26, -126.3),
new google.maps.LatLng(40.3, -125.4)
]
});
var myPosition = new google.maps.LatLng(43.0, -125.9, 10e-7);
console.log('google.maps.geometry.poly.isLocationOnEdge(myPosition, cascadiaFault))');
}
另一个堆栈溢出问题是在http请求中包含此url
但我知道我实际上需要以某种方式包括islocationonedge参数。
我应该请求吗
,多段线:[adfasd,SDF,adfasdf,adfasd],0.0001)
非常感谢您的帮助我想这样做:
- 检查(moshen/node谷歌地图)
- 阅读此代码
- f、 有一个函数createEncodedPolyline(points){..}
- 逐步尝试重新创建对Google Geometry库的请求