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

Normalize markers #115

Closed
GeeII opened this issue Oct 25, 2017 · 3 comments
Closed

Normalize markers #115

GeeII opened this issue Oct 25, 2017 · 3 comments
Assignees

Comments

@GeeII
Copy link
Member

GeeII commented Oct 25, 2017

Prior to resolving issue #54 feature request: marker clustering, I would like to normalize the various classes of markers. Currently, districts, regionals, and teams have different marker lists. Team infowindows are populated from a real-time TBA pull, while competitions' info are in the data file. I propose a single array for marker creation:
type: integer //or possibly character: a code for team, district, regional, RCMP, CMP
label: text // label for popup and root of filename for custom icon if one exists
icon: boolean // Is there a custom icon for this team/event? (null by default; set from overrides.js)
// possibly this would be a partial url string instead, but I think boolean is sufficient.
lat: float // Latitude in degrees north of equator
lng: float // Longitude in degrees east of Greenwich
marker: Marker // begins null; set in a marker creation loop.

This single array of markers would still have markers turned on/off by type, but would be more amenable to implementing a cluster scheme.

Also, note that competition popup labels would be populated with a call to TBA rather than from cached data. I also intend to add in the CMP events from TBA, and maybe will add ToC.

Any issues with making these changes?

@GeeII GeeII self-assigned this Oct 27, 2017
@GeeII
Copy link
Member Author

GeeII commented Oct 29, 2017

I've made the first few steps towards this in my fork. I have changed the competitions.js to events.js because it has a slimmer structure format rather than an array format. I've also collapsed the three marker array variables to a single one. May of the calls have fewer arguments. Next is to collapse openTeamInfo(num,marker) and openCompInfo(marker) to a single openInfo(marker).

@GeeII
Copy link
Member Author

GeeII commented Oct 29, 2017

Any suggestions for a marker for CMPs (Houston, Detroit)?

@GeeII
Copy link
Member Author

GeeII commented Oct 29, 2017

OK! found a stock photo of Albert Einstein that is instantly identifiable cropped to a circle and reduced to 40px across.

@GeeII GeeII closed this as completed Nov 10, 2017
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

1 participant