jantman / gw2copilot

A Python-based GuildWars2 helper tool
GNU Affero General Public License v3.0
4 stars 1 forks source link

Populate waypoints, POIs, etc. #13

Closed jantman closed 8 years ago

jantman commented 8 years ago

For each type of map marker that we have buttons for already (waypoints, POIs, etc.) populate the map layers for them.

Look into how gw2timer does this by-zone, where we'll show them if we're beyond a certain zoom level, and otherwise only show them on mouseover.

jantman commented 8 years ago

I can figure it out from the leaflet docs.

I can use a per-zone, per-type layer for the markers (m.zones[MAP_ID].layers.MARKER_TYPE). Maintain arrays of all of these (M.marker_layers.MARKER_TYPE) and use them for the hiding.

Will need to handle persisting the hide settings when we zoom to a layer... maybe with just a global m.WAYPOINTS_HIDDEN var.

jantman commented 8 years ago

We already have data on most of the features from map_floors(), which caches the map_floor API. According to those docs, each map object has keys for tasks (hearts) and skill_challenges, and a points_of_interest list where each entry has a type (landmark (POI), waypoint or vista).

Note we can also make "chat links" for the POIs (just points_of_interest - landmarks/POIs, waypoints and vistas) from their poi_id using the chat link formula for 0x04 links.

jantman commented 8 years ago

As of 612cc00 we now have POIs (waypoints, "landmarks"/POIs, vistas), heropoints and hearts.

Events will be handled in #26.

It seems that, at least in Firefox, displaying them ALL based on zooming the map is currently working as of this commit, but showing waypoints on mouseover when zoomed-out is now broken. Need to look into that and fix it. Maybe it's an issue with my attempts at debouncing?