1 | // Options passed to the leaflet map constructor. |
---|
2 | // @see": http"://leafletjs.com/reference.html#map-options |
---|
3 | { // Start of _Base.json |
---|
4 | map: |
---|
5 | { |
---|
6 | center: [40.168, -74.572] |
---|
7 | ,maxBounds: [[38.78, -76.0], [41.42, -72.8]] //south west, then north east - larger negative number on east moves NJ map east |
---|
8 | ,zoom: 8 |
---|
9 | ,minZoom: 7 |
---|
10 | ,maxZoom: 14 |
---|
11 | ,attributionControl: true |
---|
12 | } |
---|
13 | |
---|
14 | /* This is the map's intent/purpose/. Valid values are: |
---|
15 | - selection = tells this code to build the geo area type selection UI. |
---|
16 | - choropleth= tells this code to build the choropleth control UI. |
---|
17 | - display = not current used - for v3 demographics? |
---|
18 | NOTE: choropleth is the default but this value can be overridden |
---|
19 | by named configuration usage or even having specific js code for |
---|
20 | certain page requests. |
---|
21 | */ |
---|
22 | ,type: "choropleth" |
---|
23 | |
---|
24 | ,layersControl: |
---|
25 | { |
---|
26 | collapsed: false |
---|
27 | |
---|
28 | /* Main container for layers - specifically groups of layers. Each |
---|
29 | group is defined starting with the group's key (example: "labels":). |
---|
30 | Each group structure contains a title property and a group type |
---|
31 | property. The title is the text that appears at the top of that |
---|
32 | selections group in the control panel's UI. The group type |
---|
33 | controls where within the layer UI control to include the group |
---|
34 | of layers (how to build the selections). |
---|
35 | |
---|
36 | Valid group "type" values are: |
---|
37 | - base = put definitions in the base map grouping/area. |
---|
38 | - overlay = put definitions in the overlays area. |
---|
39 | - selection = put definitions into the special geo area selection |
---|
40 | area. This is used when the map "type" property is "selection". |
---|
41 | - choropleth = choro grouping - not currently in use - hard coded. |
---|
42 | The choropleth control is displayed when the map "type" |
---|
43 | property is "choropleth". |
---|
44 | |
---|
45 | - defaultOptions = base options that all of the group's layers use. |
---|
46 | - layers = actual layer definition structure. |
---|
47 | |
---|
48 | */ |
---|
49 | ,layerGroups: |
---|
50 | { |
---|
51 | /* The Geo type labels are implemented using a circle marker. This was |
---|
52 | done 1/2015 due to time limitations and works fine via the config |
---|
53 | code below. Another solution is to attach with the layer and use the |
---|
54 | layer's poly min/max x/y to position. See the L.GeoJSON.Choropleth.js |
---|
55 | file line 219 for how this was started. That code could be used for |
---|
56 | other labeling of layers but would need to be attached and configed. |
---|
57 | */ |
---|
58 | "labels": |
---|
59 | { |
---|
60 | title: "Labels" |
---|
61 | ,type: "overlay" |
---|
62 | ,defaultOptions: |
---|
63 | { |
---|
64 | pointToLayer: function(feature, latlng) |
---|
65 | { |
---|
66 | return L.marker(latlng, |
---|
67 | { |
---|
68 | icon: L.divIcon( {html: feature.properties["TITLE"], className: "GeoLabel", iconAnchor: [0, 0]} ) |
---|
69 | } |
---|
70 | ); |
---|
71 | } |
---|
72 | } |
---|
73 | ,layers: |
---|
74 | { |
---|
75 | "GeoCnty": |
---|
76 | { |
---|
77 | title: "County" |
---|
78 | ,url: "view/json/map/GeoCntyLabel.json" |
---|
79 | ,show: true |
---|
80 | ,options: |
---|
81 | { |
---|
82 | } |
---|
83 | } |
---|
84 | } |
---|
85 | } |
---|
86 | } |
---|
87 | } |
---|
88 | |
---|
89 | ,choroplethControl: |
---|
90 | { |
---|
91 | legend: |
---|
92 | { |
---|
93 | titleRangeDisplayType: "PlusAfterStartValue" // options are LessThanEqualEndValue, PlusAfterStartValue, GreaterThanEqualRangeSeparator, default: - |
---|
94 | } |
---|
95 | ,areaColor: |
---|
96 | [ |
---|
97 | ["black"] |
---|
98 | ,["transparent", "#0868AC"] |
---|
99 | ,["transparent", "#A8DDB5", "#0868AC"] |
---|
100 | ,["transparent", "#FFFFCC", "#A8DDB5", "#0868AC"] |
---|
101 | ,["transparent", "#FFFFCC", "#BAE4BC", "#7BCCC4", "#0868AC"] |
---|
102 | ,["transparent", "#FFFFCC", "#BAE4BC", "#7BCCC4", "#43A2CA", "#0868AC"] |
---|
103 | ,["transparent", "#FFFFCC", "#CCEBC5", "#A8DDB5", "#7BCCC4", "#43A2CA", "#0868AC"] |
---|
104 | ,["transparent", "#FFFFCC", "#CCEBC5", "#A8DDB5", "#7BCCC4", "#4EB3D3", "#2B8CBE", "#0868AC"] |
---|
105 | ] |
---|
106 | } |
---|
107 | } |
---|