Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.togglable-layer { | |
margin-top: 0.8em; | |
width: 100%; | |
} | |
.togglable-layer:hover { | |
background-color: #ccc; | |
cursor: pointer; | |
} | |
.togglable-layer.visible { | |
background-color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//click event for layers | |
//using dojo for the event and class toggling | |
//but could just as easily be jQuery or vanilla javascript | |
on(dojo.byId("trail"), "click", function() { | |
trailsLayer.visible ? trailsLayer.hide() : trailsLayer.show(); | |
dojo.toggleClass(this, "visible"); | |
dojo.query("#trail .visibility-icon") | |
.toggleClass("fa-picture-o") | |
.toggleClass("fa-ban"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span id='so-blinky' style='text-decoration: blink;'>i m so blinky</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md#options | |
var campBH = new Bloodhound({ | |
name: "camp", | |
datumTokenizer: function (d) { | |
return Bloodhound.tokenizers.whitespace(d.name); | |
}, | |
queryTokenizer: Bloodhound.tokenizers.whitespace, | |
remote: { | |
// feature services currently only support query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// build the esri geocoder bloodhound engine | |
var esriBH = new Bloodhound({ | |
name: "esri-geocoder", | |
datumTokenizer: function (d) { | |
return Bloodhound.tokenizers.whitespace(d.name); | |
}, | |
queryTokenizer: Bloodhound.tokenizers.whitespace, | |
remote: { | |
//https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm | |
// use the searchExtent parameter to limit the results to roughly washington state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#searchInput").typeahead({ | |
minLength: 3, | |
highlight: true, | |
hint: false | |
}, | |
… |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
, { | |
name: "camp", | |
displayKey: "name", | |
source: campBH.ttAdapter(), | |
// what the header looks like for this source in the suggestions drop down | |
templates: { | |
header: "<h1 class='typeahead-header'><span class='icon icon-camp'></span> Campgrounds</h1>" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#searchInput").typeahead({ | |
// how many characters does the user type before suggestions start firing | |
minLength: 3, | |
highlight: true, | |
hint: false | |
}, { | |
name: "camp", | |
displayKey: "name", | |
source: campBH.ttAdapter(), | |
// what the header looks like for this source in the suggestions drop down |
OlderNewer