You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TileMill allows you to add some limited interactivity to you map. Primarily this means you can create info windows with additional information pulled form your data. For our map, we'll add an info window that tells the user the total and percentage of the population that is Hungarian descended as well as the census tract number.
205
+
206
+
On the vertical stack of buttons in the bottom-left corner, click the pointing hand. This will open up the *Templates* window. Here you have options to add a legend, hover teaser, click function, and link to external resources. Go ahead and click **Teaser**.
There is a dropdown menu currently set at `--disabled--`. This dropdown lets us determine what layer we're going to call on for interaction. Select `tracts`. You'll see the gray are abelow filled with the various attributes of from our tracts data surrounded by triple curly braces (Mustache tags).
In the content area above we can combine plain text or HTML with our mustachioed attributes. Let's use `{{{p_hung}}}`, `{{{t_hung}}}`, and `{{{NAME}}}` along with some HTML:
215
+
216
+
`There are <strong>{{{t_hung}}}</strong> residents (<strong>{{{p_hung}}}%</strong> of population) in tract <strong>{{{NAME}}}</strong> of Lucas County claiming Hungarian ancestry.`
217
+
218
+
Click on the **Full** button and the same text to that content area. By adding this text in both **Teaser** and **Full** we can see our info window text when we hover or click a feature.
0 commit comments