brnkhy / MapzenGo

Pokemon Go clone using Unity3D & Mapzen/OpenStreetMap
http://www.barankahyaoglu.com
MIT License
199 stars 59 forks source link

ConvertToEnum fails with composite words (in geojson) #34

Closed kluiverjh closed 8 years ago

kluiverjh commented 8 years ago

The ConvertToEnum in class Extensions throws sometimes an exception. The problem is with composite words in the enum name.

E.g. The enum definition LanduseKind has enum "RecreationGround" but geojson returns "Recreation_Ground".

The easy way is to remove the "_" from the string before converting.

Every exception is a large performance penalty!

brnkhy commented 8 years ago

I'm sure I fixed this (today) but probably not pushed yet. It was a silly mistake, I used resharper renaming too to fix first letters of those enums (wasn't capitalized), turns out it also removed underscores. I'll push it soon. I havent checked (god knows why) other enums yet though, they probably have the same error as well.

brnkhy commented 8 years ago

just fixed bunch of other enums as well. couldnt fix buildingtype though, I don't have a proper list of those as Roman submitted those. I'll check them later as well. pushed fixed enums on dev branch