I am currently struggling with something and was hoping to get some ideas/workarounds/assistance. I have a project due in a couple weeks, and the client just decided they want it to have more complex functionality. My first thought on accomplishing this extra functionality was to use Intuiface.
The new project requirements:
An interactive world map that visually represents how many people are attending the event from each country by displaying a running tally “score keeper” over each country.
A customer walks up to a display at a conference with a world map on it. Their is a search bar at the bottom of the map for the customer to type in the city or postal code they come from. When they type this in and hit enter, the map moves to the region they entered. Then it zooms out and resets to the central world view, shows a number over the country of the city they just entered, and increments that number by 1, adding the customers presence to the tally.
Here’s what I’ve got so far:
I have a text input asset whose value is bound to an Address to Coordinate asset. The Address to Coordinate asset’s latitude and longitude values are bound to a map (using mapbox). So right now functionally I can type in a city or zip code and have the map move to that location.
Running tally functionality
I have an excel file with all the countries in the world and their latitude and longitude coordinates. Within intuiface, within my map asset, I have my excel asset, and beneath that a text asset to work as a “score keeper” template for each country. That “score keeper” text asset has it’s latitude and longitude values bound to the corresponding latitude and longitude cells in the excel sheet.
So right now functionally I have a map that has numbers automatically placed over each country on the map, waiting for action.
My main struggle:
I’m having difficulty connecting these two pieces so that when I hit enter, the corresponding score for the country entered goes up.
I’m not sure how to do that here, how to make an identifier for each country’s “score keeper” that can be triggered to increment if it’s country is found.
What I’ve tried:
I’ve used the Address to Coordinates asset to move the map, and then bound those latitude and longitude values to a Coordinates to Address asset to give me back the country associated with the city or postal code entered. So I can tell which country the city the user entered is in.
Then I’ve tried using the Two Value Comparison asset, binding the Coordinates to Asset country value to Value A, and binding Value B to the name of the country in the excel file, so I can compare the map country to a value within the country list. With this setup, I can trigger a Simple Counter asset to add one to a text asset if the results match. However, this only works for a single bound value. Is there a way to pass in a relative value (like you would pass in an argument in a function) so that it can compare multiple values for Value B against Value A instead of having to hard code and duplicate this setup for each country?
A friend suggested possibly looking into using excel formulas to compare and/or increment the score values instead of doing it within intuiface. That way I could just have a score column in intuiface, compare values and increment the right number within excel, and find a way to spit that back out to the “score keeper” text asset for it’s associated country. That sounds like it’s probably a viable solution, but I don’t know enough yet about excel formulas or using them within Intuiface. I will keep playing with it tomorrow, if this is (or isn’t) a realistic solution please let me know.
Anyway, it’s been a long day and my brain is a little fried so I apologize if this is too wordy or makes no sense. I will upload a project file of my current set up as soon as I can (might not be until tomorrow morning).
Any help would be greatly appreciated.