Skip to content

Commit 9c85326

Browse files
committed
added a fake point
1 parent e3aab91 commit 9c85326

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed

Application/samplemap.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,7 @@ var pgCounty = [38.837847,-76.848410];
5656
// Create our CWP Projects layer and add popups
5757
var cwp = new L.geoJson(cwpprojects, {
5858
// add options...eventually
59-
style: function(feature){
60-
switch (feature.properties.Phase) {
61-
case 'Design': return {color: feature.properties.marker-color};
62-
case 'Completed': return {color: feature.properties.marker_color};
63-
case 'Planning': return {color: feature.properties.marker_color};
64-
case 'Construction': return {color: feature.properties.marker_color};
65-
}
66-
},
59+
style: cwpStyle,
6760
onEachFeature: function (feature, layer) {
6861
layer.bindPopup('<b>Phase:</b>' + feature.properties.Phase + '<br/><b>Start Date:</b>' + feature.properties.Start_Date);
6962
}
@@ -108,6 +101,15 @@ var pgCounty = [38.837847,-76.848410];
108101
info.update(layer.feature.properties);
109102
}
110103

104+
function cwpStyle(feature){
105+
switch (feature.properties.Phase) {
106+
case 'Design': return {color: feature.properties.marker_color};
107+
case 'Completed': return {color: feature.properties.marker_color};
108+
case 'Planning': return {color: feature.properties.marker_color};
109+
case 'Construction': return {color: feature.properties.marker_color};
110+
}
111+
}
112+
111113
function style(feature) {
112114
return {
113115
"weight": 3,

cwpprojects2.geojson

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,32 @@
2727
]
2828
}
2929
},
30+
{
31+
"type": "Feature",
32+
"properties": {
33+
"Name": 78,
34+
"ADC": 5286,
35+
"PM": "FAKE",
36+
"Phase": "Design",
37+
"Latitude": 39.010000,
38+
"Longitude": -76.916032,
39+
"Percent_Cm": 0,
40+
"Council_Di": 1,
41+
"Start_Date": "2016/24/11",
42+
"Major_Proj": "Some Stuff",
43+
"Number": 32,
44+
"marker-color": "#b803fc",
45+
"marker-size": "medium",
46+
"marker-symbol": "circle"
47+
},
48+
"geometry": {
49+
"type": "Point",
50+
"coordinates": [
51+
-76.98603385088149,
52+
39.010000
53+
]
54+
}
55+
},
3056
{
3157
"type": "Feature",
3258
"properties": {

0 commit comments

Comments
 (0)