-
-
Notifications
You must be signed in to change notification settings - Fork 100
Configuration
To change visual elements of Finda the file config.json
should be edited. Here is a explanation of different configuration options.
"project": {
"name": "Finda",
"description": "<p>Finda is a generic \"find-a\" app for geographic datasets.</p>",
"contact": "Please send feedback, ideas, and bug reports to CodeforBoston"
}
Include some information about your project, which will be displayed under the About link.
"map": {
"center":[42.3725, -71.1266],
"zoom":13,
"maxZoom":16,
"maxBounds":[
[39.2, -78.0],
[44.5, -65.0]
]
}
The center of the map when it first appears.
The zoom level of the map when it first appears. In the northeast U.S., a zoom level of 8 is a region, 12 is a city, 15 is street detail.
How close the user can zoom in. This is usually determined by the maximum resolution of the tileset. For the default Acetete tileset, the maximum zoom level is 18.
The limits of where the user can scroll on the map. The two coordinates are the northwest and southeast corners of the bounding box. If enabled, this will also be used to limit the area searched with the geolocator.
How the properties in each GeoJSON feature are displayed. Each key is the name of a property, their order is the order they will be displayed on the popup. if the field is empty (null, empty string, empty list) it will not be displayed.
"properties":{
"organization_name": {},
"address": {},
"web_url": { "title": "website", "url": true },
"contact_names": { "title": "Contact Information" },
"contact_emails": {},
"phone_numbers": {},
"services_offered": { "title": "Services" },
"youth_category": { "title": "Type of Organization" },
"target_populations": { "title": "Populations Served" },
"additional_notes": { "title": "Information"}
}
if a field has a title attribute it will be displayed after that title value, if not it will be displayed alone.
boolean, if a field is a url it will be displayed as a hyperlink with either the title text or [link].
boolean, if present the value will be treated as the URL of an image.
The styles of the properties displayed inside the info boxes are configured in file styles/properties.css
. Each property is represented by a css id of the same name:
#property_name { style... }
"search": {
"geosearch": true
}
Adds a geosearch bar at the top of the page if geosearch
is true.
"facets": {
"youth_category": {
"title": "Category",
"type": "single"
},
"services_offered": {
"title": "Services",
"type": "list"
}
}
Display a selector for all the elements with the given property.
"data_type": "flat",
"geojson_source": "data.geojson"
data_type
specifies the type of the data, either flat
geojson or a soql
SODA query.
geojson_source
specifies the data to display on the map. If data_type
is flat
this is either the name of the flat geojson file or an HTTP(S) URLs to get data from elsewhere on the web which is returned as geojson. If data_type
is soql
this a Socrata query url