{"action":"closed","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/11277","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/11277/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/11277/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/11277/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/11277","id":299160787,"node_id":"MDU6SXNzdWUyOTkxNjA3ODc=","number":11277,"title":"Cannot apply multiple to zoom level styling","user":{"login":"bsudekum","id":1058624,"node_id":"MDQ6VXNlcjEwNTg2MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1058624?v=4","gravatar_id":"","url":"https://api.github.com/users/bsudekum","html_url":"https://github.com/bsudekum","followers_url":"https://api.github.com/users/bsudekum/followers","following_url":"https://api.github.com/users/bsudekum/following{/other_user}","gists_url":"https://api.github.com/users/bsudekum/gists{/gist_id}","starred_url":"https://api.github.com/users/bsudekum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsudekum/subscriptions","organizations_url":"https://api.github.com/users/bsudekum/orgs","repos_url":"https://api.github.com/users/bsudekum/repos","events_url":"https://api.github.com/users/bsudekum/events{/privacy}","received_events_url":"https://api.github.com/users/bsudekum/received_events","type":"User","site_admin":false},"labels":[{"id":352634063,"node_id":"MDU6TGFiZWwzNTI2MzQwNjM=","url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/Core","name":"Core","color":"000000","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-21T22:57:19Z","updated_at":"2018-07-02T23:42:48Z","closed_at":"2018-07-02T23:42:47Z","author_association":"CONTRIBUTOR","body":"<!--\r\nHello and thanks for contributing! To help us diagnose your problem quickly, please:\r\n\r\n - Include a minimal demonstration of the bug, including code, logs, and screenshots.\r\n - Ensure you can reproduce the bug using the latest release.\r\n - Only post to report a bug or request a feature; direct all other questions to: https://stackoverflow.com/questions/tagged/mapbox\r\n-->\r\n\r\n**Platform: iOS**\r\n**Mapbox SDK version: v4.0.0-beta.2**\r\n\r\n### Steps to trigger behavior\r\n\r\nConsider the following code:\r\n\r\n```swift\r\n\r\nlet routeLineWidthAtZoomLevels: [Int: NSExpression] = [\r\n    10: NSExpression(forConstantValue: 8),\r\n    13: NSExpression(forConstantValue: 9),\r\n    16: NSExpression(forConstantValue: 11),\r\n    19: NSExpression(forConstantValue: 22),\r\n    22: NSExpression(forConstantValue: 28)\r\n]\r\n\r\nlineCasing.lineWidth = NSExpression(format: \"FUNCTION($zoomLevel, 'mgl_interpolateWithCurveType:parameters:stops:', 'linear', nil, %@) * 0.85\", routeLineWidthAtZoomLevels)\r\n```\r\n\r\n### Expected behavior\r\n\r\nEach zoom level is scaled by a factor of 0.85\r\n\r\n### Actual behavior\r\n\r\n```\r\n*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid property value: \"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x0000000105f9812b __exceptionPreprocess + 171\r\n\t1   libobjc.A.dylib                     0x00000001065fff41 objc_exception_throw + 48\r\n\t2   CoreFoundation                      0x000000010600d245 +[NSException raise:format:] + 197\r\n\t3   Mapbox                              0x000000010256f6bb _Z23MGLZoomLevelForAltitudeddd6CGSize + 43393\r\n\t4   Mapbox                              0x000000010259e077 _Z27MGLTimeIntervalFromDurationNSt3__16chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE + 84156\r\n\t5   MapboxNavigation                    0x0000000102d03b8b _T016MapboxNavigation0B7MapViewC24alternateRouteStyleLayerSo08MGLStyleH0CSS10identifier_So9MGLSourceC6sourcetF + 427\r\n\t6   MapboxNavigation                    0x0000000102cf3231 _T016MapboxNavigation0B7MapViewC10showRoutesySay0A10Directions5RouteCG_Si8legIndextF + 27873\r\n\t7   Voyage                              0x0000000101f12a88 _T06Voyage31DirectionsPreviewViewControllerC26calculateRouteAndUpdateMap33_A08FD54413D51CEC9931375EB0B787F0LLySC29MBDirectionsProfileIdentifierV10identifier_tFySay06MapboxB08WaypointCGSg_SayAI0G0CGSgSo7NSErrorCSgtcfU_ + 6008\r\n\t8   Voyage                              0x0000000101f1874e _T06Voyage31DirectionsPreviewViewControllerC26calculateRouteAndUpdateMap33_A08FD54413D51CEC9931375EB0B787F0LLySC29MBDirectionsProfileIdentifierV10identifier_tFySay06MapboxB08WaypointCGSg_SayAI0G0CGSgSo7NSErrorCSgtcfU_TA + 126\r\n\t9   MapboxDirections                    0x0000000102a83019 _T016MapboxDirections0B0C9calculateSo18URLSessionDataTaskCAA12RouteOptionsC_ySayAA8WaypointCGSg_SayAA0G0CGSgSo7NSErrorCSgtc17completionHandlertFys10DictionaryVySSypGcfU_ + 1545\r\n\t10  MapboxDirections                    0x0000000102a8318c _T016MapboxDirections0B0C9calculateSo18URLSessionDataTaskCAA12RouteOptionsC_ySayAA8WaypointCGSg_SayAA0G0CGSgSo7NSErrorCSgtc17completionHandlertFys10DictionaryVySSypGcfU_TA + 124\r\n\t11  MapboxDirections                    0x0000000102a88f0e _T016MapboxDirections0B0C8dataTask33_9AB848AFC329A49F8F01862214F64FC2LLSo014URLSessionDataD0C10Foundation3URLV4with_ys10DictionaryVySSypGc17completionHandlerySo7NSErrorCc05errorS0tFyAH0M0VSg_So11URLResponseCSgs5Error_pSgtcfU_yycfU0_ + 126\r\n\t12  MapboxDirections                    0x0000000102a8cb4f _T016MapboxDirections0B0C8dataTask33_9AB848AFC329A49F8F01862214F64FC2LLSo014URLSessionDataD0C10Foundation3URLV4with_ys10DictionaryVySSypGc17completionHandlerySo7NSErrorCc05errorS0tFyAH0M0VSg_So11URLResponseCSgs5Error_pSgtcfU_yycfU0_TA + 79\r\n\t13  MapboxDirections                    0x0000000102a88e79 _T0Ix_IyB_TR + 41\r\n\t14  libdispatch.dylib                   0x00000001086d62f7 _dispatch_call_block_and_release + 12\r\n\t15  libdispatch.dylib                   0x00000001086d733d _dispatch_client_callout + 8\r\n\t16  libdispatch.dylib                   0x00000001086e25f9 _dispatch_main_queue_callback_4CF + 628\r\n\t17  CoreFoundation                      0x0000000105f5ae39 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\r\n\t18  CoreFoundation                      0x0000000105f1f462 __CFRunLoopRun + 2402\r\n\t19  CoreFoundation                      0x0000000105f1e889 CFRunLoopRunSpecific + 409\r\n\t20  GraphicsServices                    0x000000010ad459c6 GSEventRunModal + 62\r\n\t21  UIKit                               0x00000001036d35d6 UIApplicationMain + 159\r\n\t22  Voyage                              0x0000000101f49f87 main + 55\r\n\t23  libdyld.dylib                       0x0000000108753d81 start + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n\r\n```\r\n\r\n/cc @1ec5 @anandthakker "}}
{"actor":{"display_login":"jfirebaugh"}}