2016-06-19 9 views
-1

Ich brauche ein funktionierendes Beispiel bitte, weil dieser cod erzeugt Textfelder ohne eine Schaltfläche, um den Code auszuführen.So wie kann man die Taste, um den Code ausführen?Leafletjs L.Control.Geocoder.nominatim(), Button zum Ausführen des Codes

var geocoder = L.Control.Geocoder.nominatim(); 
 

 
L.Routing.control({ 
 
geocoder: geocoder, 
 
waypoints: [ 
 
    L.latLng(null, "here my current position, data from GPS"), 
 
    L.latLng(null, "here address as string, input from the user") 
 
], 
 
show: false, 
 

 
routeWhileDragging: false, 
 

 
}).addTo(map);

+0

Mögliches Duplikat von [Wie übergeben Sie die String-Adresse an die Routing-Maschine des Flugblattes, um die Richtung anhand der String-Adresse zu erhalten?] (Http://stackoverflow.com/questions/37062782/how-to-pass-string-address-) to-leaflet-routing-machine-to-get-direction-based-on) – IvanSanchez

+0

Siehe auch: https://stackoverflow.com/questions/37062782/how-to-pass-string-address-to-leaflet-routing-machine -zu-Richtung-basierend-auf – IvanSanchez

Antwort

Verwandte Themen