Difference between revisions of "Range test"
Jump to navigation
Jump to search
Line 100: | Line 100: | ||
− | + | !Antoher test | |
Line 127: | Line 127: | ||
var url2 = 'files/species_15933.geojson'; // my GeoJSON data source, in same folder as my html page. | var url2 = 'files/species_15933.geojson'; // my GeoJSON data source, in same folder as my html page. | ||
var gibbon1 = 'files/Hoolock_hoolock.geojson'; | var gibbon1 = 'files/Hoolock_hoolock.geojson'; | ||
+ | var hoolockleuconedys = 'files/Hoolock_leuconedys.geojson'; | ||
var map = L.map('map').setView([-0, 6], 4); | var map = L.map('map').setView([-0, 6], 4); | ||
Line 168: | Line 169: | ||
}; | }; | ||
} | } | ||
+ | |||
+ | function stylehoolockleuconedys(feature) { | ||
+ | return { | ||
+ | fillColor: 'orange', | ||
+ | fillOpacity: 0.7, | ||
+ | weight: 2, | ||
+ | opacity: 0.7, | ||
+ | color: 'orange', | ||
+ | dashArray: '3' | ||
+ | }; | ||
+ | } | ||
+ | |||
+ | |||
// Null variable that will hold layer | // Null variable that will hold layer | ||
var stateLayer = L.geoJson(null, {style: style}); | var stateLayer = L.geoJson(null, {style: style}); | ||
var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2}); | var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2}); | ||
var gibbonLayer = L.geoJson(null, {style: stylegibbon}); | var gibbonLayer = L.geoJson(null, {style: stylegibbon}); | ||
+ | var hoolockleuconedysLayer = L.geoJson(null, {style: stylehoolockleuconedys}); | ||
$.getJSON(url, function(data) { stateLayer.addData(data);}); | $.getJSON(url, function(data) { stateLayer.addData(data);}); | ||
Line 181: | Line 196: | ||
$.getJSON(gibbon1, function(data) { gibbonLayer.addData(data);}); | $.getJSON(gibbon1, function(data) { gibbonLayer.addData(data);}); | ||
gibbonLayer.addTo(map); | gibbonLayer.addTo(map); | ||
+ | |||
+ | $.getJSON(hoolockleuconedys, function(data) { hoolockleuconedysLayer.addData(data);}); | ||
+ | hoolockleuconedysLayer.addTo(map); | ||
// for Layer Control | // for Layer Control | ||
Line 192: | Line 210: | ||
"Ape range":stateLayer2, | "Ape range":stateLayer2, | ||
"Gibbon range": gibbonLayer, | "Gibbon range": gibbonLayer, | ||
+ | "Hoolock leuconedys range" : hoolockleuconedysLayer | ||
}; | }; | ||
Revision as of 05:47, 6 March 2022
Species | Shapefile | GeoJSON | Source |
---|---|---|---|
Hoolock hoolock | Hoolock hoolock shapefile (ZIP; 110 kB)] |
!Antoher test