-
Notifications
You must be signed in to change notification settings - Fork 0
/
anothersidebarattempt.js
55 lines (26 loc) · 3.12 KB
/
anothersidebarattempt.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var map = L.map('map').setView([ 37.9265451,-122.6724551], 17);
var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
}).addTo(map);
var capeIvyShape = { "type": "FeatureCollection", "features": [
{ "type": "Feature", "properties":
{ "slider1": "mg155769-slider.html", "Location Description":"South side of volunteer canyon Creek, from the two willows on the bank to the arching bay tree","Common Name":"Cape ivy","Taxon":"Delairea odorata","Observer":"Henry Inman","Access":"unpublished","ID":"mg155769","Date":"2022-02-09 12:34:32.0"}, "geometry": {"coordinates":[[[-122.6726599,37.9264891],[-122.6726112,37.9264852],[-122.6725809,37.9265296],[-122.6725778,37.9265544],[-122.6725393,37.9265349],[-122.6725174,37.9265094],[-122.6725652,37.9264779],[-122.6726359,37.9264118],[-122.6726643,37.9264333],[-122.6726599,37.9264891]]],"type":"Polygon"}},
{ "type": "Feature", "properties":
{ "slider1": "mg155840-slider.html", "slider2":"mg108282-slider.html", "Infested Area (acres)":"210.1 Square Meters","Number of Plants":"","Date / Time":"2022-02-11 12:22:52.0","Location Description":"","Common Name":"Cape ivy","Percent Cover":"50 - 75 %","Taxon":"Delairea odorata","Gross Area (acres)":"336.9 Square Meters","Phenology":"","Observer":"Henry Inman","Distribution":"","Habitat":"","ID":"mg155840","Notes":""}, "geometry": {"coordinates":[[[-122.6725667,37.9267888],[-122.6726643,37.9268257],[-122.6727055,37.9267358],[-122.6727293,37.9266601],[-122.6727164,37.9265679],[-122.6727128,37.9265233],[-122.6726556,37.9265162],[-122.6726279,37.926532],[-122.6726203,37.9265638],[-122.6726161,37.9266059],[-122.6725574,37.9266305],[-122.6725958,37.9267123],[-122.6725667,37.9267888]]],"type":"Polygon"}},
{ "type": "Feature", "properties":
{"slider1":"mg108282-slider.html","Location Description":"East of lateral Bay Laurel trunk, South side of bc stream","Common Name":"Cape ivy","Taxon":"Delairea odorata","Observer":"Henry Inman","Access":"published","ID":"mg108282","Date":"2020-03-18 17:37:42.0"}, "geometry": {"coordinates":[[[-122.6723207,37.9266848],[-122.6723366976,37.9266890878],[-122.6723734,37.926689],[-122.6723637,37.9266961],[-122.6724081,37.9267053],[-122.6724686,37.9266766],[-122.6724083,37.9266403],[-122.6722851,37.9265632],[-122.6722852,37.9266582],[-122.6723207,37.9266848]]],"type":"Polygon"}},
]}
var mapShapes = L.geoJSON(capeIvyShape, {
onEachFeature: onEachFeature
}).addTo(map);
function onEachFeature(feature, layer) {
layer.on('click', function(e) {
sliderPopup = '<iframe style="height:60%" style ="width:100%" id="iframe" src="' + feature.properties.slider1 + '"></iframe>'
$(".locationDescription").html(feature.properties["Location Description"])
$(".slider").html(sliderPopup);
$(".common").html(feature.properties["Common Name"]);
$(".id").html(feature.properties.ID);
$(".")
// $(".common".html(feature.properties.["Common Name"]);
});
}