fpdcc / trailsy

A trip planner and mapper for hiking/biking/riding trail systems.
https://map.fpdcc.com/
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Integrate Accessible Amenities (fishing areas, canoe landings, boat launches, campsites) #262

Closed versatilehuman closed 3 years ago

versatilehuman commented 3 years ago

New Columns

activities

points_of_interest

Based on data updates: https://github.com/fpdcc/webmap_data_updates/issues/242 & https://github.com/fpdcc/webmap_data_updates/issues/239

For here? https://github.com/fpdcc/trailsyserver/blob/development/db/schema.rb

Panel

Javascript

Add after this: https://github.com/fpdcc/trailsy/blob/development/js/panelFunctions.js#L557 (after Canoe Landing)

// accessible_canoe = Accessible Canoe
        if (poi.properties.tags[':panel'].indexOf('accessible_canoe') > -1) {
          fpccAmenitiesString += "<div class='fpccAmenity'><svg class='icon icon-canoe-landing-accessible'><use xlink:href='icons/defs.svg#icon-canoe-landing-accessible'></use></svg><span class='fpccAmenityTitle'><a href='https://fpdcc.com/things-to-do/boating-canoeing-kayaking/'>Accessible Canoe Landing</a></span></div>"
        }

Add after this: https://github.com/fpdcc/trailsy/blob/development/js/panelFunctions.js#L524 (after Boat Launch)

// accessible_boat = Accessible Boat
        if (poi.properties.tags[':panel'].indexOf('accessible_boat') > -1) {
          fpccAmenitiesString += "<div class='fpccAmenity'><svg class='icon icon-boat-launch-accessible'><use xlink:href='icons/defs.svg#icon-boat-launch-accessible'></use></svg><span class='fpccAmenityTitle'><a href='https://fpdcc.com/things-to-do/boating-canoeing-kayaking/'>Accessible Boat Launch</a></span></div>"
        }

Add after this: https://github.com/fpdcc/trailsy/blob/development/js/panelFunctions.js#L553 (after Camp Store)

// accessible_campsite = Accessible Campsites
        if (poi.properties.tags[':panel'].indexOf('accessible_campsite') > -1) {
          fpccAmenitiesString += "<div class='fpccAmenity'><svg class='icon icon-camp-accessible'><use xlink:href='icons/defs.svg#icon-camp-accessible'></use></svg><span class='fpccAmenityTitle'><a href='https://fpdcc.com/things-to-do/camping/'>Accessible Campsites</a></span></div>"
        }

Add after this: https://github.com/fpdcc/trailsy/blob/development/js/panelFunctions.js#L689 (after Ice Fishing)

// accessible_fishing = Accessible Fishing Area
        if (poi.properties.tags[':panel'].indexOf('accessible_fishing') > -1) {
          fpccAmenitiesString += "<div class='fpccAmenity'><svg class='icon icon-fishing-accessible'><use xlink:href='icons/defs.svg#icon-fishing-accessible'></use></svg><span class='fpccAmenityTitle'><a href='https://fpdcc.com/things-to-do/fishing/'>Accessible Fishing Areas</a></span></div>"
        }

SVG

In updated defs.svg https://github.com/fpdcc/trailsy/commit/056d1f3229fe6b9b8daa47b9636ae44d571cb6c5

CSS

Updated in newguts.css https://github.com/fpdcc/trailsy/commit/48e4ea0a23bc852a1878dd95dac67e3fa4b08e8f

Map Icons for New Activities

Building activities on map: https://github.com/fpdcc/trailsy/blob/development/js/activityFeature.js#L115

JavaScript

In activities table:

@shua123 We want to use the new accessible column to mark accessible versions of amenities--canoe landings are the first, but won't be the last. It helps us keep our data cleaner (limited atype), but let me know if this won't work with how we are displaying icons currently.

SVG

In updated defs.svg https://github.com/fpdcc/trailsy/commit/056d1f3229fe6b9b8daa47b9636ae44d571cb6c5

CSS

Updated in newguts.css https://github.com/fpdcc/trailsy/commit/48e4ea0a23bc852a1878dd95dac67e3fa4b08e8f

gisdevcc commented 3 years ago

@versatilehuman I am wondering about the use of "ada" as the field name in activities. In issue #251 the picnicgroves equivalent is named "accessible." Is there a reason not to use accessible here too?

versatilehuman commented 3 years ago

@gisdevcc "ada" was an existing column in points_of_interest and activities, so we went with that. I'm for updating it to "accessible" there if that works for @glw.

gisdevcc commented 3 years ago

Going the other direction works too. I just figured if they mean the same thing, we should standardize on one term, unless there is a reason not to.

glw commented 3 years ago

ive changed the poi column "ada" to "accessible" in the latest update.

gisdevcc commented 3 years ago

db changes: https://github.com/fpdcc/trailsyserver/commit/ea7c02f22881c964b52dd1e55d86fc6d2dea9595

versatilehuman commented 3 years ago

@gisdevcc I'm not seeing accessible fishing areas, accessible canoe landings, accessible boat launches or accessible campsites on the map or in the panel. Looks like the necessary data is there in the latest update though.

gisdevcc commented 3 years ago

@versatilehuman Try again. I forgot to update some of the data on staging.

versatilehuman commented 3 years ago

@gisdevcc Now seeing it on the map, but not the panel:

image

gisdevcc commented 3 years ago

@versatilehuman Should be fixed now via https://github.com/fpdcc/trailsyserver/commit/02faad09239d91d65ef441503f938c797bd4c8de

versatilehuman commented 3 years ago

@gisdevcc Fishing areas, campsites and boat launches look good, still not seeing canoe landing:

image

And can we tweak the logic for boat launches and canoe landings so:

Also, can you drop the "s" from the end so it is Accessible Fishing Area? (my bad) image

gisdevcc commented 3 years ago

@versatilehuman canoe landing is fixed, logic tweaked, and fishing area on staging.