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”,