Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of categories in Citadel apps #65

Open
rozsch91 opened this issue Oct 9, 2014 · 3 comments
Open

List of categories in Citadel apps #65

rozsch91 opened this issue Oct 9, 2014 · 3 comments

Comments

@rozsch91
Copy link

rozsch91 commented Oct 9, 2014

I can't figure out in which order the categories in Citadel applications list.
It is not alphabetical. I have tried to reorder the dataset in numerous ways with little or no effect on the order of categories in the app. This causes issues when, for example, an app is made on schools as it makes more logical sense to list the categories of schools by age order (primary, secondary, college...) than a random order. Any ideas?

@Facyla
Copy link
Member

Facyla commented Oct 9, 2014

I do not have the answer, but had the same issues with ordonate ranges for which i'd like to have gradient colors and this sort of thing, so i'll dive into this some day.

My idea would be to set the markers from a "marker" column, or from the category, if it exists, and rely on random marker only for undefined markers : this way we would simply have to add the properly-name marker into the images folder, and set the appropriate marker in the input data...

@Facyla
Copy link
Member

Facyla commented Oct 9, 2014

Ok, the pin color + marker is determined by setting colors + markers using a list of 17 colors (from 0 to 16).

Related code is in https://github.com/CitadelOnTheMove/Citadel-Pois-Template/blob/3e4f01af0dd3b5a459d6f5dd328d334454a35ea3/js/pois-lib.js (search for "image/pin")

The filters (categories) are defined by checking the database (or in our case the data file), and builds them by checking each POI and adding the categories if not already set, so the order should be the one of the first appearance of the categories inside your data file... Related code is at https://github.com/CitadelOnTheMove/Citadel-Pois-Template/blob/a571d4bab2e9d78fbbeb14f54e99fffaa60ee427/php/filters.php

That's not a solution yet, but hope it helps getting to it :)

A quick and dirty hack without code change could be to set a single record (before the first POI) that does not display (no title or no coordinate should do the trick without breaking the app), but that contains all the dataset categories in the desired order - cannot guarantee sure it'll work, but you may want to check it.
Or edit the file that produces the categories list, or/and the one that produces the markers.
And also edit the markers to better fit in your app ;-)

@rozsch91
Copy link
Author

Thanks Facyla - I will look into this and let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants