developmentseed / observe

Cross-platform, offline, field mapping tool for OpenStreetMap
ISC License
66 stars 5 forks source link

Preset icon matching #279

Closed LanesGood closed 4 years ago

LanesGood commented 4 years ago

Despite the fixes in #230 it still appears that preset icons are incorrect.

This is on Android and iPhone, running locally on emulator, and using the latest release apk on an Android Ex:

Screen Shot 2020-05-29 at 5 32 53 PM Screen Shot 2020-05-29 at 5 31 20 PM Screen Shot 2020-05-29 at 5 32 15 PM
geohacker commented 4 years ago

Oh so weird. I'm not able to reproduce this. @vgeorge could you take a look?

vgeorge commented 4 years ago

@LanesGood tested on both platforms, presets look good to me on branch edit-ways.

LanesGood commented 4 years ago

@vgeorge @geohacker I'm wiping emulator data often - any other cache cleaning I need to be doing?

sethvincent commented 4 years ago

I've also been seeing the types of icon issues shown in these screenshots. I'm not sure why it would be different for some of us.

LanesGood commented 4 years ago

@geohacker @sethvincent I've deleted and re-cloned the repo, spun up a new device in emulator, and I'm still seeing this on android with the edit-ways branch

Noting that map icons do appear correct:

The results of `console.log(filteredPresets)` don't offer much insight here: ``` [ { icon: 'maki-home', │ fields: [ 'name', 'building', 'levels', 'height', 'address' ], │ moreFields: │ [ 'architect', │ 'building/material', │ 'layer', │ 'roof/colour', │ 'smoking', │ 'wheelchair' ], │ geometry: [ 'point', 'area' ], │ tags: { building: '*' }, │ matchScore: 0.6, │ terms: [], │ name: 'Building', │ key: 'building' }, │ { icon: 'maki-bus', │ fields: [ 'name', 'network', 'operator', 'bench', 'shelter' ], │ geometry: [ 'point', 'vertex' ], │ tags: { highway: 'bus_stop' }, │ name: 'Bus Stop / Platform', │ searchable: false, │ key: 'highway/bus_stop' }, │ { fields: [ 'name' ], │ geometry: [ 'point' ], │ tags: {}, │ name: 'Point', │ matchScore: 0.1, │ key: 'point' }, │ { icon: 'maki-restaurant', │ fields: │ [ 'name', │ 'cuisine', │ 'address', │ 'building_area', │ 'opening_hours', │ 'outdoor_seating' ], │ moreFields: │ [ 'takeaway', │ 'delivery', │ 'capacity', │ 'diet_multi', │ 'smoking', │ 'internet_access', │ 'internet_access/fee', │ 'internet_access/ssid', │ 'website', │ 'phone', │ 'email', │ 'fax', │ 'wheelchair', │ 'bar' ], │ geometry: [ 'point', 'area' ], │ terms: │ [ 'bar', │ 'breakfast', │ 'cafe', │ 'café', │ 'canteen', │ 'coffee', │ 'dine', │ 'dining', │ 'dinner', │ 'drive-in', │ 'eat', │ 'grill', │ 'lunch', │ 'table' ], │ tags: { amenity: 'restaurant' }, │ name: 'Restaurant', │ key: 'amenity/restaurant' }, │ { icon: 'maki-school', │ fields: │ [ 'name', │ 'operator', │ 'address', │ 'religion', │ 'denomination', │ 'website' ], │ moreFields: │ [ 'internet_access', │ 'internet_access/ssid', │ 'phone', │ 'email', │ 'fax', │ 'wheelchair' ], │ geometry: [ 'point', 'area' ], │ terms: [ 'academy', 'elementary school', 'middle school', 'high school' ], │ tags: { amenity: 'school' }, │ name: 'School', │ key: 'amenity/school' }, │ { icon: 'maki-park', │ fields: [ 'leaf_type_singular', 'leaf_cycle_singular', 'denotation' ], │ geometry: [ 'point', 'vertex' ], │ tags: { natural: 'tree' }, │ terms: [], │ name: 'Tree', └ key: 'natural/tree' } ] ```

No issues on iPhone simulator as seen below:

LanesGood commented 4 years ago

As an update:

I checked in the develop branch on Android and get the same incorrect icons on Select Feature Type, and elsewhere also have incorrect icons.

Following @geohacker link to this issue, I looked around and believe the edits to the build.gradle file may hold the solution: https://github.com/oblador/react-native-vector-icons#android

However, I'm definitely not implementing this correctly as it has no effect.

geohacker commented 4 years ago

Fixed in #300. This came down to manually updating the ttf file in the android assets directory. This is not a problem for iOS.