Skip to content

Commit

Permalink
Merge pull request #20 from thinkWhere/doco
Browse files Browse the repository at this point in the history
Update theme example
  • Loading branch information
Martin Clarke committed Mar 25, 2019
2 parents fa0b35c + 091dafd commit 2423de1
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion SETUP.md
Expand Up @@ -104,7 +104,58 @@ export {

```

## Defining AttributeTags
Example theme 2 - A more complicated theme example, with a defined list of AttributeTags

```javascript

let digiAccess = {
Name: "digitalAccess",
Title: "Digital Access",
Headline: "Shows locations of places that provides access to digital Services",
Description: "This theme shows locations that provide access to digital services. These include access to " +
"printing facilities, access to computers for public use and Wifi / internet access",
Author: "MartinClarke",
OSMFeatures: ["ways", "nodes"],
GeoTags: {
"amenity": ["library", "community_centre"]
},
AttributeTags: [
{ attributeName: "Internet Access",
attributeTag: "internet_access",
attributeValues: ["wlan", "yes", "terminal", "wifi", "service"],
icon: "wifi"
},
{ attributeName: "Printing Facilities",
attributeTag: "digital_access",
attributeValues: ["printer"],
icon: "print"
},
{ attributeName: "Computer Access",
attributeTag: "digital_access",
attributeValues: ["computer"],
icon: "desktop"
},
{ attributeName: "Membership Required",
attributeTag: "digital_access:membership",
attributeValues: ["yes"],
icon: "exclamation",
iconColor: "red"
},

],
overpassQuery: `[out:json];\
(way["amenity"~"(library|community_centre)$"][~"^(internet_access|digital_access)$"~"."](around:20000,56.0019,-3.7893);\
node["amenity"~"(library|community_centre)$"][~"^(internet_access|digital_access)$"~"."](around:20000,56.0019,-3.7893););\
out body;>;out skel qt;`,
mapConfig: {
mapIcon: "wifi",
color: "blue"
}
};

```

## More on AttributeTags

The attributeTags definition for a theme describes the feature attributes of interest and how these attributes map to
OpenStreetMap tags. This allows control over what type of information to display in a feature information popup, in addition
Expand Down

0 comments on commit 2423de1

Please sign in to comment.