Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何更改传单传送机的语言_Javascript_Jquery_Routing_Leaflet - Fatal编程技术网

Javascript 如何更改传单传送机的语言

Javascript 如何更改传单传送机的语言,javascript,jquery,routing,leaflet,Javascript,Jquery,Routing,Leaflet,我有传单路由机器本地,我修复了语言映射框问题 L.Routing.control({ router: new L.Routing.mapbox('map-key',{ language: 'nl', }), waypoints:coordinates, routeWhileDragging: true, createMarker: function(i, wp, nWps) { return

我有传单路由机器本地,我修复了语言映射框问题

L.Routing.control({

  router: new  L.Routing.mapbox('map-key',{
                     language: 'nl',
                 }),

  waypoints:coordinates,
  routeWhileDragging: true,

  createMarker: function(i, wp, nWps) {

  return L.marker(wp.latLng, {icon: greenIcon });

}

尝试将localization.js添加到angular.json文件中的其他脚本中,如下所示:

"scripts": [
              "node_modules/leaflet-routing-machine/src/localization.js" 
            ]
那么

L.Routing.control({
/....// <-- your others option
  language: 'nl', // <-- for langage use just this

// you don't need to add formatter
  formatter:  new L.Routing.Formatter({
    language: 'nl'
  }),

}).addTo(map);
L.Routing.control({

/....//我不知道这在wordpress中是否可行?好的,试试另一种语言,看看它是否适合你,例如:语言:“fr”,