leaflet-routing-machine

how can I load the waypoint coordinates from Asp Label.Text

对着背影说爱祢 提交于 2020-12-26 13:43:57
问题 First code in which i hardcore the value: <script type="text/javascript"> function myfunction() { var label3LatLng = document.getElementById('<%=TextBox1.ClientID%>').value; var label4LatLng = document.getElementById('<%=TextBox2.ClientID%>').value; L.Routing.control({ waypoints: [ L.latLng(21.5278654, 55.9196996), L.latLng(23.5278654, 55.9196996) ], routeWhileDragging: true, geocoder: L.Control.Geocoder.nominatim() }).addTo(map); } Output:[![Output with hardcore][1]][1] Code with textbox or

how can I load the waypoint coordinates from Asp Label.Text

只谈情不闲聊 提交于 2020-12-26 13:42:40
问题 First code in which i hardcore the value: <script type="text/javascript"> function myfunction() { var label3LatLng = document.getElementById('<%=TextBox1.ClientID%>').value; var label4LatLng = document.getElementById('<%=TextBox2.ClientID%>').value; L.Routing.control({ waypoints: [ L.latLng(21.5278654, 55.9196996), L.latLng(23.5278654, 55.9196996) ], routeWhileDragging: true, geocoder: L.Control.Geocoder.nominatim() }).addTo(map); } Output:[![Output with hardcore][1]][1] Code with textbox or

How to include leaflet-routing-machine into angular 2 typescript webpack application

拜拜、爱过 提交于 2019-12-19 07:36:49
问题 I used this seed to get started with Angular 2 Typescript and Webpack: https://github.com/haoliangyu/angular2-leaflet-starter. I'm new to most of the used tools and technologies (Angular 2, Typescript, Webpack). While I understand more and more about these it seems that I still haven't grasped how third-party non-typed JS-libraries are included: I would like to include the leaflet-routing-machine.js into my project. To my knowledge, while there do exist typings for leaflet, there do not exist

How to import leaflet-routing-machine into an Ionic2 project?

我怕爱的太早我们不能终老 提交于 2019-12-11 05:55:01
问题 I don't quite get how to import LRM into a ts file. After installing via npm install leaflet-routing-machine , I defined Routing like this: var Routing = require('leaflet-routing-machine'); var newRoute = Routing.control({Options}); which didn't help me and I got: Error caused by: Routing.control is not a function Here is my Ionic information: Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.1 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 Ionic App Scripts Version: 1.1.0 Node Version: