Skip to content

Commit

Permalink
Merge pull request #227 from alaframboise/als-directions-fix
Browse files Browse the repository at this point in the history
Directions.html demo fixed
  • Loading branch information
patrickarlt committed Mar 9, 2014
2 parents 36ab8bb + 9aeb540 commit 8cf84c2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/directions.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<!-- Load Esri Leaflet -->
<script src="lib/esri-leaflet/esri-leaflet.js"></script>
<script src="lib/esri-leaflet-geocoder/esri-leaflet-geocoder.js"></script>

<!-- Load geoservices.js to handle additional API requests to ArcGIS services -->
<script src="lib/geoservices/geoservices.js"></script>
Expand Down Expand Up @@ -103,7 +104,10 @@ <h1 class="title contract" id="title" onclick="showControls();">Get Directions</

document.getElementById('title').innerHTML = 'Get Directions';

console.log(response.directions);
// console.log(response.directions);

layerPlaces.addLayer(L.marker(startLocation));
layerPlaces.addLayer(L.marker(endLocation));

// make a geojson object representing our route
var geojson = Terraformer.ArcGIS.parse(response.routes.features[0].geometry);
Expand All @@ -124,7 +128,6 @@ <h1 class="title contract" id="title" onclick="showControls();">Get Directions</

function geocodeAddress(name, callback) {
var geocoding = new L.esri.Services.Geocoding();

geocoding.geocode(name, {}, function(response){
if(response && response.locations) {
var place = response.locations[0];
Expand All @@ -142,4 +145,4 @@ <h1 class="title contract" id="title" onclick="showControls();">Get Directions</
}
</script>
</body>
</html>
</html>

0 comments on commit 8cf84c2

Please sign in to comment.