Skip to content
radumas edited this page Apr 8, 2015 · 7 revisions

To change visual elements of Finda the file config.json should be edited. Here is a explanation of different configuration options.

config.geojson

project

"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

"map": {
    "center":[42.3725, -71.1266],
    "zoom":13,
    "maxZoom":16,
    "maxBounds":[
        [39.2, -78.0],
        [44.5, -65.0]
    ]
}

center

The center of the map when it first appears.

zoom

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.

maxZoom

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.

maxBounds

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.

properties

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"}
}

fields in properties:

title

if a field has a title attribute it will be displayed after that title value, if not it will be displayed alone.

url

boolean, if a field is a url it will be displayed as a hyperlink with either the title text or [link].

image

boolean, if present the value will be treated as the URL of an image.

styling of info boxes:

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

"search": {
   "geosearch": true
}

Adds a geosearch bar at the top of the page if geosearch is true.

facets

"facets": {
    "youth_category": {
        "title": "Category",
        "type": "single"
    },
    "services_offered": {
        "title": "Services",
        "type": "list"
    }
}

Display a selector for all the elements with the given property.

geojson_source

"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

Clone this wiki locally