mapbox-gl 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/.flowconfig +61 -0
  2. package/CHANGELOG.md +2485 -0
  3. package/LICENSE.txt +84 -0
  4. package/README.md +34 -0
  5. package/build/banner.js +4 -0
  6. package/build/check-bundle-size.js +140 -0
  7. package/build/diff-tarball.js +18 -0
  8. package/build/generate-access-token-script.js +11 -0
  9. package/build/generate-flow-typed-style-spec.js +188 -0
  10. package/build/generate-release-list.js +21 -0
  11. package/build/generate-struct-arrays.js +243 -0
  12. package/build/generate-style-code.js +159 -0
  13. package/build/mapbox-gl.js.flow +3 -0
  14. package/build/print-release-url.js +6 -0
  15. package/build/rollup_plugin_minify_style_spec.js +24 -0
  16. package/build/rollup_plugins.js +80 -0
  17. package/build/run-node +3 -0
  18. package/build/run-tap +8 -0
  19. package/build/test/build-tape.js +19 -0
  20. package/dist/mapbox-gl-csp-worker.js +2 -0
  21. package/dist/mapbox-gl-csp-worker.js.map +1 -0
  22. package/dist/mapbox-gl-csp.js +2 -0
  23. package/dist/mapbox-gl-csp.js.map +1 -0
  24. package/dist/mapbox-gl-dev.js +65889 -0
  25. package/dist/mapbox-gl-dev.js.flow +3 -0
  26. package/dist/mapbox-gl-unminified.js +42889 -0
  27. package/dist/mapbox-gl-unminified.js.map +1 -0
  28. package/dist/mapbox-gl.css +1 -0
  29. package/dist/mapbox-gl.js +42 -0
  30. package/dist/mapbox-gl.js.flow +3 -0
  31. package/dist/mapbox-gl.js.map +1 -0
  32. package/dist/style-spec/index.es.js +15032 -0
  33. package/dist/style-spec/index.es.js.map +1 -0
  34. package/dist/style-spec/index.js +15058 -0
  35. package/dist/style-spec/index.js.map +1 -0
  36. package/flow-typed/gl.js +5 -0
  37. package/flow-typed/jsdom.js +18 -0
  38. package/flow-typed/mapbox-gl-supported.js +9 -0
  39. package/flow-typed/mapbox-unitbezier.js +14 -0
  40. package/flow-typed/offscreen-canvas.js +9 -0
  41. package/flow-typed/pbf.js +25 -0
  42. package/flow-typed/point-geometry.js +44 -0
  43. package/flow-typed/potpack.js +12 -0
  44. package/flow-typed/sinon.js +28 -0
  45. package/flow-typed/vector-tile.js +41 -0
  46. package/package.json +173 -0
  47. package/src/css/mapbox-gl.css +812 -0
  48. package/src/css/svg/mapboxgl-ctrl-attrib.svg +3 -0
  49. package/src/css/svg/mapboxgl-ctrl-compass.svg +4 -0
  50. package/src/css/svg/mapboxgl-ctrl-fullscreen.svg +3 -0
  51. package/src/css/svg/mapboxgl-ctrl-geolocate.svg +5 -0
  52. package/src/css/svg/mapboxgl-ctrl-logo.svg +20 -0
  53. package/src/css/svg/mapboxgl-ctrl-shrink.svg +3 -0
  54. package/src/css/svg/mapboxgl-ctrl-zoom-in.svg +3 -0
  55. package/src/css/svg/mapboxgl-ctrl-zoom-out.svg +3 -0
  56. package/src/data/array_types.js +1135 -0
  57. package/src/data/bucket/circle_attributes.js +9 -0
  58. package/src/data/bucket/circle_bucket.js +201 -0
  59. package/src/data/bucket/fill_attributes.js +9 -0
  60. package/src/data/bucket/fill_bucket.js +229 -0
  61. package/src/data/bucket/fill_extrusion_attributes.js +10 -0
  62. package/src/data/bucket/fill_extrusion_bucket.js +283 -0
  63. package/src/data/bucket/heatmap_bucket.js +17 -0
  64. package/src/data/bucket/line_attributes.js +10 -0
  65. package/src/data/bucket/line_attributes_ext.js +10 -0
  66. package/src/data/bucket/line_bucket.js +594 -0
  67. package/src/data/bucket/pattern_attributes.js +12 -0
  68. package/src/data/bucket/pattern_bucket_features.js +60 -0
  69. package/src/data/bucket/symbol_attributes.js +117 -0
  70. package/src/data/bucket/symbol_bucket.js +937 -0
  71. package/src/data/bucket.js +123 -0
  72. package/src/data/dem_data.js +125 -0
  73. package/src/data/evaluation_feature.js +25 -0
  74. package/src/data/extent.js +18 -0
  75. package/src/data/feature_index.js +322 -0
  76. package/src/data/feature_position_map.js +131 -0
  77. package/src/data/index_array_type.js +16 -0
  78. package/src/data/load_geometry.js +46 -0
  79. package/src/data/pos_attributes.js +6 -0
  80. package/src/data/program_configuration.js +708 -0
  81. package/src/data/raster_bounds_attributes.js +7 -0
  82. package/src/data/segment.js +76 -0
  83. package/src/geo/edge_insets.js +102 -0
  84. package/src/geo/lng_lat.js +168 -0
  85. package/src/geo/lng_lat_bounds.js +276 -0
  86. package/src/geo/mercator_coordinate.js +150 -0
  87. package/src/geo/transform.js +834 -0
  88. package/src/gl/color_mode.js +34 -0
  89. package/src/gl/context.js +302 -0
  90. package/src/gl/cull_face_mode.js +26 -0
  91. package/src/gl/depth_mode.js +29 -0
  92. package/src/gl/framebuffer.js +44 -0
  93. package/src/gl/index_buffer.js +55 -0
  94. package/src/gl/stencil_mode.js +30 -0
  95. package/src/gl/types.js +84 -0
  96. package/src/gl/value.js +520 -0
  97. package/src/gl/vertex_buffer.js +119 -0
  98. package/src/index.js +230 -0
  99. package/src/render/draw_background.js +57 -0
  100. package/src/render/draw_circle.js +113 -0
  101. package/src/render/draw_collision_debug.js +172 -0
  102. package/src/render/draw_custom.js +49 -0
  103. package/src/render/draw_debug.js +127 -0
  104. package/src/render/draw_fill.js +124 -0
  105. package/src/render/draw_fill_extrusion.js +95 -0
  106. package/src/render/draw_heatmap.js +133 -0
  107. package/src/render/draw_hillshade.js +107 -0
  108. package/src/render/draw_line.js +125 -0
  109. package/src/render/draw_raster.js +125 -0
  110. package/src/render/draw_symbol.js +392 -0
  111. package/src/render/glyph_atlas.js +71 -0
  112. package/src/render/glyph_manager.js +182 -0
  113. package/src/render/image_atlas.js +149 -0
  114. package/src/render/image_manager.js +306 -0
  115. package/src/render/line_atlas.js +210 -0
  116. package/src/render/painter.js +654 -0
  117. package/src/render/program/background_program.js +103 -0
  118. package/src/render/program/circle_program.js +69 -0
  119. package/src/render/program/clipping_mask_program.js +20 -0
  120. package/src/render/program/collision_program.js +76 -0
  121. package/src/render/program/debug_program.js +35 -0
  122. package/src/render/program/fill_extrusion_program.js +122 -0
  123. package/src/render/program/fill_program.js +126 -0
  124. package/src/render/program/heatmap_program.js +83 -0
  125. package/src/render/program/hillshade_program.js +119 -0
  126. package/src/render/program/line_program.js +211 -0
  127. package/src/render/program/pattern.js +102 -0
  128. package/src/render/program/program_uniforms.js +42 -0
  129. package/src/render/program/raster_program.js +92 -0
  130. package/src/render/program/symbol_program.js +224 -0
  131. package/src/render/program.js +188 -0
  132. package/src/render/texture.js +122 -0
  133. package/src/render/uniform_binding.js +147 -0
  134. package/src/render/vertex_array_object.js +163 -0
  135. package/src/shaders/README.md +42 -0
  136. package/src/shaders/_prelude.fragment.glsl +17 -0
  137. package/src/shaders/_prelude.vertex.glsl +73 -0
  138. package/src/shaders/background.fragment.glsl +10 -0
  139. package/src/shaders/background.vertex.glsl +7 -0
  140. package/src/shaders/background_pattern.fragment.glsl +28 -0
  141. package/src/shaders/background_pattern.vertex.glsl +20 -0
  142. package/src/shaders/circle.fragment.glsl +39 -0
  143. package/src/shaders/circle.vertex.glsl +64 -0
  144. package/src/shaders/clipping_mask.fragment.glsl +3 -0
  145. package/src/shaders/clipping_mask.vertex.glsl +7 -0
  146. package/src/shaders/collision_box.fragment.glsl +21 -0
  147. package/src/shaders/collision_box.vertex.glsl +27 -0
  148. package/src/shaders/collision_circle.fragment.glsl +17 -0
  149. package/src/shaders/collision_circle.vertex.glsl +59 -0
  150. package/src/shaders/debug.fragment.glsl +9 -0
  151. package/src/shaders/debug.vertex.glsl +12 -0
  152. package/src/shaders/encode_attribute.js +17 -0
  153. package/src/shaders/fill.fragment.glsl +13 -0
  154. package/src/shaders/fill.vertex.glsl +13 -0
  155. package/src/shaders/fill_extrusion.fragment.glsl +9 -0
  156. package/src/shaders/fill_extrusion.vertex.glsl +66 -0
  157. package/src/shaders/fill_extrusion_pattern.fragment.glsl +45 -0
  158. package/src/shaders/fill_extrusion_pattern.vertex.glsl +79 -0
  159. package/src/shaders/fill_outline.fragment.glsl +17 -0
  160. package/src/shaders/fill_outline.vertex.glsl +17 -0
  161. package/src/shaders/fill_outline_pattern.fragment.glsl +43 -0
  162. package/src/shaders/fill_outline_pattern.vertex.glsl +44 -0
  163. package/src/shaders/fill_pattern.fragment.glsl +36 -0
  164. package/src/shaders/fill_pattern.vertex.glsl +39 -0
  165. package/src/shaders/heatmap.fragment.glsl +22 -0
  166. package/src/shaders/heatmap.vertex.glsl +54 -0
  167. package/src/shaders/heatmap_texture.fragment.glsl +14 -0
  168. package/src/shaders/heatmap_texture.vertex.glsl +11 -0
  169. package/src/shaders/hillshade.fragment.glsl +52 -0
  170. package/src/shaders/hillshade.vertex.glsl +11 -0
  171. package/src/shaders/hillshade_prepare.fragment.glsl +75 -0
  172. package/src/shaders/hillshade_prepare.vertex.glsl +15 -0
  173. package/src/shaders/index.js +20 -0
  174. package/src/shaders/line.fragment.glsl +30 -0
  175. package/src/shaders/line.vertex.glsl +85 -0
  176. package/src/shaders/line_gradient.fragment.glsl +34 -0
  177. package/src/shaders/line_gradient.vertex.glsl +88 -0
  178. package/src/shaders/line_pattern.fragment.glsl +74 -0
  179. package/src/shaders/line_pattern.vertex.glsl +99 -0
  180. package/src/shaders/line_sdf.fragment.glsl +45 -0
  181. package/src/shaders/line_sdf.vertex.glsl +98 -0
  182. package/src/shaders/raster.fragment.glsl +52 -0
  183. package/src/shaders/raster.vertex.glsl +21 -0
  184. package/src/shaders/shaders.js +185 -0
  185. package/src/shaders/symbol_icon.fragment.glsl +17 -0
  186. package/src/shaders/symbol_icon.vertex.glsl +94 -0
  187. package/src/shaders/symbol_sdf.fragment.glsl +52 -0
  188. package/src/shaders/symbol_sdf.vertex.glsl +115 -0
  189. package/src/shaders/symbol_text_and_icon.fragment.glsl +68 -0
  190. package/src/shaders/symbol_text_and_icon.vertex.glsl +116 -0
  191. package/src/source/canvas_source.js +238 -0
  192. package/src/source/geojson_source.js +370 -0
  193. package/src/source/geojson_worker_source.js +366 -0
  194. package/src/source/geojson_wrapper.js +94 -0
  195. package/src/source/image_source.js +307 -0
  196. package/src/source/load_tilejson.js +39 -0
  197. package/src/source/pixels_to_tile_units.js +21 -0
  198. package/src/source/query_features.js +208 -0
  199. package/src/source/raster_dem_tile_source.js +138 -0
  200. package/src/source/raster_dem_tile_worker_source.js +62 -0
  201. package/src/source/raster_tile_source.js +169 -0
  202. package/src/source/rtl_text_plugin.js +143 -0
  203. package/src/source/source.js +137 -0
  204. package/src/source/source_cache.js +953 -0
  205. package/src/source/source_state.js +159 -0
  206. package/src/source/tile.js +458 -0
  207. package/src/source/tile_bounds.js +38 -0
  208. package/src/source/tile_cache.js +212 -0
  209. package/src/source/tile_id.js +199 -0
  210. package/src/source/vector_tile_source.js +259 -0
  211. package/src/source/vector_tile_worker_source.js +216 -0
  212. package/src/source/video_source.js +203 -0
  213. package/src/source/worker.js +240 -0
  214. package/src/source/worker_source.js +107 -0
  215. package/src/source/worker_tile.js +224 -0
  216. package/src/style/create_style_layer.js +36 -0
  217. package/src/style/evaluation_parameters.js +62 -0
  218. package/src/style/format_section_override.js +56 -0
  219. package/src/style/light.js +130 -0
  220. package/src/style/load_glyph_range.js +38 -0
  221. package/src/style/load_sprite.js +67 -0
  222. package/src/style/parse_glyph_pbf.js +44 -0
  223. package/src/style/pauseable_placement.js +132 -0
  224. package/src/style/properties.js +753 -0
  225. package/src/style/query_utils.js +43 -0
  226. package/src/style/style.js +1374 -0
  227. package/src/style/style_glyph.js +17 -0
  228. package/src/style/style_image.js +137 -0
  229. package/src/style/style_layer/background_style_layer.js +21 -0
  230. package/src/style/style_layer/background_style_layer_properties.js +40 -0
  231. package/src/style/style_layer/circle_style_layer.js +98 -0
  232. package/src/style/style_layer/circle_style_layer_properties.js +63 -0
  233. package/src/style/style_layer/custom_style_layer.js +223 -0
  234. package/src/style/style_layer/fill_extrusion_style_layer.js +224 -0
  235. package/src/style/style_layer/fill_extrusion_style_layer_properties.js +50 -0
  236. package/src/style/style_layer/fill_style_layer.js +67 -0
  237. package/src/style/style_layer/fill_style_layer_properties.js +55 -0
  238. package/src/style/style_layer/heatmap_style_layer.js +73 -0
  239. package/src/style/style_layer/heatmap_style_layer_properties.js +44 -0
  240. package/src/style/style_layer/hillshade_style_layer.js +25 -0
  241. package/src/style/style_layer/hillshade_style_layer_properties.js +46 -0
  242. package/src/style/style_layer/layer_properties.js.ejs +69 -0
  243. package/src/style/style_layer/line_style_layer.js +150 -0
  244. package/src/style/style_layer/line_style_layer_properties.js +71 -0
  245. package/src/style/style_layer/raster_style_layer.js +21 -0
  246. package/src/style/style_layer/raster_style_layer_properties.js +50 -0
  247. package/src/style/style_layer/symbol_style_layer.js +190 -0
  248. package/src/style/style_layer/symbol_style_layer_properties.js +153 -0
  249. package/src/style/style_layer/typed_style_layer.js +17 -0
  250. package/src/style/style_layer.js +283 -0
  251. package/src/style/style_layer_index.js +80 -0
  252. package/src/style/validate_style.js +42 -0
  253. package/src/style/zoom_history.js +44 -0
  254. package/src/style-spec/.eslintrc +5 -0
  255. package/src/style-spec/CHANGELOG.md +468 -0
  256. package/src/style-spec/README.md +59 -0
  257. package/src/style-spec/bin/gl-style-composite +9 -0
  258. package/src/style-spec/bin/gl-style-format +22 -0
  259. package/src/style-spec/bin/gl-style-migrate +9 -0
  260. package/src/style-spec/bin/gl-style-validate +50 -0
  261. package/src/style-spec/composite.js +50 -0
  262. package/src/style-spec/declass.js +42 -0
  263. package/src/style-spec/deref.js +52 -0
  264. package/src/style-spec/diff.js +393 -0
  265. package/src/style-spec/dist/.gitkeep +0 -0
  266. package/src/style-spec/dist/index.es.js +15032 -0
  267. package/src/style-spec/dist/index.es.js.map +1 -0
  268. package/src/style-spec/dist/index.js +15058 -0
  269. package/src/style-spec/dist/index.js.map +1 -0
  270. package/src/style-spec/empty.js +29 -0
  271. package/src/style-spec/error/parsing_error.js +16 -0
  272. package/src/style-spec/error/validation_error.js +18 -0
  273. package/src/style-spec/expression/compound_expression.js +162 -0
  274. package/src/style-spec/expression/definitions/assertion.js +130 -0
  275. package/src/style-spec/expression/definitions/at.js +70 -0
  276. package/src/style-spec/expression/definitions/case.js +85 -0
  277. package/src/style-spec/expression/definitions/coalesce.js +93 -0
  278. package/src/style-spec/expression/definitions/coercion.js +133 -0
  279. package/src/style-spec/expression/definitions/collator.js +78 -0
  280. package/src/style-spec/expression/definitions/comparison.js +184 -0
  281. package/src/style-spec/expression/definitions/format.js +144 -0
  282. package/src/style-spec/expression/definitions/image.js +52 -0
  283. package/src/style-spec/expression/definitions/in.js +72 -0
  284. package/src/style-spec/expression/definitions/index.js +565 -0
  285. package/src/style-spec/expression/definitions/index_of.js +89 -0
  286. package/src/style-spec/expression/definitions/interpolate.js +267 -0
  287. package/src/style-spec/expression/definitions/length.js +61 -0
  288. package/src/style-spec/expression/definitions/let.js +72 -0
  289. package/src/style-spec/expression/definitions/literal.js +77 -0
  290. package/src/style-spec/expression/definitions/match.js +158 -0
  291. package/src/style-spec/expression/definitions/number_format.js +142 -0
  292. package/src/style-spec/expression/definitions/slice.js +86 -0
  293. package/src/style-spec/expression/definitions/step.js +120 -0
  294. package/src/style-spec/expression/definitions/var.js +46 -0
  295. package/src/style-spec/expression/definitions/within.js +342 -0
  296. package/src/style-spec/expression/evaluation_context.js +59 -0
  297. package/src/style-spec/expression/expression.js +27 -0
  298. package/src/style-spec/expression/index.js +392 -0
  299. package/src/style-spec/expression/is_constant.js +59 -0
  300. package/src/style-spec/expression/parsing_context.js +233 -0
  301. package/src/style-spec/expression/parsing_error.js +13 -0
  302. package/src/style-spec/expression/runtime_error.js +17 -0
  303. package/src/style-spec/expression/scope.js +36 -0
  304. package/src/style-spec/expression/stops.js +39 -0
  305. package/src/style-spec/expression/types/collator.js +61 -0
  306. package/src/style-spec/expression/types/formatted.js +73 -0
  307. package/src/style-spec/expression/types/resolved_image.js +29 -0
  308. package/src/style-spec/expression/types.js +126 -0
  309. package/src/style-spec/expression/values.js +123 -0
  310. package/src/style-spec/feature_filter/README.md +55 -0
  311. package/src/style-spec/feature_filter/convert.js +208 -0
  312. package/src/style-spec/feature_filter/index.js +175 -0
  313. package/src/style-spec/format.js +51 -0
  314. package/src/style-spec/function/convert.js +270 -0
  315. package/src/style-spec/function/index.js +262 -0
  316. package/src/style-spec/group_by_layout.js +75 -0
  317. package/src/style-spec/migrate/expressions.js +39 -0
  318. package/src/style-spec/migrate/v8.js +203 -0
  319. package/src/style-spec/migrate/v9.js +26 -0
  320. package/src/style-spec/migrate.js +36 -0
  321. package/src/style-spec/package.json +41 -0
  322. package/src/style-spec/read_style.js +14 -0
  323. package/src/style-spec/reference/latest.js +3 -0
  324. package/src/style-spec/reference/v8.json +5914 -0
  325. package/src/style-spec/rollup.config.js +65 -0
  326. package/src/style-spec/style-spec.js +124 -0
  327. package/src/style-spec/types.js +432 -0
  328. package/src/style-spec/util/color.js +95 -0
  329. package/src/style-spec/util/color_spaces.js +139 -0
  330. package/src/style-spec/util/deep_equal.js +28 -0
  331. package/src/style-spec/util/extend.js +10 -0
  332. package/src/style-spec/util/get_type.js +17 -0
  333. package/src/style-spec/util/interpolate.js +22 -0
  334. package/src/style-spec/util/properties.js +15 -0
  335. package/src/style-spec/util/ref_properties.js +2 -0
  336. package/src/style-spec/util/result.js +19 -0
  337. package/src/style-spec/util/unbundle_jsonlint.js +24 -0
  338. package/src/style-spec/validate/latest.js +11 -0
  339. package/src/style-spec/validate/validate.js +75 -0
  340. package/src/style-spec/validate/validate_array.js +52 -0
  341. package/src/style-spec/validate/validate_boolean.js +15 -0
  342. package/src/style-spec/validate/validate_color.js +20 -0
  343. package/src/style-spec/validate/validate_constants.js +13 -0
  344. package/src/style-spec/validate/validate_enum.js +21 -0
  345. package/src/style-spec/validate/validate_expression.js +43 -0
  346. package/src/style-spec/validate/validate_filter.js +117 -0
  347. package/src/style-spec/validate/validate_formatted.js +11 -0
  348. package/src/style-spec/validate/validate_function.js +207 -0
  349. package/src/style-spec/validate/validate_glyphs_url.js +21 -0
  350. package/src/style-spec/validate/validate_image.js +11 -0
  351. package/src/style-spec/validate/validate_layer.js +134 -0
  352. package/src/style-spec/validate/validate_layout_property.js +6 -0
  353. package/src/style-spec/validate/validate_light.js +47 -0
  354. package/src/style-spec/validate/validate_number.js +29 -0
  355. package/src/style-spec/validate/validate_object.js +61 -0
  356. package/src/style-spec/validate/validate_paint_property.js +6 -0
  357. package/src/style-spec/validate/validate_property.js +64 -0
  358. package/src/style-spec/validate/validate_source.js +111 -0
  359. package/src/style-spec/validate/validate_string.js +15 -0
  360. package/src/style-spec/validate_mapbox_api_supported.js +171 -0
  361. package/src/style-spec/validate_style.js +39 -0
  362. package/src/style-spec/validate_style.min.js +78 -0
  363. package/src/style-spec/visit.js +77 -0
  364. package/src/symbol/anchor.js +26 -0
  365. package/src/symbol/check_max_angle.js +81 -0
  366. package/src/symbol/clip_line.js +71 -0
  367. package/src/symbol/collision_feature.js +109 -0
  368. package/src/symbol/collision_index.js +373 -0
  369. package/src/symbol/cross_tile_symbol_index.js +301 -0
  370. package/src/symbol/get_anchors.js +167 -0
  371. package/src/symbol/grid_index.js +335 -0
  372. package/src/symbol/mergelines.js +82 -0
  373. package/src/symbol/one_em.js +4 -0
  374. package/src/symbol/opacity_state.js +27 -0
  375. package/src/symbol/path_interpolator.js +61 -0
  376. package/src/symbol/placement.js +1124 -0
  377. package/src/symbol/projection.js +451 -0
  378. package/src/symbol/quads.js +334 -0
  379. package/src/symbol/shaping.js +816 -0
  380. package/src/symbol/symbol_layout.js +796 -0
  381. package/src/symbol/symbol_size.js +113 -0
  382. package/src/symbol/transform_text.js +29 -0
  383. package/src/types/callback.js +17 -0
  384. package/src/types/cancelable.js +3 -0
  385. package/src/types/tilejson.js +17 -0
  386. package/src/types/transferable.js +3 -0
  387. package/src/types/window.js +172 -0
  388. package/src/ui/anchor.js +32 -0
  389. package/src/ui/camera.js +1277 -0
  390. package/src/ui/control/attribution_control.js +212 -0
  391. package/src/ui/control/fullscreen_control.js +147 -0
  392. package/src/ui/control/geolocate_control.js +707 -0
  393. package/src/ui/control/logo_control.js +92 -0
  394. package/src/ui/control/navigation_control.js +257 -0
  395. package/src/ui/control/scale_control.js +142 -0
  396. package/src/ui/default_locale.js +22 -0
  397. package/src/ui/events.js +1301 -0
  398. package/src/ui/handler/box_zoom.js +170 -0
  399. package/src/ui/handler/click_zoom.js +52 -0
  400. package/src/ui/handler/handler_util.js +12 -0
  401. package/src/ui/handler/keyboard.js +208 -0
  402. package/src/ui/handler/map_event.js +156 -0
  403. package/src/ui/handler/mouse.js +171 -0
  404. package/src/ui/handler/scroll_zoom.js +350 -0
  405. package/src/ui/handler/shim/dblclick_zoom.js +62 -0
  406. package/src/ui/handler/shim/drag_pan.js +88 -0
  407. package/src/ui/handler/shim/drag_rotate.js +67 -0
  408. package/src/ui/handler/shim/touch_zoom_rotate.js +108 -0
  409. package/src/ui/handler/tap_drag_zoom.js +103 -0
  410. package/src/ui/handler/tap_recognizer.js +133 -0
  411. package/src/ui/handler/tap_zoom.js +93 -0
  412. package/src/ui/handler/touch_pan.js +101 -0
  413. package/src/ui/handler/touch_zoom_rotate.js +305 -0
  414. package/src/ui/handler_inertia.js +158 -0
  415. package/src/ui/handler_manager.js +531 -0
  416. package/src/ui/hash.js +148 -0
  417. package/src/ui/map.js +2874 -0
  418. package/src/ui/marker.js +672 -0
  419. package/src/ui/popup.js +640 -0
  420. package/src/util/actor.js +212 -0
  421. package/src/util/ajax.js +388 -0
  422. package/src/util/browser/web_worker.js +10 -0
  423. package/src/util/browser/window.js +6 -0
  424. package/src/util/browser.js +70 -0
  425. package/src/util/classify_rings.js +52 -0
  426. package/src/util/color_ramp.js +61 -0
  427. package/src/util/config.js +30 -0
  428. package/src/util/debug.js +28 -0
  429. package/src/util/dictionary_coder.js +30 -0
  430. package/src/util/dispatcher.js +70 -0
  431. package/src/util/dom.js +142 -0
  432. package/src/util/evented.js +174 -0
  433. package/src/util/find_pole_of_inaccessibility.js +129 -0
  434. package/src/util/global_worker_pool.js +35 -0
  435. package/src/util/image.js +142 -0
  436. package/src/util/intersection_tests.js +208 -0
  437. package/src/util/is_char_in_unicode_block.js +311 -0
  438. package/src/util/mapbox.js +491 -0
  439. package/src/util/offscreen_canvas_supported.js +14 -0
  440. package/src/util/performance.js +112 -0
  441. package/src/util/primitives.js +145 -0
  442. package/src/util/resolve_tokens.js +16 -0
  443. package/src/util/script_detection.js +328 -0
  444. package/src/util/sku_token.js +42 -0
  445. package/src/util/smart_wrap.js +55 -0
  446. package/src/util/struct_array.js +243 -0
  447. package/src/util/struct_array.js.ejs +112 -0
  448. package/src/util/struct_array_layout.js.ejs +98 -0
  449. package/src/util/task_queue.js +68 -0
  450. package/src/util/throttle.js +27 -0
  451. package/src/util/throttled_invoker.js +46 -0
  452. package/src/util/tile_request_cache.js +172 -0
  453. package/src/util/util.js +524 -0
  454. package/src/util/vectortile_to_geojson.js +50 -0
  455. package/src/util/verticalize_punctuation.js +114 -0
  456. package/src/util/web_worker.js +91 -0
  457. package/src/util/web_worker_transfer.js +266 -0
  458. package/src/util/webp_supported.js +69 -0
  459. package/src/util/window.js +102 -0
  460. package/src/util/worker_pool.js +57 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,2485 @@
1
+ ## 1.13.2
2
+
3
+ ### 🐞 Bug fixes
4
+
5
+ * Fix an iOS 15 issue where the iOS Safari tab bar interrupts touch interactions. ([#11084](https://github.com/mapbox/mapbox-gl-js/pull/11084))
6
+
7
+ ## 1.13.1
8
+
9
+ ### 🐞 Bug fixes
10
+ - Fix ImageSource not working in some cases in Firefox & Safari. [#10230](https://github.com/mapbox/mapbox-gl-js/pull/10230)
11
+
12
+ ## 1.13.0
13
+
14
+ ### ✨ Features and improvements
15
+
16
+ - Improve accessibility by fixing issues reported by WCAG 2.1. [#9991](https://github.com/mapbox/mapbox-gl-js/pull/9991)
17
+ - Improve accessibility when opening a popup by immediately focusing on the content. [#9774](https://github.com/mapbox/mapbox-gl-js/pull/9774) (h/t @watofundefined)
18
+ - Improve rendering performance of symbols with `symbol-sort-key`. [#9751](https://github.com/mapbox/mapbox-gl-js/pull/9751) (h/t @osvodef)
19
+ - Add `Marker` `clickTolerance` option. [#9640](https://github.com/mapbox/mapbox-gl-js/pull/9640) (h/t @ChristopherChudzicki)
20
+ - Add `Map` `hasControl` method. [#10035](https://github.com/mapbox/mapbox-gl-js/pull/10035)
21
+ - Add `Popup` `setOffset` method. [#9946](https://github.com/mapbox/mapbox-gl-js/pull/9946) (h/t @jutaz)
22
+ - Add `KeyboardHandler` `disableRotation` and `enableRotation` methods. [#10072](https://github.com/mapbox/mapbox-gl-js/pull/10072) (h/t @jmbott)
23
+
24
+ ### 🐞 Bug fixes
25
+
26
+ - Fix a bug where `queryRenderedFeatures` didn't properly expose the paint values if they were data-driven. [#10074](https://github.com/mapbox/mapbox-gl-js/pull/10074) (h/t @osvodef)
27
+ - Fix a bug where attribution didn't update when layer visibility changed during zooming. [#9943](https://github.com/mapbox/mapbox-gl-js/pull/9943)
28
+ - Fix a bug where hash control conflicted with external history manipulation (e.g. in single-page apps). [#9960](https://github.com/mapbox/mapbox-gl-js/pull/9960) (h/t @raegen)
29
+ - Fix a bug where `fitBounds` had an unexpected result with non-zero bearing and uneven padding. [#9821](https://github.com/mapbox/mapbox-gl-js/pull/9821) (h/t @allison-strandberg)
30
+ - Fix HTTP support when running GL JS against [Mapbox Atlas](https://www.mapbox.com/atlas). [#10090](https://github.com/mapbox/mapbox-gl-js/pull/10090)
31
+ - Fix a bug where the `within` expression didn't work in `querySourceFeatures`. [#9933](https://github.com/mapbox/mapbox-gl-js/pull/9933)
32
+ - Fix a bug where `Popup` content HTML element was removed on `setDOMContent`. [#10036](https://github.com/mapbox/mapbox-gl-js/pull/10036)
33
+ - Fix a compatibility bug when `icon-image` is used as a legacy categorical function. [#10060](https://github.com/mapbox/mapbox-gl-js/pull/10060)
34
+ - Reduce rapid memory growth in Safari by ensuring `Image` dataURI's are released. [#10118](https://github.com/mapbox/mapbox-gl-js/pull/10118)
35
+
36
+ ### ⚠️ Note on IE11
37
+
38
+ We intend to remove support for Internet Explorer 11 in a future release of GL JS later this year.
39
+
40
+ ## 1.12.0
41
+
42
+ ### ✨ Features and improvements
43
+
44
+ * Add methods for changing a vector tile source dynamically (e.g. `setTiles`, `setUrl`). [#8048](https://github.com/mapbox/mapbox-gl-js/pull/8048) (h/t [@stepankuzmin](https://github.com/stepankuzmin))
45
+ * Add a `filter` option for GeoJSON sources to filter out features prior to processing (e.g. before clustering). [#9864](https://github.com/mapbox/mapbox-gl-js/pull/9864)
46
+ * Vastly increase precision of `line-gradient` for long lines. [#9694](https://github.com/mapbox/mapbox-gl-js/pull/9694)
47
+ * Improve `raster-dem` sources to properly support the `maxzoom` option and overzooming. [#9789](https://github.com/mapbox/mapbox-gl-js/pull/9789) (h/t [@brendan-ward](@brendanhttps://github.com/ward))
48
+
49
+ ### 🐞 Bug fixes
50
+
51
+ * Fix a bug where bearing snap interfered with `easeTo` and `flyTo` animations, freezing the map. [#9884](https://github.com/mapbox/mapbox-gl-js/pull/9884) (h/t [@andycalder](https://github.com/andycalder))
52
+ * Fix a bug where a fallback image was not used if it was added via `addImage`. [#9911](https://github.com/mapbox/mapbox-gl-js/pull/9911) (h/t [@francois2metz](https://github.com/francois2metz))
53
+ * Fix a bug where `promoteId` option failed for fill extrusions with defined feature ids. [#9863](https://github.com/mapbox/mapbox-gl-js/pull/9863)
54
+
55
+ ### 🛠️ Workflow
56
+
57
+ * Renamed the default development branch from `master` to `main`.
58
+
59
+ ## 1.11.1
60
+
61
+ ### 🐞 Bug fixes
62
+ * Fix a bug that caused `map.loaded()` to incorrectly return `false` after a click event. ([#9825](https://github.com/mapbox/mapbox-gl-js/pull/9825))
63
+
64
+ ## 1.11.0
65
+
66
+ ### ✨ Features and improvements
67
+ * Add an option to scale the default `Marker` icon.([#9414](https://github.com/mapbox/mapbox-gl-js/pull/9414)) (h/t [adrianababakanian](https://github.com/adrianababakanian))
68
+ * Improving the shader compilation speed by manually getting the run-time attributes and uniforms.([#9497](https://github.com/mapbox/mapbox-gl-js/pull/9497))
69
+ * Added `clusterMinPoints` option for clustered GeoJSON sources that defines the minimum number of points to form a cluster.([#9748](https://github.com/mapbox/mapbox-gl-js/pull/9748))
70
+
71
+ ### 🐞 Bug fixes
72
+ * Fix a bug where map got stuck in a DragRotate interaction if it's mouseup occurred outside of the browser window or iframe.([#9512](https://github.com/mapbox/mapbox-gl-js/pull/9512))
73
+ * Fix potential visual regression for `*-pattern` properties on AMD graphics card vendor.([#9681](https://github.com/mapbox/mapbox-gl-js/pull/9681))
74
+ * Fix zooming with a double tap on iOS Safari 13.([#9757](https://github.com/mapbox/mapbox-gl-js/pull/9757))
75
+ * Removed a misleading `geometry exceeds allowed extent` warning when using Mapbox Streets vector tiles.([#9753](https://github.com/mapbox/mapbox-gl-js/pull/9753))
76
+ * Fix reference error when requiring the browser bundle in Node. ([#9749](https://github.com/mapbox/mapbox-gl-js/pull/9749))
77
+
78
+ ## 1.10.2
79
+
80
+ ### 🐞 Bug fixes
81
+ * Fix zooming with a double tap in iOS Safari 13.([#9757](https://github.com/mapbox/mapbox-gl-js/pull/9757))
82
+
83
+ ## 1.10.1
84
+
85
+ ### 🐞 Bug fixes
86
+ * Fix markers interrupting touch gestures ([#9675](https://github.com/mapbox/mapbox-gl-js/issues/9675), fixed by [#9683](https://github.com/mapbox/mapbox-gl-js/pull/9683))
87
+ * Fix bug where `map.isMoving()` returned true while map was not moving ([#9647](https://github.com/mapbox/mapbox-gl-js/issues/9647), fixed by [#9679](https://github.com/mapbox/mapbox-gl-js/pull/9679))
88
+ * Fix regression that prevented `touchmove` events from firing during gestures ([#9676](https://github.com/mapbox/mapbox-gl-js/issues/9676), fixed by [#9685](https://github.com/mapbox/mapbox-gl-js/pull/9685))
89
+ * Fix `image` expression evaluation which was broken under certain conditions ([#9630](https://github.com/mapbox/mapbox-gl-js/issues/9630), fixed by [#9685](https://github.com/mapbox/mapbox-gl-js/pull/9668))
90
+ * Fix nested `within` expressions in filters not evaluating correctly ([#9605](https://github.com/mapbox/mapbox-gl-js/issues/9605), fixed by [#9611](https://github.com/mapbox/mapbox-gl-js/pull/9611))
91
+ * Fix potential `undefined` paint variable in `StyleLayer` ([#9688](https://github.com/mapbox/mapbox-gl-js/pull/9688)) (h/t [mannnick24](https://github.com/mannnick24))
92
+
93
+ ## 1.10.0
94
+
95
+ ### ✨ Features
96
+ * Add `mapboxgl.prewarm()` and `mapboxgl.clearPrewarmedResources()` methods to allow developers to optimize load times for their maps ([#9391](https://github.com/mapbox/mapbox-gl-js/pull/9391))
97
+ * Add `index-of` and `slice` expressions to search arrays and strings for the first occurrence of a specified value and return a section of the original array or string ([#9450](https://github.com/mapbox/mapbox-gl-js/pull/9450)) (h/t [lbutler](https://github.com/lbutler))
98
+ * Correctly set RTL text plugin status if the plugin URL could not be loaded. This allows developers to add retry logic on network errors when loading the plugin ([#9489](https://github.com/mapbox/mapbox-gl-js/pull/9489))
99
+
100
+ ### 🍏 Gestures
101
+ This release significantly refactors and improves gesture handling on desktop and mobile. Three new touch gestures have been added: `two-finger swipe` to adjust pitch, `two-finger double tap` to zoom out, and `tap then drag` to adjust zoom with one finger ([#9365](https://github.com/mapbox/mapbox-gl-js/pull/9365)). In addition, this release brings the following changes and bug fixes:
102
+
103
+ - It's now possible to interact with multiple maps on the same page at the same time ([#9365](https://github.com/mapbox/mapbox-gl-js/pull/9365))
104
+ - Fix map jump when releasing one finger after pinch zoom ([#9136](https://github.com/mapbox/mapbox-gl-js/issues/9136))
105
+ - Stop mousedown and touchstart from interrupting `easeTo` animations when interaction handlers are disabled ([#8725](https://github.com/mapbox/mapbox-gl-js/issues/8725))
106
+ - Stop mouse wheel from interrupting animations when `map.scrollZoom` is disabled ([#9230](https://github.com/mapbox/mapbox-gl-js/issues/9230))
107
+ - A camera change can no longer be prevented by disabling the interaction handler within the camera change event. Selectively prevent camera changes by listening to the `mousedown` or `touchstart` map event and calling [.preventDefault()](https://docs.mapbox.com/mapbox-gl-js/api/#mapmouseevent#preventdefault) ([#9365](https://github.com/mapbox/mapbox-gl-js/pull/9365))
108
+ - Undocumented properties on the camera change events fired by the doubleClickZoom handler have been removed ([#9365](https://github.com/mapbox/mapbox-gl-js/pull/9365))
109
+
110
+ ### 🐞 Improvements and bug fixes
111
+ * Line labels now have improved collision detection, with greater precision in placement, reduced memory footprint, better placement under pitched camera orientations ([#9219](https://github.com/mapbox/mapbox-gl-js/pull/9219))
112
+ * Fix `GlyphManager` continually re-requesting missing glyph ranges ([#8027](https://github.com/mapbox/mapbox-gl-js/issues/8027), fixed by [#9375](https://github.com/mapbox/mapbox-gl-js/pull/9375)) (h/t [oterral](https://github.com/oterral))
113
+ * Avoid throwing errors when calling certain popup methods before the popup element is created ([#9433](https://github.com/mapbox/mapbox-gl-js/pull/9433))
114
+ * Fix a bug where fill-extrusion features with colinear points were not returned by `map.queryRenderedFeatures(...)` ([#9454](https://github.com/mapbox/mapbox-gl-js/pull/9454))
115
+ * Fix a bug where using feature state on a large input could cause a stack overflow error ([#9463](https://github.com/mapbox/mapbox-gl-js/pull/9463))
116
+ * Fix exception when using `background-pattern` with data driven expressions ([#9518](https://github.com/mapbox/mapbox-gl-js/issues/9518), fixed by [#9520](https://github.com/mapbox/mapbox-gl-js/pull/9520))
117
+ * Fix a bug where UI popups were potentially leaking event listeners ([#9498](https://github.com/mapbox/mapbox-gl-js/pull/9498)) (h/t [mbell697](https://github.com/mbell697))
118
+ * Fix a bug where the `within` expression would return inconsistent values for points on tile boundaries ([#9411](https://github.com/mapbox/mapbox-gl-js/issues/9411), [#9428](https://github.com/mapbox/mapbox-gl-js/pull/9428))
119
+ * Fix a bug where the `within` expression would incorrectly evaluate geometries that cross the antimeridian ([#9440](https://github.com/mapbox/mapbox-gl-js/pull/9440))
120
+ * Fix possible undefined exception on paint variable of style layer ([#9437](https://github.com/mapbox/mapbox-gl-js/pull/9437)) (h/t [mannnick24](https://github.com/mannnick24))
121
+ * Upgrade minimist to ^1.2.5 to get fix for security issue [CVE-2020-7598](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7598) upstream ([#9425](https://github.com/mapbox/mapbox-gl-js/issues/9431), fixed by [#9425](https://github.com/mapbox/mapbox-gl-js/pull/9425)) (h/t [watson](https://github.com/watson))
122
+
123
+ ## 1.9.1
124
+
125
+ ### 🐞 Bug fixes
126
+ * Fix a bug [#9477](https://github.com/mapbox/mapbox-gl-js/issues/9477) in `Map#fitBounds(..)` wherein the `padding` passed to options would get applied twice.
127
+ * Fix rendering bug [#9479](https://github.com/mapbox/mapbox-gl-js/issues/9479) caused when data-driven `*-pattern` properties reference images added with `Map#addImage(..)`.
128
+ * Fix a bug [#9468](https://github.com/mapbox/mapbox-gl-js/issues/9468) in which an exception would get thrown when updating symbol layer paint property using `setPaintProperty`.
129
+
130
+ ## 1.9.0
131
+ With this release, we're adding [a new changelog policy](./CONTRIBUTING.md#changelog-conventions) to our contribution guidelines.
132
+
133
+ This release also fixes several long-standing bugs and unintentional rendering behavior with `line-pattern`. The fixes come with a visual change to how patterns added with `line-pattern` scale. Previously, patterns that became larger than the line would be clipped, sometimes distorting the pattern, particularly on mobile and retina devices. Now the pattern will be scaled to fit under all circumstances. [#9266](https://github.com/mapbox/mapbox-gl-js/pull/9266) showcases examples of the visual differences. For more information and to provide feedback on this change, see [#9394](https://github.com/mapbox/mapbox-gl-js/pull/9394).
134
+
135
+ ### ✨ Features
136
+ * Add `within` expression for testing whether an evaluated feature lies within a given GeoJSON object ([#9352](https://github.com/mapbox/mapbox-gl-js/pull/9352)).
137
+ - We are aware of an edge case in which points with wrapped coordinates (e.g. longitude -185) are not evaluated properly. See ([#9442](https://github.com/mapbox/mapbox-gl-js/issues/9442)) for more information.
138
+ - An example of the `within` expression:<br>
139
+ `"icon-opacity": ["case", ["==", ["within", "some-polygon"], true], 1,
140
+ ["==", ["within", "some-polygon"], false], 0]`
141
+ * Map API functions such as `easeTo` and `flyTo` now support `padding: PaddingOptions` which lets developers shift a map's center of perspective when building floating sidebars ([#8638](https://github.com/mapbox/mapbox-gl-js/pull/8638))
142
+
143
+ ### 🍏 Improvements
144
+ * Results from `queryRenderedFeatures` now have evaluated property values rather than raw expressions ([#9198](https://github.com/mapbox/mapbox-gl-js/pull/9198))
145
+ * Improve scaling of patterns used in `line-pattern` on all device resolutions and pixel ratios ([#9266](https://github.com/mapbox/mapbox-gl-js/pull/9266))
146
+ * Slightly improve GPU memory footprint ([#9377](https://github.com/mapbox/mapbox-gl-js/pull/9377))
147
+ * `LngLatBounds.extend` is more flexible because it now accepts objects with `lat` and `lon` properties as well as arrays of coordinates ([#9293](https://github.com/mapbox/mapbox-gl-js/pull/9293))
148
+ * Reduce bundle size and improve visual quality of `showTileBoundaries` debug text ([#9267](https://github.com/mapbox/mapbox-gl-js/pull/9267))
149
+
150
+ ### 🐞 Bug fixes
151
+ * Correctly adjust patterns added with `addImage(id, image, pixelRatio)` by the asset pixel ratio, not the device pixel ratio ([#9372](https://github.com/mapbox/mapbox-gl-js/pull/9372))
152
+ * Allow needle argument to `in` expression to be false ([#9295](https://github.com/mapbox/mapbox-gl-js/pull/9295))
153
+ * Fix exception thrown when trying to set `feature-state` for a layer that has been removed, fixes [#8634](https://github.com/mapbox/mapbox-gl-js/issues/8634) ([#9305](https://github.com/mapbox/mapbox-gl-js/pull/9305))
154
+ * Fix a bug where maps were not displaying inside elements with `dir=rtl` ([#9332](https://github.com/mapbox/mapbox-gl-js/pull/9332))
155
+ * Fix a rendering error for very old versions of Chrome (ca. 2016) where text would appear much bigger than intended ([#9349](https://github.com/mapbox/mapbox-gl-js/pull/9349))
156
+ * Prevent exception resulting from `line-dash-array` of empty length ([#9385](https://github.com/mapbox/mapbox-gl-js/pull/9385))
157
+ * Fix a bug where `icon-image` expression that evaluates to an empty string (`''`) produced a warning ([#9380](https://github.com/mapbox/mapbox-gl-js/pull/9380))
158
+ * Fix a bug where certain `popup` methods threw errors when accessing the container element before it was created, fixes [#9429](https://github.com/mapbox/mapbox-gl-js/issues/9429)([#9433](https://github.com/mapbox/mapbox-gl-js/pull/9433))
159
+
160
+ ## 1.8.1
161
+
162
+ * Fixed a bug where all labels showed up on a diagonal line on Windows when using an integrated Intel GPU from the Haswell generation ([#9327](https://github.com/mapbox/mapbox-gl-js/issues/9327), fixed by reverting [#9229](https://github.com/mapbox/mapbox-gl-js/pull/9229))
163
+
164
+ ## 1.8.0
165
+
166
+ ### ✨ Features and improvements
167
+ * Reduce size of line atlas by removing unused channels ([#9232](https://github.com/mapbox/mapbox-gl-js/pull/9232))
168
+ * Prevent empty buffers from being created for debug data when unused ([#9237](https://github.com/mapbox/mapbox-gl-js/pull/9237))
169
+ * Add space between distance and unit in scale control ([#9276](https://github.com/mapbox/mapbox-gl-js/pull/9276)) (h/t [gely](https://api.github.com/users/gely)) and ([#9284](https://github.com/mapbox/mapbox-gl-js/pull/9284)) (h/t [pakastin](https://api.github.com/users/pakastin))
170
+ * Add a `showAccuracyCircle` option to GeolocateControl that shows the accuracy of the user's location as a transparent circle. Mapbox GL JS will show this circle by default. ([#9253](https://github.com/mapbox/mapbox-gl-js/pull/9253)) (h/t [Meekohi](https://api.github.com/users/Meekohi))
171
+ * Implemented a new tile coverage algorithm to enable level-of-detail support in a future release ([#8975](https://github.com/mapbox/mapbox-gl-js/pull/8975))
172
+
173
+ ### 🐞 Bug fixes
174
+ * `line-dasharray` is now ignored correctly when `line-pattern` is set ([#9189](https://github.com/mapbox/mapbox-gl-js/pull/9189))
175
+ * Fix line distances breaking gradient across tile boundaries ([#9220](https://github.com/mapbox/mapbox-gl-js/pull/9220))
176
+ * Fix a bug where lines with duplicate endpoints could disappear at zoom 18+ ([#9218](https://github.com/mapbox/mapbox-gl-js/pull/9218))
177
+ * Fix a bug where Ctrl-click to drag rotate the map was disabled if the Alt, Cmd or Windows key is also pressed ([#9203](https://github.com/mapbox/mapbox-gl-js/pull/9203))
178
+ * Pass errors to `getClusterExpansionZoom`, `getClusterChildren`, and `getClusterLeaves` callbacks ([#9251](https://github.com/mapbox/mapbox-gl-js/pull/9251))
179
+ * Fix a rendering performance regression ([#9261](https://github.com/mapbox/mapbox-gl-js/pull/9261))
180
+ * Fix visual artifact for `line-dasharray` ([#9246](https://github.com/mapbox/mapbox-gl-js/pull/9246))
181
+ * Fixed a bug in the GeolocateControl which resulted in an error when `trackUserLocation` was `false` and the control was removed before the Geolocation API had returned a location ([#9291](https://github.com/mapbox/mapbox-gl-js/pull/9291))
182
+ * Fix `promoteId` for line layers ([#9210](https://github.com/mapbox/mapbox-gl-js/pull/9210))
183
+ * Improve accuracy of distance calculations ([#9202](https://github.com/mapbox/mapbox-gl-js/pull/9202)) (h/t [Meekohi](https://api.github.com/users/Meekohi))
184
+
185
+
186
+ ## 1.7.0
187
+
188
+ ### ✨ Features
189
+ * Add `promoteId` option to use a feature property as ID for feature state ([#8987](https://github.com/mapbox/mapbox-gl-js/pull/8987))
190
+ * Add a new constructor option to `mapboxgl.Popup`, `closeOnMove`, that closes the popup when the map's position changes ([#9163](https://github.com/mapbox/mapbox-gl-js/pull/9163))
191
+ * Allow creating a map without a style (an empty one will be created automatically) ( h/t @stepankuzmin ) ([#8924](https://github.com/mapbox/mapbox-gl-js/pull/8924))
192
+ * `map.once()` now allows specifying a layer id as a third parameter making it consistent with `map.on()` ([#8875](https://github.com/mapbox/mapbox-gl-js/pull/8875))
193
+
194
+ ### 🍏 Improvements
195
+ * Improve performance of raster layers on large screens ([#9050](https://github.com/mapbox/mapbox-gl-js/pull/9050))
196
+ * Improve performance for hillshade and raster layers by implementing a progressive enhancement that utilizes `ImageBitmap` and `OffscreenCanvas` ([#8845](https://github.com/mapbox/mapbox-gl-js/pull/8845))
197
+ * Improve performance for raster tile rendering by using the stencil buffer ([#9012](https://github.com/mapbox/mapbox-gl-js/pull/9012))
198
+ * Update `symbol-avoid-edges` documentation to acknowledge the existence of global collision detection ([#9157](https://github.com/mapbox/mapbox-gl-js/pull/9157))
199
+ * Remove reference to `in` function which has been replaced by the `in` expression ([#9102](https://github.com/mapbox/mapbox-gl-js/pull/9102))
200
+
201
+ ### 🐞 Bug Fixes
202
+ * Change the type of tile id key to string to prevent hash collisions ([#8979](https://github.com/mapbox/mapbox-gl-js/pull/8979))
203
+ * Prevent changing bearing via URL hash when rotation is disabled ([#9156](https://github.com/mapbox/mapbox-gl-js/pull/9156))
204
+ * Fix URL hash with no bearing causing map to fail to load ([#9170](https://github.com/mapbox/mapbox-gl-js/pull/9170))
205
+ * Fix bug in `GeolocateControl` where multiple instances of the control on one page may result in the user location not being updated ([#9092](https://github.com/mapbox/mapbox-gl-js/pull/9092))
206
+ * Fix query `fill-extrusions` made from polygons with coincident points and polygons with less than four points ([#9138](https://github.com/mapbox/mapbox-gl-js/pull/9138))
207
+ * Fix bug where `symbol-sort-key` was not used for collisions that crossed tile boundaries ([#9054](https://github.com/mapbox/mapbox-gl-js/pull/9054))
208
+ * Fix bug in `DragRotateHandler._onMouseUp` getting stuck in drag/rotate ([#9137](https://github.com/mapbox/mapbox-gl-js/pull/9137))
209
+ * Fix "Click on Compass" on some mobile devices (add `clickTolerance` to `DragRotateHandler`) ([#9015](https://github.com/mapbox/mapbox-gl-js/pull/9015)) (h/t [Yanonix](https://github.com/Yanonix))
210
+
211
+ ## 1.6.1
212
+
213
+ ### 🐞 Bug Fixes
214
+ * Fix style validation error messages not being displayed ([#9073](https://github.com/mapbox/mapbox-gl-js/pull/9073))
215
+ * Fix deferred loading of rtl-text-plugin not working for labels created from GeoJSON sources ([#9091](https://github.com/mapbox/mapbox-gl-js/pull/9091))
216
+ * Fix RTL text not being rendered with the rtl-text-plugin on pages that don't allow `script-src: blob:` in their CSP.([#9122](https://github.com/mapbox/mapbox-gl-js/pull/9122))
217
+
218
+ ## 1.6.0
219
+
220
+ ### ✨ Features
221
+ * Add ability to insert images into text labels using an `image` expression within a `format` expression: `"text-field": ["format", "Some text", ["image", "my-image"], "some more text"]` ([#8904](https://github.com/mapbox/mapbox-gl-js/pull/8904))
222
+ * Add support for stretchable images (aka nine-part or nine-patch images). Stretchable images can be used with `icon-text-fit` to draw resized images with unstretched corners and borders. ([#8997](https://github.com/mapbox/mapbox-gl-js/pull/8997))
223
+ * Add `in` expression. It can check if a value is in an array (`["in", value, array]`) or a substring is in a string (`["in", substring, string]`) ([#8876](https://github.com/mapbox/mapbox-gl-js/pull/8876))
224
+ * Add `minPitch` and `maxPitch` map options ([#8834](https://github.com/mapbox/mapbox-gl-js/pull/8834))
225
+ * Add `rotation`, `rotationAlignment` and `pitchAlignment` options to markers ([#8836](https://github.com/mapbox/mapbox-gl-js/pull/8836)) (h/t [dburnsii](https://github.com/dburnsii))
226
+ * Add methods to Popup to manipulate container class names ([#8759](https://github.com/mapbox/mapbox-gl-js/pull/8759)) (h/t [Ashot-KR](https://github.com/Ashot-KR))
227
+ * Add configurable inertia settings for panning (h/t @aMoniker) ([#8887](https://github.com/mapbox/mapbox-gl-js/pull/8887))
228
+ * Add ability to localize UI controls ([#8095](https://github.com/mapbox/mapbox-gl-js/pull/8095)) (h/t [dmytro-gokun](https://github.com/dmytro-gokun))
229
+ * Add LatLngBounds.contains() method ([#7512](https://github.com/mapbox/mapbox-gl-js/issues/7512), fixed by [#8200](https://github.com/mapbox/mapbox-gl-js/pull/8200))
230
+ * Add option to load rtl-text-plugin lazily ([#8865](https://github.com/mapbox/mapbox-gl-js/pull/8865))
231
+ * Add `essential` parameter to AnimationOptions that can override `prefers-reduced-motion: reduce` ([#8743](https://github.com/mapbox/mapbox-gl-js/issues/8743), fixed by [#8883](https://github.com/mapbox/mapbox-gl-js/pull/8883))
232
+
233
+ ### 🍏 Improvements
234
+ * Allow rendering full world smaller than 512px. To restore the previous limit call `map.setMinZoom(0)` ([#9028](https://github.com/mapbox/mapbox-gl-js/pull/9028))
235
+ * Add an es modules build for mapbox-gl-style-spec in dist/ ([#8247](https://github.com/mapbox/mapbox-gl-js/pull/8247)) (h/t [ahocevar](https://github.com/ahocevar))
236
+ * Add 'image/webp,*/*' accept header to fetch/ajax image requests when webp supported ([#8262](https://github.com/mapbox/mapbox-gl-js/pull/8262))
237
+ * Improve documentation for setStyle, getStyle, and isStyleLoaded ([#8807](https://github.com/mapbox/mapbox-gl-js/pull/8807))
238
+
239
+ ### 🐞 Bug Fixes
240
+ * Fix map rendering after addImage and removeImage are used to change a used image ([#9016](https://github.com/mapbox/mapbox-gl-js/pull/9016))
241
+ * Fix visibility of controls in High Contrast mode in IE ([#8874](https://github.com/mapbox/mapbox-gl-js/pull/8874))
242
+ * Fix customizable url hash string in IE 11 ([#8990](https://github.com/mapbox/mapbox-gl-js/pull/8990)) (h/t [pakastin](https://github.com/pakastin))
243
+ * Allow expression stops up to zoom 24 instead of 22 ([#8908](https://github.com/mapbox/mapbox-gl-js/pull/8908)) (h/t [nicholas-l](https://github.com/nicholas-l))
244
+ * Fix alignment of lines in really overscaled tiles ([#9024](https://github.com/mapbox/mapbox-gl-js/pull/9024))
245
+ * Fix `Failed to execute 'shaderSource' on 'WebGLRenderingContext'` errors ([#9017](https://github.com/mapbox/mapbox-gl-js/pull/9017))
246
+ * Make expression validation fail on NaN ([#8615](https://github.com/mapbox/mapbox-gl-js/pull/8615))
247
+ * Fix setLayerZoomRange bug that caused tiles to be re-requested ([#7865](https://github.com/mapbox/mapbox-gl-js/issues/7865), fixed by [#8854](https://github.com/mapbox/mapbox-gl-js/pull/8854))
248
+ * Fix `map.showTileBoundaries` rendering ([#7314](https://github.com/mapbox/mapbox-gl-js/pull/7314))
249
+ * Fix using `generateId` in conjunction with `cluster` in a GeoJSONSource ([#8223](https://github.com/mapbox/mapbox-gl-js/issues/8223), fixed by [#8945](https://github.com/mapbox/mapbox-gl-js/pull/8945))
250
+ * Fix opening popup on a marker from keyboard ([#6835](https://github.com/mapbox/mapbox-gl-js/pull/6835))
251
+ * Fix error thrown when request aborted ([#7614](https://github.com/mapbox/mapbox-gl-js/issues/7614), fixed by [#9021](https://github.com/mapbox/mapbox-gl-js/pull/9021))
252
+ * Fix attribution control when repeatedly removing and adding it ([#9052](https://github.com/mapbox/mapbox-gl-js/pull/9052))
253
+
254
+ ## 1.5.1
255
+ This patch introduces two workarounds that address longstanding issues related to unbounded memory growth in Safari, including [#8771](https://github.com/mapbox/mapbox-gl-js/issues/8771) and [#4695](https://github.com/mapbox/mapbox-gl-js/issues/4695). We’ve identified two memory leaks in Safari: one in the [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) API, addressed by [#8956](https://github.com/mapbox/mapbox-gl-js/pull/8956), and one in transferring data between web workers through [Transferables](https://developer.mozilla.org/en-US/docs/Web/API/Transferable), addressed by [#9003](https://github.com/mapbox/mapbox-gl-js/pull/9003).
256
+
257
+ ### 🍏 Improvements
258
+ * Implement workaround for memory leak in Safari when using the `CacheStorage` API. ( [#8856](https://github.com/mapbox/mapbox-gl-js/pull/8956))
259
+ * Implement workaround for memory leak in Safari when using `Transferable` objects to transfer `ArrayBuffers` to WebWorkers. If GL-JS detetcts that it is running in Safari, the use of `Transferables` to transfer data to WebWorkers is disabled. ( [#9003](https://github.com/mapbox/mapbox-gl-js/pull/9003))
260
+ * Improve animation performance when using `map.setData`. ([#8913](https://github.com/mapbox/mapbox-gl-js/pull/8913)) (h/t [msbarry](https://github.com/msbarry))
261
+
262
+ ## 1.5.0
263
+
264
+ ### ✨ Features
265
+ * Add disabled icon to GeolocateControl if user denies geolocation permission. [#8871](https://github.com/mapbox/mapbox-gl-js/pull/8871))
266
+ * Add `outofmaxbounds` event to GeolocateControl, which is emitted when the user is outside of `map.maxBounds` ([#8756](https://github.com/mapbox/mapbox-gl-js/pull/8756)) (h/t [MoradiDavijani](https://github.com/MoradiDavijani))
267
+ * Add `mapboxgl.getRTLTextPluginStatus()` to query the current status of the `rtl-text-plugin` to make it easier to allow clearing the plugin when necessary. (ref. [#7869](https://github.com/mapbox/mapbox-gl-js/issues/7869)) ([#8864](https://github.com/mapbox/mapbox-gl-js/pull/8864))
268
+ * Allow `hash` Map option to be set as a string, which sets the map hash in the url to a custom query parameter. ([#8603](https://github.com/mapbox/mapbox-gl-js/pull/8603)) (h/t [SebCorbin](https://github.com/SebCorbin))
269
+
270
+ ### 🍏 Improvements
271
+ * Fade symbols faster when zooming out quickly, reducing overlap. ([#8628](https://github.com/mapbox/mapbox-gl-js/pull/8628))
272
+ * Reduce memory usage for vector tiles that contain long strings in feature properties. ( [#8863](https://github.com/mapbox/mapbox-gl-js/pull/8863))
273
+
274
+ ### 🐞 Bug Fixes
275
+ * Fix `text-variable-anchor` not trying multiple placements during collision with icons when `icon-text-fit` is enabled. ([#8803](https://github.com/mapbox/mapbox-gl-js/pull/8803))
276
+ * Fix `icon-text-fit` not properly respecting vertical labels. ([#8835](https://github.com/mapbox/mapbox-gl-js/pull/8835))
277
+ * Fix opacity interpolation for composition expressions. ([#8818](https://github.com/mapbox/mapbox-gl-js/pull/8818))
278
+ * Fix rotate and pitch events being fired at the same time. ([#8872](https://github.com/mapbox/mapbox-gl-js/pull/8872))
279
+ * Fix memory leaks that occured during tile loading and map removal.([#8813](https://github.com/mapbox/mapbox-gl-js/pull/8813) and [#8850](https://github.com/mapbox/mapbox-gl-js/pull/8850))
280
+ * Fix web-worker transfer of `ArrayBuffers` in environments where `instanceof ArrayBuffer` fails.(e.g `cypress`) ([#8868](https://github.com/mapbox/mapbox-gl-js/pull/8868))
281
+
282
+ ## 1.4.1
283
+
284
+ ### 🐞 Bug Fixes
285
+ * Fix the way that `coalesce` handles the `image` operator so available images are rendered properly ([#8839](https://github.com/mapbox/mapbox-gl-js/pull/8839))
286
+ * Do not emit the `styleimagemissing` event for an empty string value ([#8840](https://github.com/mapbox/mapbox-gl-js/pull/8840))
287
+ * Fix serialization of `ResolvedImage` type so `*-pattern` properties work properly ([#8833](https://github.com/mapbox/mapbox-gl-js/pull/8833))
288
+
289
+ ## 1.4.0
290
+
291
+ ### ✨ Features
292
+ * Add `image` expression operator to determine image availability ([#8684](https://github.com/mapbox/mapbox-gl-js/pull/8684))
293
+ * Enable `text-offset` with variable label placement ([#8642](https://github.com/mapbox/mapbox-gl-js/pull/8642))
294
+
295
+ ### 🍏 Improvements
296
+ * Faster loading and better look of raster terrain ([#8694](https://github.com/mapbox/mapbox-gl-js/pull/8694))
297
+ * Improved code documentation around resizing and {get/set}RenderedWorldCopies and more ([#8748](https://github.com/mapbox/mapbox-gl-js/pull/8748), [#8754](https://github.com/mapbox/mapbox-gl-js/pull/8754))
298
+ * Improve single vs. multi-touch zoom & pan interaction (#7196) ([#8100](https://github.com/mapbox/mapbox-gl-js/pull/8100))
299
+
300
+ ### 🐞 Bug fixes
301
+ * Fix rendering of `collisionBox` when `text-translate` or `icon-translate` is enabled ([#8659](https://github.com/mapbox/mapbox-gl-js/pull/8659))
302
+ * Fix `TypeError` when reloading a source and immediately removing the map ([#8711](https://github.com/mapbox/mapbox-gl-js/pull/8711))
303
+ * Adding tooltip to the geolocation control button ([#8735](https://github.com/mapbox/mapbox-gl-js/pull/8735)) (h/t [BAByrne](https://github.com/BAByrne))
304
+ * Add `originalEvent` property to NavigationControl events ([#8693](https://github.com/mapbox/mapbox-gl-js/pull/8693)) (h/t [stepankuzmin](https://github.com/stepankuzmin))
305
+ * Don't cancel follow mode in the GeolocateControl when resizing the map or rotating the screen ([#8736](https://github.com/mapbox/mapbox-gl-js/pull/8736))
306
+ * Fix error when calling `Popup#trackPointer` before setting its content or location ([#8757](https://github.com/mapbox/mapbox-gl-js/pull/8757)) (h/t [zxwandrew](https://github.com/zxwandrew))
307
+ * Respect newline characters when text-max-width is set to zero ([#8706](https://github.com/mapbox/mapbox-gl-js/pull/8706))
308
+ * Update earcut to v2.2.0 to fix polygon tesselation errors ([#8772](https://github.com/mapbox/mapbox-gl-js/pull/8772))
309
+ * Fix icon-fit with variable label placement ([#8755](https://github.com/mapbox/mapbox-gl-js/pull/8755))
310
+ * Icons stretched with `icon-text-fit` are now sized correctly ([#8741](https://github.com/mapbox/mapbox-gl-js/pull/8741))
311
+ * Collision detection for icons with `icon-text-fit` now works correctly ([#8741](https://github.com/mapbox/mapbox-gl-js/pull/8741))
312
+
313
+ ## 1.3.2
314
+
315
+ - Fix a SecurityError in Firefox >= 69 when accessing the cache [#8780](https://github.com/mapbox/mapbox-gl-js/pull/8780)
316
+
317
+ ## 1.3.1
318
+
319
+ ### 🐞 Bug Fixes
320
+
321
+ - Fix a race condition that produced an error when a map was removed while reloading a source. [#8711](https://github.com/mapbox/mapbox-gl-js/pull/8711)
322
+ - Fix a race condition were `render` event was sometimes not fired after `load` event in IE11. [#8708](https://github.com/mapbox/mapbox-gl-js/pull/8708)
323
+
324
+ ## 1.3.0
325
+
326
+ ### 🍏 Features
327
+
328
+ - Introduce `text-writing-mode` symbol layer property to allow placing point labels vertically. [#8399](https://github.com/mapbox/mapbox-gl-js/pull/8399)
329
+ - Extend variable text placement to work when `text/icon-allow-overlap` is set to `true`. [#8620](https://github.com/mapbox/mapbox-gl-js/pull/8620)
330
+ - Allow `text-color` to be used in formatted expressions to be able to draw different parts of a label in different colors. [#8068](https://github.com/mapbox/mapbox-gl-js/pull/8068)
331
+
332
+ ### ✨ Improvements
333
+
334
+ - Improve tile loading logic to cancel requests more aggressively, improving performance when zooming or panning quickly. [#8633](https://github.com/mapbox/mapbox-gl-js/pull/8633)
335
+ - Display outline on control buttons when focused (e.g. with a tab key) for better accessibility. [#8520](https://github.com/mapbox/mapbox-gl-js/pull/8520)
336
+ - Improve the shape of line round joins. [#8275](https://github.com/mapbox/mapbox-gl-js/pull/8275)
337
+ - Improve performance of processing line layers. [#8303](https://github.com/mapbox/mapbox-gl-js/pull/8303)
338
+ - Improve legibility of info displayed with `map.showTileBoundaries = true`. [#8380](https://github.com/mapbox/mapbox-gl-js/pull/8380) (h/t [@andrewharvey](https://github.com/andrewharvey))
339
+ - Add `MercatorCoordinate.meterInMercatorCoordinateUnits` method to make it easier to convert from meter units to coordinate values used in custom layers. [#8524](https://github.com/mapbox/mapbox-gl-js/pull/8524) (h/t [@andrewharvey](https://github.com/andrewharvey))
340
+ - Improve conversion of legacy filters with duplicate values. [#8542](https://github.com/mapbox/mapbox-gl-js/pull/8542)
341
+ - Move out documentation & examples website source to a separate `mapbox-gl-js-docs` repo. [#8582](https://github.com/mapbox/mapbox-gl-js/pull/8582)
342
+
343
+ ### 🐞 Bug Fixes
344
+
345
+ - Fix a bug where local CJK fonts would switch to server-generated ones in overzoomed tiles. [#8657](https://github.com/mapbox/mapbox-gl-js/pull/8657)
346
+ - Fix precision issues in [deck.gl](https://deck.gl)-powered custom layers. [#8502](https://github.com/mapbox/mapbox-gl-js/pull/8502)
347
+ - Fix a bug where fill and line layers wouldn't render correctly over fill extrusions when coming from the same source. [#8661](https://github.com/mapbox/mapbox-gl-js/pull/8661)
348
+ - Fix map loading for documents loaded from Blob URLs. [#8612](https://github.com/mapbox/mapbox-gl-js/pull/8612)
349
+ - Fix classification of relative file:// URLs when in documents loaded from a file URL. [#8612](https://github.com/mapbox/mapbox-gl-js/pull/8612)
350
+ - Remove `esm` from package `dependencies` (so that it's not installed on `npm install mapbox-gl`). [#8586](https://github.com/mapbox/mapbox-gl-js/pull/8586) (h/t [@DatGreekChick](https://github.com/DatGreekChick))
351
+
352
+ ## 1.2.1
353
+
354
+ ### 🐞 Bug fixes
355
+
356
+ * Fix bug in `NavigationControl` compass button that prevented it from rotating with the map ([#8605](https://github.com/mapbox/mapbox-gl-js/pull/8605))
357
+
358
+ ## 1.2.0
359
+
360
+ ### Features and improvements
361
+ * Add `*-sort-key` layout property for circle, fill, and line layers, to dictate which features appear above others within a single layer([#8467](https://github.com/mapbox/mapbox-gl-js/pull/8467))
362
+ * Add ability to instantiate maps with specific access tokens ([#8364](https://github.com/mapbox/mapbox-gl-js/pull/8364))
363
+ * Accommodate `prefers-reduced-motion` settings in browser ([#8494](https://github.com/mapbox/mapbox-gl-js/pull/8494))
364
+ * Add Map `visualizePitch` option that tilts the compass as the map pitches ([#8208](https://github.com/mapbox/mapbox-gl-js/issues/8208), fixed by [#8296](https://github.com/mapbox/mapbox-gl-js/pull/8296)) (h/t [pakastin](https://github.com/pakastin))
365
+ * Make source options take precedence over TileJSON ([#8232](https://github.com/mapbox/mapbox-gl-js/pull/8232)) (h/t [jingsam](https://github.com/jingsam))
366
+ * Make requirements for text offset properties more precise ([#8418](https://github.com/mapbox/mapbox-gl-js/pull/8418))
367
+ * Expose `convertFilter` API in the style specification ([#8493](https://github.com/mapbox/mapbox-gl-js/pull/8493)
368
+
369
+ ### Bug fixes
370
+ * Fix changes to `text-variable-anchor`, such that previous anchor positions would take precedence only if they are present in the updated array (considered a bug fix, but is technically a breaking change from previous behavior) ([#8473](https://github.com/mapbox/mapbox-gl-js/pull/8473))
371
+ * Fix rendering of opaque pass layers over heatmap and fill-extrusion layers ([#8440](https://github.com/mapbox/mapbox-gl-js/pull/8440))
372
+ * Fix rendering of extraneous vertical line in vector tiles ([#8477](https://github.com/mapbox/mapbox-gl-js/issues/8477), fixed by [#8479](https://github.com/mapbox/mapbox-gl-js/pull/8479))
373
+ * Turn off 'move' event listeners when removing a marker ([#8465](https://github.com/mapbox/mapbox-gl-js/pull/8465))
374
+ * Fix class toggling on navigation control for IE ([#8495](https://github.com/mapbox/mapbox-gl-js/pull/8495)) (h/t [cs09g](https://github.com/cs09g))
375
+ * Fix background rotation hovering on geolocate control ([#8367](https://github.com/mapbox/mapbox-gl-js/pull/8367)) (h/t [GuillaumeGomez](https://github.com/GuillaumeGomez))
376
+ * Fix error in click events on markers where `startPos` is not defined ([#8462](https://github.com/mapbox/mapbox-gl-js/pull/8462)) (h/t [@msbarry](https://github.com/msbarry))
377
+ * Fix malformed urls when using custom `baseAPIURL` of a certain form ([#8466](https://github.com/mapbox/mapbox-gl-js/pull/8466))
378
+
379
+ ## 1.1.1
380
+
381
+ ### 🐞 Bug fixes
382
+
383
+ * Fix unbounded memory growth caused by failure to cancel requests to the cache ([#8472](https://github.com/mapbox/mapbox-gl-js/pull/8472))
384
+ * Fix unbounded memory growth caused by failure to cancel requests in IE ([#8481](https://github.com/mapbox/mapbox-gl-js/issues/8481))
385
+ * Fix performance of getting tiles from the cache ([#8489](https://github.com/mapbox/mapbox-gl-js/pull/8449))
386
+
387
+ ## 1.1.0
388
+
389
+ ### ✨ Minor features and improvements
390
+ * Improve line rendering performance by using a more compact line attributes layout ([#8306](https://github.com/mapbox/mapbox-gl-js/pull/8306))
391
+ * Improve data-driven symbol layers rendering performance ([#8295](https://github.com/mapbox/mapbox-gl-js/pull/8295))
392
+ * Add the ability to disable validation during `queryRenderedFeatures` and `querySourceFeatures` calls, as a performance optimization ([#8211](https://github.com/mapbox/mapbox-gl-js/pull/8211)) (h/t [gorshkov-leonid](https://github.com/gorshkov-leonid))
393
+ * Improve `setFilter` performance by caching keys in `groupByLayout` routine ([#8122](https://github.com/mapbox/mapbox-gl-js/pull/8122)) (h/t [vallendm](https://github.com/vallendm))
394
+ * Improve rendering of symbol layers with `symbol-z-order: viewport-y`, when icons are allowed to overlap but not text ([#8180](https://github.com/mapbox/mapbox-gl-js/pull/8180))
395
+ * Prefer breaking lines at a zero width space to allow better break point suggestions for Japanese labels ([#8255](https://github.com/mapbox/mapbox-gl-js/pull/8255))
396
+ * Add a `WebGLRenderingContext` argument to `onRemove` function of `CustomLayerInterface`, to allow direct cleanup of related context ([#8156](https://github.com/mapbox/mapbox-gl-js/pull/8156)) (h/t [ogiermaitre](https://github.com/ogiermaitre))
397
+ * Allow zoom speed customization by adding `setZoomRate` and `setWheelZoomRate` methods to `ScrollZoomHandler` ([#7863](https://github.com/mapbox/mapbox-gl-js/pull/7863)) (h/t [sf31](https://github.com/sf31))
398
+ * Add `trackPointer` method to `Popup` API that continuously repositions the popup to the mouse cursor when the cursor is within the map ([#7786](https://github.com/mapbox/mapbox-gl-js/pull/7786))
399
+ * Add `getElement` method to `Popup` to retrieve the popup's HTML element ([#8123](https://github.com/mapbox/mapbox-gl-js/pull/8123)) (h/t [bravecow](https://github.com/bravecow))
400
+ * Add `fill-pattern` example to the documentation ([#8022](https://github.com/mapbox/mapbox-gl-js/pull/8022)) (h/t [flawyte](https://github.com/flawyte))
401
+ * Update script detection for Unicode 12.1 ([#8158](https://github.com/mapbox/mapbox-gl-js/pull/8158))
402
+ * Add `nofollow` to Mapbox logo & "Improve this map" links ([#8106](https://github.com/mapbox/mapbox-gl-js/pull/8106)) (h/t [viniciuskneves](https://github.com/viniciuskneves))
403
+ * Include source name in invalid GeoJSON error ([#8113](https://github.com/mapbox/mapbox-gl-js/pull/8113)) (h/t [Zirak](https://github.com/Zirak))
404
+
405
+ ### 🐞 Bug fixes
406
+ * Fix `updateImage` not working as expected in Chrome ([#8199](https://github.com/mapbox/mapbox-gl-js/pull/8199))
407
+ * Fix issues with double-tap zoom on touch devices ([#8086](https://github.com/mapbox/mapbox-gl-js/pull/8086))
408
+ * Fix duplication of `movestart` events when zooming ([#8259](https://github.com/mapbox/mapbox-gl-js/pull/8259)) (h/t [bambielli-flex](https://github.com/bambielli-flex))
409
+ * Fix validation of ``"format"`` expression failing when options are provided ([#8339](https://github.com/mapbox/mapbox-gl-js/pull/8339))
410
+ * Fix `setPaintProperty` not working on `line-pattern` property ([#8289](https://github.com/mapbox/mapbox-gl-js/pull/8289))
411
+ * Fix the GL context being left in unpredictable states when using custom layers ([#8132](https://github.com/mapbox/mapbox-gl-js/pull/8132))
412
+ * Fix unnecessary updates to attribution control string ([#8082](https://github.com/mapbox/mapbox-gl-js/pull/8082)) (h/t [poletani](https://github.com/poletani))
413
+ * Fix bugs in `findStopLessThanOrEqualTo` algorithm ([#8134](https://github.com/mapbox/mapbox-gl-js/pull/8134)) (h/t [Mike96Angelo](https://github.com/Mike96Angelo))
414
+ * Fix map not displaying properly when inside an element with `text-align: center` ([#8227](https://github.com/mapbox/mapbox-gl-js/pull/8227)) (h/t [mc100s](https://github.com/mc100s))
415
+ * Clarify in documentation that `Popup#maxWidth` accepts all `max-width` CSS values ([#8312](https://github.com/mapbox/mapbox-gl-js/pull/8312)) (h/t [viniciuskneves](https://github.com/viniciuskneves))
416
+ * Fix location dot shadow not displaying ([#8119](https://github.com/mapbox/mapbox-gl-js/pull/8119)) (h/t [bravecow](https://github.com/bravecow))
417
+ * Fix docs dev dependencies being mistakenly installed as package dependencies ([#8121](https://github.com/mapbox/mapbox-gl-js/pull/8121)) (h/t [bravecow](https://github.com/bravecow))
418
+ * Various typo fixes ([#8230](https://github.com/mapbox/mapbox-gl-js/pull/8230), h/t [erictheise](https://github.com/erictheise)) ([#8236](https://github.com/mapbox/mapbox-gl-js/pull/8236), h/t [fredj](https://github.com/fredj))
419
+ * Fix geolocate button CSS ([#8367](https://github.com/mapbox/mapbox-gl-js/pull/8367), h/t [GuillaumeGomez](https://github.com/GuillaumeGomez))
420
+ * Fix caching for Mapbox tiles ([#8389](https://github.com/mapbox/mapbox-gl-js/pull/8389))
421
+
422
+ ## 1.0.0
423
+
424
+ ### ⚠️ Breaking changes
425
+
426
+ This release replaces the existing “map views” pricing model in favor of a “map load” model. Learn more in [a recent blog post about these changes](https://blog.mapbox.com/new-pricing-46b7c26166e7).
427
+
428
+ **By upgrading to this release, you are opting in to the new map loads pricing.**
429
+
430
+ **Why is this change being made?**
431
+
432
+ This change allows us to implement a more standardized and predictable method of billing GL JS map usage. You’ll be charged whenever your website or web application loads, not by when users pan and zoom around the map, incentivizing developers to create highly interactive map experiences. The new pricing structure also creates a significantly larger free tier to help developers get started building their applications with Mapbox tools while pay-as-you-go pricing and automatic volume discounts help your application scale with Mapbox. Session billing also aligns invoices with metrics web developers already track and makes it easier to compare usage with other mapping providers.
433
+
434
+ **What is changing?**
435
+ - Add SKU token to Mapbox API requests [#8276](https://github.com/mapbox/mapbox-gl-js/pull/8276)
436
+
437
+ When (and only when) loading tiles from a Mapbox API with a Mapbox access token set (`mapboxgl.accessToken`), a query parameter named `sku` will be added to all requests for vector, raster and raster-dem tiles. Every map instance uses a unique `sku` value, which is refreshed every 12 hours. The token itself is comprised of a token version (always “1”), a sku ID (always “01”) and a random 10-digit base-62 number. The purpose of the token is to allow for metering of map sessions on the server-side. A session lasts from a new map instantiation until the map is destroyed or 12 hours passes, whichever comes first.
438
+
439
+ For further information on the pricing changes, you can read our [blog post](https://blog.mapbox.com/new-pricing-46b7c26166e7) and check out our new [pricing page](https://www.mapbox.com/pricing), which has a price calculator. As always, you can also contact our team at [https://support.mapbox.com](https://support.mapbox.com).
440
+
441
+ ## 0.54.1
442
+
443
+ ### Bug fixes
444
+
445
+ - Fix unbounded memory growth caused by failure to cancel requests in IE ([#8481](https://github.com/mapbox/mapbox-gl-js/issues/8481))
446
+
447
+ ## 0.54.0
448
+
449
+ ### Breaking changes
450
+
451
+ - Turned `localIdeographFontFamily` map option on by default. This may change how CJK labels are rendered, but dramatically improves performance of CJK maps (because the browser no longer needs to download heavy amounts of font data from the server). Add `localIdeographFontFamily: false` to turn this off. [#8008](https://github.com/mapbox/mapbox-gl-js/pull/8008)
452
+ - Added `Popup` `maxWidth` option, set to `"240px"` by default. [#7906](https://github.com/mapbox/mapbox-gl-js/pull/7906)
453
+
454
+ ### Major features
455
+
456
+ - Added support for updating and animating style images. [#7999](https://github.com/mapbox/mapbox-gl-js/pull/7999)
457
+ - Added support for generating style images dynamically (e.g. for drawing icons based on feature properties). [#7987](https://github.com/mapbox/mapbox-gl-js/pull/7987)
458
+ - Added antialiasing support for custom layers. [#7821](https://github.com/mapbox/mapbox-gl-js/pull/7821)
459
+ - Added a new `mapbox-gl-csp.js` bundle for strict CSP environments where `worker-src: blob` is disallowed. [#8044](https://github.com/mapbox/mapbox-gl-js/pull/8044)
460
+
461
+ ### Minor features and improvements
462
+
463
+ - Improved performance of fill extrusions. [#7821](https://github.com/mapbox/mapbox-gl-js/pull/7821)
464
+ - Improved performance of symbol layers. [#7967](https://github.com/mapbox/mapbox-gl-js/pull/7967)
465
+ - Slightly improved rendering performance in general. [#7969](https://github.com/mapbox/mapbox-gl-js/pull/7969)
466
+ - Slightly improved performance of HTML markers. [#8018](https://github.com/mapbox/mapbox-gl-js/pull/8018)
467
+ - Improved diffing of styles with `"visibility": "visible"`. [#8005](https://github.com/mapbox/mapbox-gl-js/pull/8005)
468
+ - Improved zoom buttons to grey out when reaching min/max zoom. [#8023](https://github.com/mapbox/mapbox-gl-js/pull/8023)
469
+ - Added a title to fullscreen control button. [#8012](https://github.com/mapbox/mapbox-gl-js/pull/8012)
470
+ - Added `rel="noopener"` attributes to links that lead to external websites (such as Mapbox logo and OpenStreetMap edit link) for improved security. [#7914](https://github.com/mapbox/mapbox-gl-js/pull/7914)
471
+ - Added tile size info when `map.showTileBoundaries` is turned on. [#7963](https://github.com/mapbox/mapbox-gl-js/pull/7963)
472
+ - Significantly improved load times of the benchmark suite. [#8066](https://github.com/mapbox/mapbox-gl-js/pull/8066)
473
+ - Improved behavior of `canvasSource.pause` to be more reliable and able to render a single frame. [#8130](https://github.com/mapbox/mapbox-gl-js/pull/8130)
474
+
475
+ ### Bug fixes
476
+
477
+ - Fixed a bug in Mac Safari 12+ where controls would disappear until you interact with the map. [8193](https://github.com/mapbox/mapbox-gl-js/pull/8193)
478
+ - Fixed a memory leak when calling `source.setData(url)` many times. [#8035](https://github.com/mapbox/mapbox-gl-js/pull/8035)
479
+ - Fixed a bug where marker lost focus when dragging. [#7799](https://github.com/mapbox/mapbox-gl-js/pull/7799)
480
+ - Fixed a bug where `map.getCenter()` returned a reference to an internal `LngLat` object instead of cloning it, leading to potential mutability bugs. [#7922](https://github.com/mapbox/mapbox-gl-js/pull/7922)
481
+ - Fixed a bug where default HTML marker positioning was slightly off. [#8074](https://github.com/mapbox/mapbox-gl-js/pull/8074)
482
+ - Fixed a bug where adding a fill extrusion layer for non-polygon layers would lead to visual artifacts. [#7685](https://github.com/mapbox/mapbox-gl-js/pull/7685)
483
+ - Fixed intermittent Flow failures on CI. [#8061](https://github.com/mapbox/mapbox-gl-js/pull/8061)
484
+ - Fixed a bug where calling `Map#removeFeatureState` does not remove the state from some tile zooms [#8087](https://github.com/mapbox/mapbox-gl-js/pull/8087)
485
+ - Fixed a bug where `removeFeatureState` didn't work on features with `id` equal to `0`. [#8150](https://github.com/mapbox/mapbox-gl-js/pull/8150) (h/t [jutaz](https://github.com/jutaz))
486
+
487
+ ## 0.53.1
488
+
489
+ ### Bug fixes
490
+ * Turn off telemetry for Mapbox Atlas ([#7945](https://github.com/mapbox/mapbox-gl-js/pull/7945))
491
+ * Fix order of 3D features in query results (fix #7883) ([#7953](https://github.com/mapbox/mapbox-gl-js/pull/7953))
492
+ * Fix RemovePaintState benchmarks ([#7930](https://github.com/mapbox/mapbox-gl-js/pull/7930))
493
+
494
+ ## 0.53.0
495
+
496
+ ### Features and improvements
497
+ * Enable `fill-extrusion` querying with ray picking ([#7499](https://github.com/mapbox/mapbox-gl-js/pull/7499))
498
+ * Add `clusterProperties` option for aggregated cluster properties ([#2412](https://github.com/mapbox/mapbox-gl-js/issues/2412), fixed by [#7584](https://github.com/mapbox/mapbox-gl-js/pull/7584))
499
+ * Allow initial map bounds to be adjusted with `fitBounds` options. ([#7681](https://github.com/mapbox/mapbox-gl-js/pull/7681)) (h/t [elyobo](https://github.com/elyobo))
500
+ * Remove popups on `Map#remove` ([#7749](https://github.com/mapbox/mapbox-gl-js/pull/7749)) (h/t [andycalder](https://github.com/andycalder))
501
+ * Add `Map#removeFeatureState` ([#7761](https://github.com/mapbox/mapbox-gl-js/pull/7761))
502
+ * Add `number-format` expression ([#7626](https://github.com/mapbox/mapbox-gl-js/pull/7626))
503
+ * Add `symbol-sort-key` style property ([#7678](https://github.com/mapbox/mapbox-gl-js/pull/7678))
504
+
505
+ ### Bug fixes
506
+ * Upgrades Earcut to fix a rare bug in rendering polygons that contain a coincident chain of holes ([#7806](https://github.com/mapbox/mapbox-gl-js/issues/7806), fixed by [#7878](https://github.com/mapbox/mapbox-gl-js/pull/7878))
507
+ * Allow `file://` protocol in XHR requests for Cordova/Ionic/etc ([#7818](https://github.com/mapbox/mapbox-gl-js/pull/7818))
508
+ * Correctly handle WebP images in Edge 18 ([#7687](https://github.com/mapbox/mapbox-gl-js/pull/7687))
509
+ * Fix bug which mistakenly requested WebP images in browsers that do not support WebP (#7817) ([#7819](https://github.com/mapbox/mapbox-gl-js/pull/7819))
510
+ * Fix images not being aborted when dequeued ([#7655](https://github.com/mapbox/mapbox-gl-js/pull/7655))
511
+ * Fix DEM layer memory leak ([#7690](https://github.com/mapbox/mapbox-gl-js/issues/7690), fixed by [#7691](https://github.com/mapbox/mapbox-gl-js/pull/7691))
512
+ * Set correct color state before rendering custom layer ([#7711](https://github.com/mapbox/mapbox-gl-js/pull/7711))
513
+ * Set `LngLat.toBounds()` default radius to 0 ([#7722](https://github.com/mapbox/mapbox-gl-js/issues/7722), fixed by [#7723](https://github.com/mapbox/mapbox-gl-js/pull/7723)) (h/t [cherniavskii](https://github.com/cherniavskii))
514
+ * Fix race condition in `feature-state` dependent layers ([#7523](https://github.com/mapbox/mapbox-gl-js/issues/7523), fixed by [#7790](https://github.com/mapbox/mapbox-gl-js/pull/7790))
515
+ * Prevent `map.repaint` from mistakenly enabling continuous repaints ([#7667](https://github.com/mapbox/mapbox-gl-js/pull/7667))
516
+ * Prevent map shaking while zooming in on raster tiles ([#7426](https://github.com/mapbox/mapbox-gl-js/pull/7426))
517
+ * Fix query point translation for multi-point geometry ([#6833](https://github.com/mapbox/mapbox-gl-js/issues/6833), fixed by [#7581](https://github.com/mapbox/mapbox-gl-js/pull/7581))
518
+
519
+ ## 0.52.0
520
+
521
+ ### Breaking changes
522
+ * Canonicalize tile urls to `mapbox://` urls so they can be transformed with `config.API_URL` ([#7594](https://github.com/mapbox/mapbox-gl-js/pull/7594))
523
+
524
+ ### Features and improvements
525
+ * Add getter and setter for `config.API_URL` ([#7594](https://github.com/mapbox/mapbox-gl-js/pull/7594))
526
+ * Allow user to define element other than map container for full screen control ([#7548](https://github.com/mapbox/mapbox-gl-js/pull/7548))
527
+ * Add validation option to style setters ([#7604](https://github.com/mapbox/mapbox-gl-js/pull/7604))
528
+ * Add 'idle' event: fires when no further rendering is expected without further interaction. ([#7625](https://github.com/mapbox/mapbox-gl-js/pull/7625))
529
+
530
+ ### Bug fixes
531
+ * Fire error when map.getLayoutProperty references missing layer ([#7537](https://github.com/mapbox/mapbox-gl-js/issues/7537), fixed by [#7539](https://github.com/mapbox/mapbox-gl-js/pull/7539))
532
+ * Fix shaky sprites when zooming with scrolling ([#7558](https://github.com/mapbox/mapbox-gl-js/pull/7558))
533
+ * Fix layout problems in attribution control ([#7608](https://github.com/mapbox/mapbox-gl-js/pull/7608)) (h/t [lucaswoj](https://github.com/lucaswoj))
534
+ * Fixes resetting map's pitch to 0 if initial bounds is set ([#7617](https://github.com/mapbox/mapbox-gl-js/pull/7617)) (h/t [stepankuzmin](https://github.com/stepankuzmin))
535
+ * Fix occasional failure to load images after multiple image request abortions [#7641](https://github.com/mapbox/mapbox-gl-js/pull/7641)
536
+ * Update repo url to correct one ([#7486](https://github.com/mapbox/mapbox-gl-js/pull/7486)) (h/t [nicholas-l](https://github.com/nicholas-l))
537
+ * Fix bug where symbols where sometimes not rendered immediately ([#7610](https://github.com/mapbox/mapbox-gl-js/pull/7610))
538
+ * Fix bug where cameraForBounds returns incorrect CameraOptions with asymmetrical padding/offset ([#7517](https://github.com/mapbox/mapbox-gl-js/issues/7517), fixed by [#7518](https://github.com/mapbox/mapbox-gl-js/pull/7518)) (h/t [mike-marcacci](https://github.com/mike-marcacci))
539
+ * Use diff+patch approach to map.setStyle when the parameter is a URL ([#4025](https://github.com/mapbox/mapbox-gl-js/issues/4025), fixed by [#7562](https://github.com/mapbox/mapbox-gl-js/pull/7562))
540
+ * Begin touch zoom immediately when rotation disabled ([#7582](https://github.com/mapbox/mapbox-gl-js/pull/7582)) (h/t [msbarry](https://github.com/msbarry))
541
+ * Fix symbol rendering under opaque fill layers ([#7612](https://github.com/mapbox/mapbox-gl-js/pull/7612))
542
+ * Fix shaking by aligning raster sources to pixel grid only when map is idle ([7426](https://github.com/mapbox/mapbox-gl-js/pull/7426))
543
+ * Fix raster layers in Edge 18 by disabling it's incomplete WebP support ([7687](https://github.com/mapbox/mapbox-gl-js/pull/7687))
544
+ * Fix memory leak in hillshade layer ([7691](https://github.com/mapbox/mapbox-gl-js/pull/7691))
545
+ * Fix disappearing custom layers ([7711](https://github.com/mapbox/mapbox-gl-js/pull/7711))
546
+
547
+ ## 0.51.0
548
+ November 7, 2018
549
+
550
+ ### ✨ Features and improvements
551
+ * Add initial bounds as map constructor option ([#5518](https://github.com/mapbox/mapbox-gl-js/pull/5518)) (h/t [stepankuzmin](https://github.com/stepankuzmin))
552
+ * Improve performance on machines with > 8 cores ([#7407](https://github.com/mapbox/mapbox-gl-js/issues/7407), fixed by [#7430](https://github.com/mapbox/mapbox-gl-js/pull/7430))
553
+ * Add `MercatorCoordinate` type ([#7488](https://github.com/mapbox/mapbox-gl-js/pull/7488))
554
+ * Allow browser-native `contextmenu` to be enabled ([#2301](https://github.com/mapbox/mapbox-gl-js/issues/2301), fixed by [#7369](https://github.com/mapbox/mapbox-gl-js/pull/7369))
555
+ * Add an unminified production build to the NPM package ([#7403](https://github.com/mapbox/mapbox-gl-js/pull/7403))
556
+ * Add support for `LngLat` conversion from `{lat, lon}` ([#7507](https://github.com/mapbox/mapbox-gl-js/pull/7507)) (h/t [bfrengley](https://github.com/bfrengley))
557
+ * Add tooltips for navigation controls ([#7373](https://github.com/mapbox/mapbox-gl-js/pull/7373))
558
+ * Show attribution only for used sources ([#7384](https://github.com/mapbox/mapbox-gl-js/pull/7384))
559
+ * Add telemetry event to log map loads ([#7431](https://github.com/mapbox/mapbox-gl-js/pull/7431))
560
+ * **Tighten style validation**
561
+ * Disallow expressions as stop values ([#7396](https://github.com/mapbox/mapbox-gl-js/pull/7396))
562
+ * Disallow `feature-state` expressions in filters ([#7366](https://github.com/mapbox/mapbox-gl-js/pull/7366))
563
+
564
+ ### 🐛 Bug fixes
565
+ * Fix for GeoJSON geometries not working when coincident with tile boundaries([#7436](https://github.com/mapbox/mapbox-gl-js/issues/7436), fixed by [#7448](https://github.com/mapbox/mapbox-gl-js/pull/7448))
566
+ * Fix depth buffer-related rendering issues on some Android devices. ([#7471](https://github.com/mapbox/mapbox-gl-js/pull/7471))
567
+ * Fix positioning of compact attribution strings ([#7444](https://github.com/mapbox/mapbox-gl-js/pull/7444), [#7445](https://github.com/mapbox/mapbox-gl-js/pull/7445), and [#7391](https://github.com/mapbox/mapbox-gl-js/pull/7391))
568
+ * Fix an issue with removing markers in mouse event callbacks ([#7442](https://github.com/mapbox/mapbox-gl-js/pull/7442)) (h/t [vbud](https://github.com/vbud))
569
+ * Remove controls before destroying a map ([#7479](https://github.com/mapbox/mapbox-gl-js/pull/7479))
570
+ * Fix display of Scale control values < 1 ([#7469](https://github.com/mapbox/mapbox-gl-js/pull/7469)) (h/t [MichaelHedman](https://github.com/MichaelHedman))
571
+ * Fix an error when using location `hash` within iframes in IE11 ([#7411](https://github.com/mapbox/mapbox-gl-js/pull/7411))
572
+ * Fix depth mode usage in custom layers ([#7432](https://github.com/mapbox/mapbox-gl-js/pull/7432)) (h/t [markusjohnsson](https://github.com/markusjohnsson))
573
+ * Fix an issue with shaky sprite images during scroll zooms ([#7558](https://github.com/mapbox/mapbox-gl-js/pull/7558))
574
+
575
+
576
+ ## 0.50.0
577
+ October 10, 2018
578
+
579
+ ### ✨ Features and improvements
580
+ * 🎉 Add Custom Layers that can be rendered into with user-provided WebGL code ([#7039](https://github.com/mapbox/mapbox-gl-js/pull/7039))
581
+ * Add WebGL face culling for increased performance ([#7178](https://github.com/mapbox/mapbox-gl-js/pull/7178))
582
+ * Improve speed of expression evaluation ([#7334](https://github.com/mapbox/mapbox-gl-js/pull/7334))
583
+ * Automatically coerce to string for `concat` expression and `text-field` property ([#6190](https://github.com/mapbox/mapbox-gl-js/issues/6190), fixed by [#7280](https://github.com/mapbox/mapbox-gl-js/pull/7280))
584
+ * Add `fill-extrusion-vertical-gradient` property for controlling shading of fill extrusions ([#5768](https://github.com/mapbox/mapbox-gl-js/issues/5768), fixed by [#6841](https://github.com/mapbox/mapbox-gl-js/pull/6841))
585
+ * Add update functionality for images provided via `ImageSource` ([#4050](https://github.com/mapbox/mapbox-gl-js/issues/4050), fixed by [#7342](https://github.com/mapbox/mapbox-gl-js/pull/7342)) (h/t [dcervelli](https://github.com/dcervelli))
586
+
587
+
588
+
589
+ ### 🐛 Bug fixes
590
+ * **Expressions**
591
+ * Fix expressions that use `log2` and `log10` in IE11 ([#7318](https://github.com/mapbox/mapbox-gl-js/issues/7318), fixed by [#7320](https://github.com/mapbox/mapbox-gl-js/pull/7320))
592
+ * Fix `let` expression stripping expected type during parsing ([#7300](https://github.com/mapbox/mapbox-gl-js/issues/7300), fixed by [#7301](https://github.com/mapbox/mapbox-gl-js/pull/7301))
593
+ * Fix superfluous wrapping of literals in `literal` expression ([#7336](https://github.com/mapbox/mapbox-gl-js/issues/7336), fixed by [#7337](https://github.com/mapbox/mapbox-gl-js/pull/7337))
594
+ * Allow calling `to-color` on values that are already of type `Color` ([#7260](https://github.com/mapbox/mapbox-gl-js/pull/7260))
595
+ * Fix `to-array` for empty arrays (([#7261](https://github.com/mapbox/mapbox-gl-js/pull/7261)))
596
+ * Fix identity functions for `text-field` when using formatted text ([#7351](https://github.com/mapbox/mapbox-gl-js/pull/7351))
597
+ * Fix coercion of `null` to `0` in `to-number` expression ([#7083](https://github.com/mapbox/mapbox-gl-js/issues/7083), fixed by [#7274](https://github.com/mapbox/mapbox-gl-js/pull/7274))
598
+ * **Canvas source**
599
+ * Fix missing repeats of `CanvasSource` when it crosses the antimeridian ([#7273](https://github.com/mapbox/mapbox-gl-js/pull/7273))
600
+ * Fix `CanvasSource` not respecting alpha values set on `canvas` element ([#7302](https://github.com/mapbox/mapbox-gl-js/issues/7302), fixed by [#7309](https://github.com/mapbox/mapbox-gl-js/pull/7309))
601
+ * **Rendering**
602
+ * Fix rendering of fill extrusions with really high heights ([#7292](https://github.com/mapbox/mapbox-gl-js/pull/7292))
603
+ * Fix an error where the map state wouldn't return to `loaded` after certain runtime styling changes when there were errored tiles in the viewport ([#7355](https://github.com/mapbox/mapbox-gl-js/pull/7355))
604
+ * Fix errors when rendering symbol layers without symbols ([#7241](https://github.com/mapbox/mapbox-gl-js/issues/7241), fixed by [#7253](https://github.com/mapbox/mapbox-gl-js/pull/7253))
605
+ * Don't fade in symbols with `*-allow-overlap: true` when panning into the viewport ([#7172](https://github.com/mapbox/mapbox-gl-js/issues/7172), fixed by[#7244](https://github.com/mapbox/mapbox-gl-js/pull/7244))
606
+ * **Library**
607
+ * Fix disambiguation for `mouseover` event ([#7295](https://github.com/mapbox/mapbox-gl-js/issues/7295), fixed by [#7299](https://github.com/mapbox/mapbox-gl-js/pull/7299))
608
+ * Fix silent failure of `getImage` if an SVG is requested ([#7312](https://github.com/mapbox/mapbox-gl-js/issues/7312), fixed by [#7313](https://github.com/mapbox/mapbox-gl-js/pull/7313))
609
+ * Fix empty control group box shadow ([#7303](https://github.com/mapbox/mapbox-gl-js/issues/7303), fixed by [#7304](https://github.com/mapbox/mapbox-gl-js/pull/7304)) (h/t [Duder-onomy](https://github.com/Duder-onomy))
610
+ * Fixed an issue where a wrong timestamp was sent for Mapbox turnstile events ([#7381](https://github.com/mapbox/mapbox-gl-js/pull/7381))
611
+ * Fixed a bug that lead to attribution not showing up correctly in Internet Explorer ([#3945](https://github.com/mapbox/mapbox-gl-js/issues/3945), fixed by [#7391](https://github.com/mapbox/mapbox-gl-js/pull/7391))
612
+
613
+
614
+ ## 0.49.0
615
+ September 6, 2018
616
+
617
+ ### ⚠️ Breaking changes
618
+ * Use `client{Height/Width}` instead of `offset{Height/Width}` for map canvas sizing ([#6848](https://github.com/mapbox/mapbox-gl-js/issues/6848), fixed by [#7128](https://github.com/mapbox/mapbox-gl-js/pull/7128))
619
+
620
+ ### 🐛 Bug fixes
621
+ * Fix [Top Issues list](https://mapbox.github.io/top-issues/#!mapbox/mapbox-gl-js) for mapbox-gl-js ([#7108](https://github.com/mapbox/mapbox-gl-js/issues/7108), fixed by [#7112](https://github.com/mapbox/mapbox-gl-js/pull/7112))
622
+ * Fix bug in which symbols with `icon-allow-overlap: true, text-allow-overlap: true, text-optional: false` would show icons when they shouldn't ([#7041](https://github.com/mapbox/mapbox-gl-js/pull/7041))
623
+ * Fix bug where the map would not stop at the exact zoom level requested by Map#FlyTo (#7222) ([#7223](https://github.com/mapbox/mapbox-gl-js/pull/7223)) (h/t [benoitbzl](https://github.com/benoitbzl))
624
+ * Keep map centered on the center point of a multi-touch gesture when zooming (#6722) ([#7191](https://github.com/mapbox/mapbox-gl-js/pull/7191)) (h/t [pakastin](https://github.com/pakastin))
625
+ * Update the style-spec's old `gl-style-migrate` script to include conversion of legacy functions and filters to their expression equivalents ([#6927](https://github.com/mapbox/mapbox-gl-js/issues/6927), fixed by [#7095](https://github.com/mapbox/mapbox-gl-js/pull/7095))
626
+ * Fix `icon-size` for small data-driven values ([#7125](https://github.com/mapbox/mapbox-gl-js/pull/7125))
627
+ * Fix bug in the way AJAX requests load local files on iOS web view ([#6610](https://github.com/mapbox/mapbox-gl-js/pull/6610)) (h/t [oscarfonts](https://github.com/oscarfonts))
628
+ * Fix bug in which canvas sources would not render in world wrapped tiles at the edge of the viewport ([#7271]https://github.com/mapbox/mapbox-gl-js/issues/7271), fixed by [#7273](https://github.com/mapbox/mapbox-gl-js/pull/7273))
629
+
630
+ ### ✨ Features and improvements
631
+ * Performance updates:
632
+ * Improve time to first render by updating how feature ID maps are transferred to the main thread ([#7110](https://github.com/mapbox/mapbox-gl-js/issues/7110), fixed by [#7132](https://github.com/mapbox/mapbox-gl-js/pull/7132))
633
+ * Reduce size of JSON transmitted from worker thread to main thread ([#7124](https://github.com/mapbox/mapbox-gl-js/pull/7124))
634
+ * Improve image/glyph atlas packing algorithm ([#7171](https://github.com/mapbox/mapbox-gl-js/pull/7171))
635
+ * Use murmur hash on symbol instance keys to reduce worker transfer costs ([#7127](https://github.com/mapbox/mapbox-gl-js/pull/7127))
636
+ * Add GL state management for uniforms ([#6018](https://github.com/mapbox/mapbox-gl-js/pull/6018))
637
+ * Add `symbol-z-order` symbol layout property to style spec ([#7219](https://github.com/mapbox/mapbox-gl-js/pull/7219))
638
+ * Implement data-driven styling support for `*-pattern properties` ([#6289](https://github.com/mapbox/mapbox-gl-js/pull/6289))
639
+ * Add `Map#fitScreenCoordinates` which fits viewport to two points, similar to `Map#fitBounds` but uses screen coordinates and supports non-zero map bearings ([#6894](https://github.com/mapbox/mapbox-gl-js/pull/6894))
640
+ * Re-implement LAB/HSL color space interpolation for expressions ([#5326](https://github.com/mapbox/mapbox-gl-js/issues/5326), fixed by [#7123](https://github.com/mapbox/mapbox-gl-js/pull/7123))
641
+ * Enable benchmark testing for Mapbox styles ([#7047](https://github.com/mapbox/mapbox-gl-js/pull/7047))
642
+ * Allow `Map#setFeatureState` and `Map#getFeatureState` to accept numeric IDs ([#7106](https://github.com/mapbox/mapbox-gl-js/pull/7106)) (h/t [bfrengley](https://github.com/bfrengley))
643
+
644
+ ## 0.48.0
645
+ August 16, 2018
646
+
647
+ ### ⚠️ Breaking changes
648
+ * Treat tiles that error with status 404 as empty renderable tiles to prevent rendering duplicate features in some sparse tilesets ([#6803](https://github.com/mapbox/mapbox-gl-js/pull/6803))
649
+
650
+ ### 🐛 Bug fixes
651
+ * Fix issue where `text-max-angle` property was being calculated incorrectly internally, causing potential rendering errors when `"symbol-placement": line`
652
+ * Require `feature.id` when using `Map#setFeatureState` ([#6974](https://github.com/mapbox/mapbox-gl-js/pull/6974))
653
+ * Fix issue with removing the `GeolocateControl` when user location is being used ([#6977](https://github.com/mapbox/mapbox-gl-js/pull/6977)) (h/t [sergei-zelinsky](https://github.com/sergei-zelinsky))
654
+ * Fix memory leak caused by a failure to remove all controls added to the map ([#7042](https://github.com/mapbox/mapbox-gl-js/pull/7042))
655
+ * Fix bug where the build would fail when using mapbox-gl webpack 2 and UglifyJSPlugin ([#4359](https://github.com/mapbox/mapbox-gl-js/issues/4359), fixed by [#6956](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6956))
656
+ * Fix bug where fitBounds called with coordinates outside the bounds of Web Mercator resulted in uncaught error ([#6906](https://github.com/mapbox/mapbox-gl-js/issues/6906), fixed by [#6918](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6918))
657
+ * Fix bug wherein `Map#querySourceFeatures` was returning bad results on zooms > maxZoom ([#7061](https://github.com/mapbox/mapbox-gl-js/pull/7061))
658
+ * Relax typing for equality and order expressions ([#6459](https://github.com/mapbox/mapbox-gl-js/issues/6459), fixed by [#6961](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6961))
659
+ * Fix bug where `queryPadding` for all layers in a source was set by the first layer, causing incorrect querying on other layers and, in some cases, incorrect firing of events associated with individual layers ([#6909](https://github.com/mapbox/mapbox-gl-js/pull/6909))
660
+
661
+ ### ✨ Features and improvements
662
+
663
+ * Performance Improvements:
664
+ * Stop unnecessary serialization of symbol source features. ([#7013](https://github.com/mapbox/mapbox-gl-js/pull/7013))
665
+ * Optimize calculation for getting visible tile coordinates ([#6998](https://github.com/mapbox/mapbox-gl-js/pull/6998))
666
+ * Improve performance of creating `{Glyph/Image}Atlas`es ([#7091](https://github.com/mapbox/mapbox-gl-js/pull/7091))
667
+ * Optimize and simplify tile retention logic ([#6995](https://github.com/mapbox/mapbox-gl-js/pull/6995))
668
+ * Add a user turnstile event for users accessing Mapbox APIs ([#6980](https://github.com/mapbox/mapbox-gl-js/pull/6980))
669
+ * Add support for autogenerating feature ids for GeoJSON sources so they can be used more easily with the `Map#setFeatureState` API ([#7043](https://www.github.com/mapbox/mapbox-gl-js/pull/7043))) ([#7091](https://github.com/mapbox/mapbox-gl-js/pull/7091))
670
+ * Add ability to style symbol layers labels with multiple fonts and text sizes via `"format"` expression ([#6994](https://www.github.com/mapbox/mapbox-gl-js/pull/6994))
671
+ * Add customAttribution option to AttributionControl ([#7033](https://github.com/mapbox/mapbox-gl-js/pull/7033)) (h/t [mklopets](https://github.com/mklopets))
672
+ * Publish Flow type definitions alongside compiled bundle ([#7079](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/7079))
673
+ * Introduce symbol cross fading when crossing integer zoom levels to prevent labels from disappearing before newly loaded tiles' labels can be rendered ([#6951](https://github.com/mapbox/mapbox-gl-js/pull/6951))
674
+ * Improvements in label collision detection ([#6925](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6925)))
675
+
676
+ ## 0.47.0
677
+
678
+ ### ✨ Features and improvements
679
+ * Add configurable drag pan threshold ([#6809](https://github.com/mapbox/mapbox-gl-js/pull/6809)) (h/t [msbarry](https://github.com/msbarry))
680
+ * Add `raster-resampling` raster paint property ([#6411](https://github.com/mapbox/mapbox-gl-js/pull/6411)) (h/t [andrewharvey](https://github.com/andrewharvey))
681
+ * Add `symbol-placement: line-center` ([#6821](https://github.com/mapbox/mapbox-gl-js/pull/6821))
682
+ * Add methods for inspecting GeoJSON clusters ([#3318](https://github.com/mapbox/mapbox-gl-js/issues/3318), fixed by [#6829](https://github.com/mapbox/mapbox-gl-js/pull/6829))
683
+ * Add warning to geolocate control when unsupported ([#6923](https://github.com/mapbox/mapbox-gl-js/pull/6923)) (h/t [aendrew](https://github.com/aendrew))
684
+ * Upgrade geojson-vt to 3.1.4 ([#6942](https://github.com/mapbox/mapbox-gl-js/pull/6942))
685
+ * Include link to license in compiled bundle ([#6975](https://github.com/mapbox/mapbox-gl-js/pull/6975))
686
+
687
+ ### 🐛 Bug fixes
688
+ * Use updateData instead of re-creating buffers for repopulated paint arrays ([#6853](https://github.com/mapbox/mapbox-gl-js/pull/6853))
689
+ * Fix ScrollZoom handler setting tr.zoom = NaN ([#6924](https://github.com/mapbox/mapbox-gl-js/pull/6924))
690
+ - Failed to invert matrix error ([#6486](https://github.com/mapbox/mapbox-gl-js/issues/6486), fixed by [#6924](https://github.com/mapbox/mapbox-gl-js/pull/6924))
691
+ - Fixing matrix errors ([#6782](https://github.com/mapbox/mapbox-gl-js/issues/6782), fixed by [#6924](https://github.com/mapbox/mapbox-gl-js/pull/6924))
692
+ * Fix heatmap tile clipping when layers are ordered above it ([#6806](https://github.com/mapbox/mapbox-gl-js/issues/6806), fixed by [#6807](https://github.com/mapbox/mapbox-gl-js/pull/6807))
693
+ * Fix video source in safari (macOS and iOS) ([#6443](https://github.com/mapbox/mapbox-gl-js/issues/6443), fixed by [#6811](https://github.com/mapbox/mapbox-gl-js/pull/6811))
694
+ * Do not reload errored tiles ([#6813](https://github.com/mapbox/mapbox-gl-js/pull/6813))
695
+ * Fix send / remove timing bug in Dispatcher ([#6756](https://github.com/mapbox/mapbox-gl-js/pull/6756), fixed by [#6826](https://github.com/mapbox/mapbox-gl-js/pull/6826))
696
+ * Fix flyTo not zooming to exact given zoom ([#6828](https://github.com/mapbox/mapbox-gl-js/pull/6828))
697
+ * Don't stop animation on map resize ([#6636](https://github.com/mapbox/mapbox-gl-js/pull/6636))
698
+ * Fix map.getBounds() with rotated map ([#6875](https://github.com/mapbox/mapbox-gl-js/pull/6875)) (h/t [zoltan-mihalyi](https://github.com/zoltan-mihalyi))
699
+ * Support collators in feature filter expressions. ([#6929](https://github.com/mapbox/mapbox-gl-js/pull/6929))
700
+ * Fix Webpack production mode compatibility ([#6981](https://github.com/mapbox/mapbox-gl-js/pull/6981))
701
+
702
+ ## 0.46.0
703
+
704
+ ### ⚠️ Breaking changes
705
+
706
+ * Align implicit type casting behavior of `match` expressions with with `case/==` ([#6684](https://github.com/mapbox/mapbox-gl-js/pull/6684))
707
+
708
+ ### ✨ Features and improvements
709
+
710
+ * :tada: Add `Map#setFeatureState` and `feature-state` expression to support interactive styling ([#6263](https://github.com/mapbox/mapbox-gl-js/pull/6263))
711
+ * Create draggable `Marker` with `setDraggable` ([#6687](https://github.com/mapbox/mapbox-gl-js/pull/6687))
712
+ * Add `Map#listImages` for listing all currently active sprites/images ([#6381](https://github.com/mapbox/mapbox-gl-js/issues/6381))
713
+ * Add "crossSourceCollisions" option to disable cross-source collision detection ([#6566](https://github.com/mapbox/mapbox-gl-js/pull/6566))
714
+ * Handle `text/icon-rotate` for symbols with `symbol-placement: point` ([#6075](https://github.com/mapbox/mapbox-gl-js/issues/6075))
715
+ * Automatically compact Mapbox wordmark on narrow maps. ([#4282](https://github.com/mapbox/mapbox-gl-js/issues/4282)) (h/t [andrewharvey](https://github.com/andrewharvey))
716
+ * Only show compacted AttributionControl on interactive displays ([#6506](https://github.com/mapbox/mapbox-gl-js/pull/6506)) (h/t [andrewharvey](https://github.com/andrewharvey))
717
+ * Use postcss to inline svg files into css, reduce size of mapbox-gl.css ([#6513](https://github.com/mapbox/mapbox-gl-js/pull/6513)) (h/t [andrewharvey](https://github.com/andrewharvey))
718
+ * Add support for GeoJSON attribution ([#6364](https://github.com/mapbox/mapbox-gl-js/pull/6364)) (h/t [andrewharvey](https://github.com/andrewharvey))
719
+ * Add instructions for running individual unit and render tests ([#6686](https://github.com/mapbox/mapbox-gl-js/pull/6686))
720
+ * Make Map constructor fail if WebGL init fails. ([#6744](https://github.com/mapbox/mapbox-gl-js/pull/6744)) (h/t [uforic](https://github.com/uforic))
721
+ * Add browser fallback code for `collectResourceTiming: true` in web workers ([#6721](https://github.com/mapbox/mapbox-gl-js/pull/6721))
722
+ * Remove ignored usage of gl.lineWidth ([#5541](https://github.com/mapbox/mapbox-gl-js/pull/5541))
723
+ * Split new bounds calculation out of fitBounds into new method ([#6683](https://github.com/mapbox/mapbox-gl-js/pull/6683))
724
+ * Allow integration tests to be organized in an arbitrarily deep directory structure ([#3920](https://github.com/mapbox/mapbox-gl-js/issues/3920))
725
+ * Make "Missing Mapbox GL JS CSS" a console warning ([#5786](https://github.com/mapbox/mapbox-gl-js/issues/5786))
726
+ * Add rel="noopener" to Mapbox attribution link. ([#6729](https://github.com/mapbox/mapbox-gl-js/pull/6729)) (h/t [gorbypark](https://github.com/gorbypark))
727
+ * Update to deep equality check in example code ([#6599](https://github.com/mapbox/mapbox-gl-js/pull/6599)) (h/t [jonsadka](https://github.com/jonsadka))
728
+ * Upgrades!
729
+ - Upgrade ESM dependency to ^3.0.39 ([#6750](https://github.com/mapbox/mapbox-gl-js/pull/6750))
730
+ - Ditch gl-matrix fork in favor of the original package ([#6751](https://github.com/mapbox/mapbox-gl-js/pull/6751))
731
+ - Update to latest sinon ([#6771](https://github.com/mapbox/mapbox-gl-js/pull/6771))
732
+ - Upgrade to Flow 0.69 ([#6594](https://github.com/mapbox/mapbox-gl-js/pull/6594))
733
+ - Update to mapbox-gl-supported 1.4.0 ([#6773](https://github.com/mapbox/mapbox-gl-js/pull/6773))
734
+
735
+ ### 🐛 Bug fixes
736
+
737
+ * `collectResourceTiming: true` generates error on iOS9 Safari, IE 11 ([#6690](https://github.com/mapbox/mapbox-gl-js/issues/6690))
738
+ * Fix PopupOptions flow type declarations ([#6670](https://github.com/mapbox/mapbox-gl-js/pull/6670)) (h/t [TimPetricola](https://github.com/TimPetricola))
739
+ * Add className option to Popup constructor ([#6502](https://github.com/mapbox/mapbox-gl-js/pull/6502)) (h/t [Ashot-KR](https://github.com/Ashot-KR))
740
+ * GeoJSON MultiLineStrings with `lineMetrics=true` only rendered first line ([#6649](https://github.com/mapbox/mapbox-gl-js/issues/6649))
741
+ * Provide target property for mouseenter/over/leave/out events ([#6623](https://github.com/mapbox/mapbox-gl-js/issues/6623))
742
+ * Don't break on sources whose name contains "." ([#6660](https://github.com/mapbox/mapbox-gl-js/issues/6660))
743
+ * Rotate and pitch with navigationControl broke in v0.45 ([#6650](https://github.com/mapbox/mapbox-gl-js/issues/6650))
744
+ * Zero-width lines remained visible ([#6769](https://github.com/mapbox/mapbox-gl-js/pull/6769))
745
+ * Heatmaps inappropriately clipped at tile boundaries ([#6806](https://github.com/mapbox/mapbox-gl-js/issues/6806))
746
+ * Use named exports for style-spec entrypoint module ([#6601](https://github.com/mapbox/mapbox-gl-js/issues/6601)
747
+ * Don't fire click event if default is prevented on mousedown for a drag event ([#6697](https://github.com/mapbox/mapbox-gl-js/pull/6697), fixes [#6642](https://github.com/mapbox/mapbox-gl-js/issues/6642))
748
+ * Double clicking to zoom in breaks map dragging/panning in Edge ([#6740](https://github.com/mapbox/mapbox-gl-js/issues/6740)) (h/t [GUI](https://github.com/GUI))
749
+ * \*-transition properties cannot be set with setPaintProperty() ([#6706](https://github.com/mapbox/mapbox-gl-js/issues/6706))
750
+ * Marker with `a` element does not open the url when clicked ([#6730](https://github.com/mapbox/mapbox-gl-js/issues/6730))
751
+ * `setRTLTextPlugin` fails with relative URLs ([#6719](https://github.com/mapbox/mapbox-gl-js/issues/6719))
752
+ * Collision detection incorrect for symbol layers that share the same layout properties ([#6548](https://github.com/mapbox/mapbox-gl-js/pull/6548))
753
+ * Fix a possible crash when calling queryRenderedFeatures after querySourceFeatures
754
+ ([#6559](https://github.com/mapbox/mapbox-gl-js/pull/6559))
755
+ * Fix a collision detection issue that could cause labels to temporarily be placed too densely during rapid panning ([#5654](https://github.com/mapbox/mapbox-gl-js/issues/5654))
756
+
757
+ ## 0.45.0
758
+
759
+ ### ⚠️ Breaking changes
760
+
761
+ * `Evented#fire` and `Evented#listens` are now marked as private. Though `Evented` is still exported, and `fire` and `listens` are still functional, we encourage you to seek alternatives; a future version may remove their API accessibility or change its behavior. If you are writing a class that needs event emitting functionality, consider using [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) or similar libraries instead.
762
+ * The `"to-string"` expression operator now converts `null` to an empty string rather than to `"null"`. [#6534](https://github.com/mapbox/mapbox-gl-js/pull/6534)
763
+
764
+ ### ✨ Features and improvements
765
+
766
+ * :rainbow: Add `line-gradient` property [#6303](https://github.com/mapbox/mapbox-gl-js/pull/6303)
767
+ * Add `abs`, `round`, `floor`, and `ceil` expression operators [#6496](https://github.com/mapbox/mapbox-gl-js/pull/6496)
768
+ * Add `collator` expression for controlling case and diacritic sensitivity in string comparisons [#6270](https://github.com/mapbox/mapbox-gl-js/pull/6270)
769
+ - Rename `caseSensitive` and `diacriticSensitive` expressions to `case-sensitive` and `diacritic-sensitive` for consistency [#6598](https://github.com/mapbox/mapbox-gl-js/pull/6598)
770
+ - Prevent `collator` expressions for evaluating as constant to account for potential environment-specific differences in expression evaluation [#6596](https://github.com/mapbox/mapbox-gl-js/pull/6596)
771
+ * Add CSS linting to test suite (h/t @jasonbarry) [#6071](https://github.com/mapbox/mapbox-gl-js/pull/6071)
772
+ * Add support for configurable maxzoom in `raster-dem` tilesets [#6103](https://github.com/mapbox/mapbox-gl-js/pull/6103)
773
+ * Add `Map#isZooming` and `Map#isRotating` methods [#6128](https://github.com/mapbox/mapbox-gl-js/pull/6128), [#6183](https://github.com/mapbox/mapbox-gl-js/pull/6183)
774
+ * Add support for Mapzen Terrarium tiles in `raster-dem` sources [#6110](https://github.com/mapbox/mapbox-gl-js/pull/6110)
775
+ * Add `preventDefault` method on `mousedown`, `touchstart`, and `dblclick` events [#6218](https://github.com/mapbox/mapbox-gl-js/pull/6218)
776
+ * Add `originalEvent` property on `zoomend` and `moveend` for user-initiated scroll events (h/t @stepankuzmin) [#6175](https://github.com/mapbox/mapbox-gl-js/pull/6175)
777
+ * Accept arguments of type `value` in [`"length"` expressions](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-length) [#6244](https://github.com/mapbox/mapbox-gl-js/pull/6244)
778
+ * Introduce `MapWheelEvent`[#6237](https://github.com/mapbox/mapbox-gl-js/pull/6237)
779
+ * Add setter for `ScaleControl` units (h/t @ryanhamley) [#6138](https://github.com/mapbox/mapbox-gl-js/pull/6138), [#6274](https://github.com/mapbox/mapbox-gl-js/pull/6274)
780
+ * Add `open` event for `Popup` [#6311](https://github.com/mapbox/mapbox-gl-js/pull/6311)
781
+ * Explicit `"object"` type assertions are no longer required when using expressions [#6235](https://github.com/mapbox/mapbox-gl-js/pull/6235)
782
+ * Add `anchor` option to `Marker` [#6350](https://github.com/mapbox/mapbox-gl-js/pull/6350)
783
+ * `HTMLElement` is now passed to `Marker` as part of the `options` object, but the old function signature is still supported for backwards compatibility [#6356](https://github.com/mapbox/mapbox-gl-js/pull/6356)
784
+ * Add support for custom colors when using the default `Marker` SVG element (h/t @andrewharvey) [#6416](https://github.com/mapbox/mapbox-gl-js/pull/6416)
785
+ * Allow `CanvasSource` initialization from `HTMLElement` [#6424](https://github.com/mapbox/mapbox-gl-js/pull/6424)
786
+ * Add `is-supported-script` expression [6260](https://github.com/mapbox/mapbox-gl-js/pull/6260)
787
+
788
+ ### 🐛 Bug fixes
789
+
790
+ * Align `raster-dem` tiles to pixel grid to eliminate blurry rendering on some devices [#6059](https://github.com/mapbox/mapbox-gl-js/pull/6059)
791
+ * Fix label collision circle debug drawing on overzoomed tiles [#6073](https://github.com/mapbox/mapbox-gl-js/pull/6073)
792
+ * Improve error reporting for some failed requests [#6126](https://github.com/mapbox/mapbox-gl-js/pull/6126), [#6032](https://github.com/mapbox/mapbox-gl-js/pull/6032)
793
+ * Fix several `Map#queryRenderedFeatures` bugs:
794
+ - account for `{text, icon}-offset` when querying[#6135](https://github.com/mapbox/mapbox-gl-js/pull/6135)
795
+ - correctly query features that extend across tile boundaries [#5756](https://github.com/mapbox/mapbox-gl-js/pull/6283)
796
+ - fix querying of `circle` layer features with `-pitch-scaling: 'viewport'` or `-pitch-alignment: 'map'` [#6036](https://github.com/mapbox/mapbox-gl-js/pull/6036)
797
+ - eliminate flicker effects when using query results to set a hover effect by switching from tile-based to viewport-based symbol querying [#6497](https://github.com/mapbox/mapbox-gl-js/pull/6497)
798
+ * Preserve browser history state when updating the `Map` hash [#6140](https://github.com/mapbox/mapbox-gl-js/pull/6140)
799
+ * Fix undefined behavior when `Map#addLayer` is invoked with an `id` of a preexisting layer [#6147](https://github.com/mapbox/mapbox-gl-js/pull/6147)
800
+ * Fix bug where `icon-image` would not be rendered if `text-field` is an empty string [#6164](https://github.com/mapbox/mapbox-gl-js/pull/6164)
801
+ * Ensure all camera methods fire `rotatestart` and `rotateend` events [#6187](https://github.com/mapbox/mapbox-gl-js/pull/6187)
802
+ * Always hide duplicate labels [#6166](https://github.com/mapbox/mapbox-gl-js/pull/6166)
803
+ * Fix `DragHandler` bugs where a left-button mouse click would end a right-button drag rotate and a drag gesture would not end if the control key is down on `mouseup` [#6193](https://github.com/mapbox/mapbox-gl-js/pull/6193)
804
+ * Add support for calling `{DragPanHandler, DragRotateHandler}#disable` while a gesture is in progress [#6232](https://github.com/mapbox/mapbox-gl-js/pull/6232)
805
+ * Fix `GeolocateControl` user location dot sizing when `Map`'s `<div>` inherits `box-sizing: border-box;` (h/t @andrewharvey) [#6227](https://github.com/mapbox/mapbox-gl-js/pull/6232)
806
+ * Fix bug causing an off-by-one error in `array` expression error messages (h/t @drewbo) [#6269](https://github.com/mapbox/mapbox-gl-js/pull/6269)
807
+ * Improve error message when an invalid access token triggers a 401 error [#6283](https://github.com/mapbox/mapbox-gl-js/pull/6283)
808
+ * Fix bug where lines with `line-width` larger than the sprite height of the `line-pattern` property would render other sprite images [#6246](https://github.com/mapbox/mapbox-gl-js/pull/6246)
809
+ * Fix broken touch events for `DragPanHandler` on mobile using Edge (note that zoom/rotate/pitch handlers still do not support Edge touch events [#1928](https://github.com/mapbox/mapbox-gl-js/pull/1928)) [#6325](https://github.com/mapbox/mapbox-gl-js/pull/6325)
810
+ * Fix race condition in `VectorTileWorkerSource#reloadTile` causing a rendering timeout [#6308](https://github.com/mapbox/mapbox-gl-js/issues/6308)
811
+ * Fix bug causing redundant `gl.stencilFunc` calls due to incorrect state checking (h/t @yangdonglai) [#6330](https://github.com/mapbox/mapbox-gl-js/pull/6330)
812
+ * Fix bug where `mousedown` or `touchstart` would cancel camera animations in non-interactive maps [#6338](https://github.com/mapbox/mapbox-gl-js/pull/6338)
813
+ * Fix bug causing a full-screen flicker when the map is pitched and a symbol layer uses non-zero `text-translate` [#6365](https://github.com/mapbox/mapbox-gl-js/issues/6365)
814
+ * Fix bug in `to-rgba` expression causing division by zero [6388](https://github.com/mapbox/mapbox-gl-js/pull/6388)
815
+ * Fix bug in cross-fading for `*-pattern` properties with non-integer zoom stops [#6430](https://github.com/mapbox/mapbox-gl-js/pull/6430)
816
+ * Fix bug where calling `Map#remove` on a map with constructor option `hash: true` throws an error (h/t @allthesignals) [#6490](https://github.com/mapbox/mapbox-gl-js/pull/6497)
817
+ * Fix bug causing flickering when panning across the anti-meridian [#6438](https://github.com/mapbox/mapbox-gl-js/pull/6438)
818
+ * Fix error when using tiles of non-power-of-two size [#6444](https://github.com/mapbox/mapbox-gl-js/pull/6444)
819
+ * Fix bug causing `Map#moveLayer(layerId, beforeId)` to remove the layer when `layerId === beforeId` [#6542](https://github.com/mapbox/mapbox-gl-js/pull/6542)
820
+ - Fix Rollup build for style-spec module [6575](https://github.com/mapbox/mapbox-gl-js/pull/6575)
821
+ - Fix bug causing `Map#querySourceFeatures` to throw an `Uncaught TypeError`(https://github.com/mapbox/mapbox-gl-js/pull/6555)
822
+ - Fix issue where label collision detection was inaccurate for some symbol layers that shared layout properties with another layer [#6558](https://github.com/mapbox/mapbox-gl-js/pull/6558)
823
+ - Restore `target` property for `mouse{enter,over,leave,out}` events [#6623](https://github.com/mapbox/mapbox-gl-js/pull/6623)
824
+
825
+ ## 0.44.2
826
+
827
+ ### 🐛 Bug fixes
828
+
829
+ * Workaround a breaking change in Safari causing page to scroll/zoom in response to user actions intended to pan/zoom the map [#6095](https://github.com/mapbox/mapbox-gl-js/issues/6095). (N.B., not to be confused with the workaround from April 2017 dealing with the same breaking change in Chrome [#4259](https://github.com/mapbox/mapbox-gl-js/issues/6095). See also https://github.com/WICG/interventions/issues/18, https://bugs.webkit.org/show_bug.cgi?id=182521, https://bugs.chromium.org/p/chromium/issues/detail?id=639227 .)
830
+
831
+ ## 0.44.1
832
+
833
+ ### 🐛 Bug fixes
834
+
835
+ * Fix bug causing features from symbol layers to be omitted from `map.queryRenderedFeatures()` [#6074](https://github.com/mapbox/mapbox-gl-js/issues/6074)
836
+ * Fix error triggered by simultaneous scroll-zooming and drag-panning. [#6106](https://github.com/mapbox/mapbox-gl-js/issues/6106)
837
+ * Fix bug wherein drag-panning failed to resume after a brief pause [#6063](https://github.com/mapbox/mapbox-gl-js/issues/6063)
838
+
839
+ ## 0.44.0
840
+
841
+ ### ✨ Features and improvements
842
+
843
+ * The CSP policy of a page using mapbox-gl-js no longer needs to include `script-src 'unsafe-eval'` [#559](https://github.com/mapbox/mapbox-gl-js/issues/559)
844
+ * Add `LngLatBounds#isEmpty()` method [#5917](https://github.com/mapbox/mapbox-gl-js/pull/5917)
845
+ * Updated to flow 0.62.0 [#5923](https://github.com/mapbox/mapbox-gl-js/issues/5923)
846
+ * Make compass and zoom controls optional ([#5348](https://github.com/mapbox/mapbox-gl-js/pull/5348)) (h/t @matijs)
847
+ * Add `collectResourceTiming` option to the enable collection of [Resource Timing](https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API) data for requests that are made from Web Workers. ([#5948](https://github.com/mapbox/mapbox-gl-js/issues/5948))
848
+ * Improve user location dot appearance across browsers ([#5498](https://github.com/mapbox/mapbox-gl-js/pull/5498)) (h/t @jasonbarry)
849
+
850
+ ### 🐛 Bug fixes
851
+
852
+ * Fix error triggered by `==` and `!=` expressions [#5947](https://github.com/mapbox/mapbox-gl-js/issues/5947)
853
+ * Image sources honor `renderWorldCopies` [#5932](https://github.com/mapbox/mapbox-gl-js/pull/5932)
854
+ * Fix transitions to default fill-outline-color [#5953](https://github.com/mapbox/mapbox-gl-js/issues/5953)
855
+ * Fix transitions for light properties [#5982](https://github.com/mapbox/mapbox-gl-js/issues/5982)
856
+ * Fix minor symbol collisions on pitched maps [#5913](https://github.com/mapbox/mapbox-gl-js/pull/5913)
857
+ * Fix memory leaks after `Map#remove()` [#5943](https://github.com/mapbox/mapbox-gl-js/pull/5943), [#5951](https://github.com/mapbox/mapbox-gl-js/pull/5951)
858
+ * Fix bug wherein `GeoJSONSource#setData()` caused labels to fade out and back in ([#6002](https://github.com/mapbox/mapbox-gl-js/issues/6002))
859
+ * Fix bug that could cause incorrect collisions for labels placed very near to each other at low zoom levels ([#5993](https://github.com/mapbox/mapbox-gl-js/issues/5993))
860
+ * Fix bug causing `move` events to be fired out of sync with actual map movements ([#6005](https://github.com/mapbox/mapbox-gl-js/pull/6005))
861
+ * Fix bug wherein `Map` did not fire `mouseover` events ([#6000](https://github.com/mapbox/mapbox-gl-js/pull/6000)] (h/t @jay-manday)
862
+ * Fix bug causing blurry rendering of raster tiles ([#4552](https://github.com/mapbox/mapbox-gl-js/issues/4552))
863
+ * Fix potential memory leak caused by removing layers ([#5995](https://github.com/mapbox/mapbox-gl-js/issues/5995))
864
+ * Fix bug causing attribution icon to appear incorrectly in compact maps not using Mapbox data ([#6042](https://github.com/mapbox/mapbox-gl-js/pull/6042))
865
+ * Fix positioning of default marker element ([#6012](https://github.com/mapbox/mapbox-gl-js/pull/6012)) (h/t @andrewharvey)
866
+
867
+ ## 0.43.0 (December 21, 2017)
868
+
869
+ ### ⚠️ Breaking changes
870
+
871
+ * It is now an error to attempt to remove a source that is in use [#5562](https://github.com/mapbox/mapbox-gl-js/pull/5562)
872
+ * It is now an error if the layer specified by the `before` parameter to `moveLayer` does not exist [#5679](https://github.com/mapbox/mapbox-gl-js/pull/5679)
873
+ * `"colorSpace": "hcl"` now uses shortest-path interpolation for hue [#5811](https://github.com/mapbox/mapbox-gl-js/issues/5811)
874
+
875
+ ### ✨ Features and improvements
876
+
877
+ * Introduce client-side hillshading with `raster-dem` source type and `hillshade` layer type [#5286](https://github.com/mapbox/mapbox-gl-js/pull/5286)
878
+ * GeoJSON sources take 2x less memory and generate tiles 20%–100% faster [#5799](https://github.com/mapbox/mapbox-gl-js/pull/5799)
879
+ * Enable data-driven values for text-font [#5698](https://github.com/mapbox/mapbox-gl-js/pull/5698)
880
+ * Enable data-driven values for heatmap-radius [#5898](https://github.com/mapbox/mapbox-gl-js/pull/5898)
881
+ * Add getter and setter for offset on marker [#5759](https://github.com/mapbox/mapbox-gl-js/pull/5759)
882
+ * Add `Map#hasImage` [#5775](https://github.com/mapbox/mapbox-gl-js/pull/5775)
883
+ * Improve typing for `==` and `!=` expressions [#5840](https://github.com/mapbox/mapbox-gl-js/pull/5840)
884
+ * Made `coalesce` expressions more useful [#5755](https://github.com/mapbox/mapbox-gl-js/issues/5755)
885
+ * Enable implicit type assertions for array types [#5738](https://github.com/mapbox/mapbox-gl-js/pull/5738)
886
+ * Improve hash control precision [#5767](https://github.com/mapbox/mapbox-gl-js/pull/5767)
887
+ * `supported()` now returns false on old IE 11 versions that don't support Web Worker blob URLs [#5801](https://github.com/mapbox/mapbox-gl-js/pull/5801)
888
+ * Remove flow globals TileJSON and Transferable [#5668](https://github.com/mapbox/mapbox-gl-js/pull/5668)
889
+ * Improve performance of image, video, and canvas sources [#5845](https://github.com/mapbox/mapbox-gl-js/pull/5845)
890
+
891
+ ### 🐛 Bug fixes
892
+
893
+ * Fix popups and markers lag during pan animation [#4670](https://github.com/mapbox/mapbox-gl-js/issues/4670)
894
+ * Fix fading of symbol layers caused by setData [#5716](https://github.com/mapbox/mapbox-gl-js/issues/5716)
895
+ * Fix behavior of `to-rgba` and `rgba` expressions [#5778](https://github.com/mapbox/mapbox-gl-js/pull/5778), [#5866](https://github.com/mapbox/mapbox-gl-js/pull/5866)
896
+ * Fix cross-fading of `*-pattern` and `line-dasharray` [#5791](https://github.com/mapbox/mapbox-gl-js/pull/5791)
897
+ * Fix `colorSpace` function property [#5843](https://github.com/mapbox/mapbox-gl-js/pull/5843)
898
+ * Fix style diffing when changing GeoJSON source properties [#5731](https://github.com/mapbox/mapbox-gl-js/issues/5731)
899
+ * Fix missing labels when zooming out from overzoomed tile [#5827](https://github.com/mapbox/mapbox-gl-js/issues/5827)
900
+ * Fix missing labels when zooming out and quickly using setData [#5837](https://github.com/mapbox/mapbox-gl-js/issues/5837)
901
+ * Handle NaN as input to step and interpolate expressions [#5757](https://github.com/mapbox/mapbox-gl-js/pull/5757)
902
+ * Clone property values on input and output [#5806](https://github.com/mapbox/mapbox-gl-js/pull/5806)
903
+ * Bump geojson-rewind dependency [#5769](https://github.com/mapbox/mapbox-gl-js/pull/5769)
904
+ * Allow setting Marker's popup before LngLat [#5893](https://github.com/mapbox/mapbox-gl-js/pull/5893)
905
+
906
+ ## 0.42.2 (November 21, 2017)
907
+
908
+ ### 🐛 Bug fixes
909
+
910
+ - Add box-sizing to the "mapboxgl-ctrl-scale"-class [#5715](https://github.com/mapbox/mapbox-gl-js/pull/5715)
911
+ - Fix rendering in Safari [#5712](https://github.com/mapbox/mapbox-gl-js/issues/5712)
912
+ - Fix "Cannot read property 'hasTransition' of undefined" error [#5714](https://github.com/mapbox/mapbox-gl-js/issues/5714)
913
+ - Fix misplaced raster tiles [#5713](https://github.com/mapbox/mapbox-gl-js/issues/5713)
914
+ - Fix raster tile fading [#5722](https://github.com/mapbox/mapbox-gl-js/issues/5722)
915
+ - Ensure that an unset filter is undefined rather than null [#5727](https://github.com/mapbox/mapbox-gl-js/pull/5727)
916
+ - Restore pitch-with-rotate to nav control [#5725](https://github.com/mapbox/mapbox-gl-js/pull/5725)
917
+ - Validate container option in map constructor [#5695](https://github.com/mapbox/mapbox-gl-js/pull/5695)
918
+ - Fix queryRenderedFeatures behavior for features displayed in multiple layers [#5172](https://github.com/mapbox/mapbox-gl-js/issues/5172)
919
+
920
+ ## 0.42.1 (November 17, 2017)
921
+
922
+ ### 🐛 Bug fixes
923
+
924
+ - Workaround for map flashing bug on Chrome 62+ with Intel Iris Graphics 6100 cards [#5704](https://github.com/mapbox/mapbox-gl-js/pull/5704)
925
+ - Rerender map when `map.showCollisionBoxes` is set to `false` [#5673](https://github.com/mapbox/mapbox-gl-js/pull/5673)
926
+ - Fix transitions from property default values [#5682](https://github.com/mapbox/mapbox-gl-js/pull/5682)
927
+ - Fix runtime updating of `heatmap-color` [#5682](https://github.com/mapbox/mapbox-gl-js/pull/5682)
928
+ - Fix mobile Safari `history.replaceState` error [#5613](https://github.com/mapbox/mapbox-gl-js/pull/5613)
929
+
930
+ ### ✨ Features and improvements
931
+
932
+ - Provide default element for Marker class [#5661](https://github.com/mapbox/mapbox-gl-js/pull/5661)
933
+
934
+ ## 0.42.0 (November 10, 2017)
935
+
936
+ ### ⚠️ Breaking changes
937
+
938
+ - Require that `heatmap-color` use expressions instead of stop functions [#5624](https://github.com/mapbox/mapbox-gl-js/issues/5624)
939
+ - Remove support for validating and migrating v6 styles
940
+ - Remove support for validating v7 styles [#5604](https://github.com/mapbox/mapbox-gl-js/pull/5604)
941
+ - Remove support for including `{tokens}` in expressions for `text-field` and `icon-image` [#5599](https://github.com/mapbox/mapbox-gl-js/issues/5599)
942
+ - Split `curve` expression into `step` and `interpolate` expressions [#5542](https://github.com/mapbox/mapbox-gl-js/pull/5542)
943
+ - Disallow interpolation in expressions for `line-dasharray` [#5519](https://github.com/mapbox/mapbox-gl-js/pull/5519)
944
+
945
+ ### ✨ Features and improvements
946
+
947
+ - Improve label collision detection [#5150](https://github.com/mapbox/mapbox-gl-js/pull/5150)
948
+ - Labels from different sources will now collide with each other
949
+ - Collisions caused by rotation and pitch are now smoothly transitioned with a fade
950
+ - Improved algorithm for fewer erroneous collisions, denser label placement, and greater label stability during rotation
951
+ - Add `sqrt` expression [#5493](https://github.com/mapbox/mapbox-gl-js/pull/5493)
952
+
953
+ ### 🐛 Bug fixes and error reporting improvements
954
+
955
+ - Fix viewport calculations for `fitBounds` when both zooming and padding change [#4846](https://github.com/mapbox/mapbox-gl-js/issues/4846)
956
+ - Fix WebGL "range out of bounds for buffer" error caused by sorted symbol layers [#5620](https://github.com/mapbox/mapbox-gl-js/issues/5620)
957
+ - Fix symbol fading across tile reloads [#5491](https://github.com/mapbox/mapbox-gl-js/issues/5491)
958
+ - Change tile rendering order to better match GL Native [#5601](https://github.com/mapbox/mapbox-gl-js/pull/5601)
959
+ - Ensure no errors are triggered when calling `queryRenderedFeatures` on a heatmap layer [#5594](https://github.com/mapbox/mapbox-gl-js/pull/5594)
960
+ - Fix bug causing `queryRenderedSymbols` to return results from different sources [#5554](https://github.com/mapbox/mapbox-gl-js/issues/5554)
961
+ - Fix CJK rendering issues [#5544](https://github.com/mapbox/mapbox-gl-js/issues/5544), [#5546](https://github.com/mapbox/mapbox-gl-js/issues/5546)
962
+ - Account for `circle-stroke-width` in `queryRenderedFeatures` [#5514](https://github.com/mapbox/mapbox-gl-js/pull/5514)
963
+ - Fix rendering of fill layers atop raster layers [#5513](https://github.com/mapbox/mapbox-gl-js/pull/5513)
964
+ - Fix rendering of circle layers with a `circle-stroke-opacity` of 0 [#5496](https://github.com/mapbox/mapbox-gl-js/issues/5496)
965
+ - Fix memory leak caused by actor callbacks [#5443](https://github.com/mapbox/mapbox-gl-js/issues/5443)
966
+ - Fix source cache size for raster sources with tile sizes other than 512px [#4313](https://github.com/mapbox/mapbox-gl-js/issues/4313)
967
+ - Validate that zoom expressions only appear at the top level of an expression [#5609](https://github.com/mapbox/mapbox-gl-js/issues/5609)
968
+ - Validate that step and interpolate expressions don't have any duplicate stops [#5605](https://github.com/mapbox/mapbox-gl-js/issues/5605)
969
+ - Fix rendering for `icon-text-fit` with a data-driven `text-size` [#5632](https://github.com/mapbox/mapbox-gl-js/pull/5632)
970
+ - Improve validation to catch uses of deprecated function syntax [#5667](https://github.com/mapbox/mapbox-gl-js/pull/5667)
971
+ - Permit altitude coordinates in `position` field in GeoJSON [#5608](https://github.com/mapbox/mapbox-gl-js/pull/5608)
972
+
973
+ ## 0.41.0 (October 11, 2017)
974
+
975
+ ### :warning: Breaking changes
976
+ - Removed support for paint classes [#3643](https://github.com/mapbox/mapbox-gl-js/pull/3643). Instead, use runtime styling APIs or `Map#setStyle`.
977
+ - Reverted the `canvas` source `contextType` option added in 0.40.0 [#5449](https://github.com/mapbox/mapbox-gl-js/pull/5449)
978
+
979
+ ### :bug: Bug fixes
980
+ - Clip raster tiles to avoid tile overlap [#5105](https://github.com/mapbox/mapbox-gl-js/pull/5105)
981
+ - Guard for offset edgecase in flyTo [#5331](https://github.com/mapbox/mapbox-gl-js/pull/5331)
982
+ - Ensure the map is updated after the sprite loads [#5367](https://github.com/mapbox/mapbox-gl-js/pull/5367)
983
+ - Limit animation duration on flyTo with maxDuration option [#5349](https://github.com/mapbox/mapbox-gl-js/pull/5349)
984
+ - Make double-tapping on make zoom in by a factor of 2 on iOS [#5274](https://github.com/mapbox/mapbox-gl-js/pull/5274)
985
+ - Fix rendering error with translucent raster tiles [#5380](https://github.com/mapbox/mapbox-gl-js/pull/5380)
986
+ - Error if invalid 'before' argument is passed to Map#addLayer [#5401](https://github.com/mapbox/mapbox-gl-js/pull/5401)
987
+ - Revert CanvasSource intermediary image buffer fix [#5449](https://github.com/mapbox/mapbox-gl-js/pull/5449)
988
+
989
+ ### :sparkles: Features and improvements
990
+ - Use setData operation when diffing geojson sources [#5332](https://github.com/mapbox/mapbox-gl-js/pull/5332)
991
+ - Return early from draw calls on layers where opacity=0 [#5429](https://github.com/mapbox/mapbox-gl-js/pull/5429)
992
+ - A [heatmap](https://www.mapbox.com/mapbox-gl-js/example/heatmap-layer/) layer type is now available. This layer type allows you to visualize and explore massive datasets of points, reflecting the shape and density of data well while also looking beautiful. See [the blog post](https://blog.mapbox.com/sneak-peek-at-heatmaps-in-mapbox-gl-73b41d4b16ae) for further details.
993
+ ![](https://cdn-images-1.medium.com/max/1600/1*Dme5MAgdA3pYdTRHUQzvLw.png)
994
+ - The value of a style property or filter can now be an [expression](http://www.mapbox.com/mapbox-gl-js/style-spec/#expressions). Expressions are a way of doing data-driven and zoom-driven styling that provides more flexibility and control, and unifies property and filter syntax.
995
+
996
+ Previously, data-driven and zoom-driven styling relied on stop functions: you specify a feature property and a set of input-output pairs that essentially define a “scale” for how the style should be calculated based on the feature property. For example, the following would set circle colors on a green-to-red scale based on the value of `feature.properties.population`:
997
+
998
+ ```
999
+ "circle-color": {
1000
+ "property": "population",
1001
+ "stops": [
1002
+ [0, "green"],
1003
+ [1000000, "red"]
1004
+ ]
1005
+ }
1006
+ ```
1007
+
1008
+ This approach is powerful, but we’ve seen a number of use cases that stop functions don't satisfy. Expressions provide the flexibility to address use cases like these:
1009
+
1010
+ **Multiple feature properties**
1011
+ Using more than one feature property to calculate a given style property. E.g., styling land polygon colors based on both `feature.properties.land_use_category` and `feature.properties.elevation`.
1012
+
1013
+ **Arithmetic**
1014
+ For some use cases it’s necessary to do some arithmetic on the input data. One example is sizing circles to represent quantitative data. Since a circle’s visual size on the screen is really its area (and A=πr^2), the right way to scale `circle-radius` is `square_root(feature.properties.input_data_value)`. Another example is unit conversions: feature data may include properties that are in some particular unit. Displaying such data in units appropriate to, say, a user’s preference or location, requires being able to do simple arithmetic (multiplication, division) on whatever value is in the data.
1015
+
1016
+ **Conditional logic**
1017
+ This is a big one: basic if-then logic, for example to decide exactly what text to display for a label based on which properties are available in the feature or even the length of the name. A key example of this is properly supporting bilingual labels, where we have to decide whether to show local + English, local-only, or English-only, based on the data that’s available for each feature.
1018
+
1019
+ **String manipulation**
1020
+ More dynamic control over label text with things like uppercase/lowercase/title case transforms, localized number formatting, etc. Without this functionality, crafting and iterating on label content entails a large data-prep burden.
1021
+
1022
+ **Filters**
1023
+ Style layer filters had similar limitations. Moreover, they use a different syntax, even though their job is very similar to that of data-driven styling functions: filters say, “here’s how to look at a feature and decide whether to draw it,” and data-driven style functions say, “here’s how to look at a feature and decide how to size/color/place it.” Expressions provide a unified syntax for defining parts of a style that need to be calculated dynamically from feature data.
1024
+
1025
+ For information on the syntax and behavior of expressions, please see [the documentation](http://www.mapbox.com/mapbox-gl-js/style-spec/#expressions).
1026
+
1027
+ ### :wrench: Development workflow improvements
1028
+ - Made the performance benchmarking runner more informative and statistically robust
1029
+
1030
+ ## 0.40.1 (September 18, 2017)
1031
+
1032
+ ### :bug: Bug fixes
1033
+ - Fix bug causing flicker when zooming in on overzoomed tiles [#5295](https://github.com/mapbox/mapbox-gl-js/pull/5295)
1034
+ - Remove erroneous call to Tile#redoPlacement for zoom-only or low pitch camera changes [#5284](https://github.com/mapbox/mapbox-gl-js/pull/5284)
1035
+ - Fix bug where `CanvasSource` coordinates were flipped and improve performance for non-animated `CanvasSource`s [#5303](https://github.com/mapbox/mapbox-gl-js/pull/5303)
1036
+ - Fix bug causing map not to render on some cases on Internet Explorer 11 [#5321](https://github.com/mapbox/mapbox-gl-js/pull/5321)
1037
+ - Remove upper limit on `fill-extrusion-height` property [#5320](https://github.com/mapbox/mapbox-gl-js/pull/5320)
1038
+
1039
+ ## 0.40.0 (September 13, 2017)
1040
+
1041
+ ### :warning: Breaking changes
1042
+ - `Map#addImage` now requires the image as an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and
1043
+ `data` properties with the same format as `ImageData`. It no longer accepts a raw `ArrayBufferView` in the second
1044
+ argument and `width` and `height` options in the third argument.
1045
+ - `canvas` sources now require a `contextType` option specifying the drawing context associated with the source canvas. [#5155](https://github.com/mapbox/mapbox-gl-js/pull/5155)
1046
+
1047
+
1048
+ ### :sparkles: Features and improvements
1049
+ - Correct rendering for multiple `fill-extrusion` layers on the same map [#5101](https://github.com/mapbox/mapbox-gl-js/pull/5101)
1050
+ - Add an `icon-anchor` property to symbol layers [#5183](https://github.com/mapbox/mapbox-gl-js/pull/5183)
1051
+ - Add a per-map `transformRequest` option, allowing users to provide a callback that transforms resource request URLs [#5021](https://github.com/mapbox/mapbox-gl-js/pull/5021)
1052
+ - Add data-driven styling support for
1053
+ - `text-max-width` [#5067](https://github.com/mapbox/mapbox-gl-js/pull/5067)
1054
+ - `text-letter-spacing` [#5071](https://github.com/mapbox/mapbox-gl-js/pull/5071)
1055
+ - `line-join` [#5020](https://github.com/mapbox/mapbox-gl-js/pull/5020)
1056
+ - Add support for SDF icons in `Map#addImage()` [#5181](https://github.com/mapbox/mapbox-gl-js/pull/5181)
1057
+ - Added nautical miles unit to ScaleControl [#5238](https://github.com/mapbox/mapbox-gl-js/pull/5238) (h/t @fmairesse)
1058
+ - Eliminate the map-wide limit on the number of glyphs and sprites that may be used in a style [#141](https://github.com/mapbox/mapbox-gl-js/issues/141). (Fixed by [#5190](https://github.com/mapbox/mapbox-gl-js/pull/5190), see also [mapbox-gl-native#9213](https://github.com/mapbox/mapbox-gl-native/pull/9213)
1059
+ - Numerous performance optimizations (including [#5108](https://github.com/mapbox/mapbox-gl-js/pull/5108) h/t @pirxpilot)
1060
+
1061
+
1062
+ ### :bug: Bug fixes
1063
+ - Add missing documentation for mouseenter, mouseover, mouseleave events [#4772](https://github.com/mapbox/mapbox-gl-js/issues/4772)
1064
+ - Add missing documentation for `Marker#getElement()` method [#5242](https://github.com/mapbox/mapbox-gl-js/pull/5242)
1065
+ - Fix bug wherein removing canvas source with animate=true leaves map in render loop [#5097](https://github.com/mapbox/mapbox-gl-js/issues/5097)
1066
+ - Fix fullscreen detection on Firefox [#5272](https://github.com/mapbox/mapbox-gl-js/pull/5272)
1067
+ - Fix z-fighting on overlapping fills within the same layer [#3320](https://github.com/mapbox/mapbox-gl-js/issues/3320)
1068
+ - Fix handling of fractional values for `layer.minzoom` [#2929](https://github.com/mapbox/mapbox-gl-js/issues/2929)
1069
+ - Clarify coordinate ordering in documentation for `center` option [#5042](https://github.com/mapbox/mapbox-gl-js/pull/5042) (h/t @karthikb351)
1070
+ - Fix output of stop functions where two stops have the same input value [#5020](https://github.com/mapbox/mapbox-gl-js/pull/5020) (h/t @edpop )
1071
+ - Fix bug wherein using `Map#addLayer()` with an inline source would mutate its input [#4040](https://github.com/mapbox/mapbox-gl-js/issues/4040)
1072
+ - Fix invalid css keyframes selector [#5075](https://github.com/mapbox/mapbox-gl-js/pull/5075) (h/t @aar0nr)
1073
+ - Fix GPU-specific bug wherein canvas sources caused an error [#4262](https://github.com/mapbox/mapbox-gl-js/issues/4262)
1074
+ - Fix a race condition in symbol layer handling that caused sporadic uncaught errors [#5185](https://github.com/mapbox/mapbox-gl-js/pull/5185)
1075
+ - Fix bug causing line labels to render incorrectly on overzoomed tiles [#5120](https://github.com/mapbox/mapbox-gl-js/pull/5120)
1076
+ - Fix bug wherein `NavigationControl` triggered mouse events unexpectedly [#5148](https://github.com/mapbox/mapbox-gl-js/issues/5148)
1077
+ - Fix bug wherein clicking on the `NavigationControl` compass caused an error in IE 11 [#4784](https://github.com/mapbox/mapbox-gl-js/issues/4784)
1078
+ - Remove dependency on GPL-3-licensed `fast-stable-stringify` module [#5152](https://github.com/mapbox/mapbox-gl-js/issues/5152)
1079
+ - Fix bug wherein layer-specific an event listener produced an error after its target layer was removed from the map [#5145](https://github.com/mapbox/mapbox-gl-js/issues/5145)
1080
+ - Fix `Marker#togglePopup()` failing to return the marker instance [#5116](https://github.com/mapbox/mapbox-gl-js/issues/5116)
1081
+ - Fix bug wherein a marker's position failed to adapt to the marker element's size changing [#5133](https://github.com/mapbox/mapbox-gl-js/issues/5133)
1082
+ - Fix rendering bug affecting Broadcom GPUs [#5073](https://github.com/mapbox/mapbox-gl-js/pull/5073)
1083
+
1084
+ ### :wrench: Development workflow improvements
1085
+ - Add (and now require) Flow type annotations throughout the majority of the codebase.
1086
+ - Migrate to CircleCI 2.0 [#4939](https://github.com/mapbox/mapbox-gl-js/pull/4939)
1087
+
1088
+
1089
+ ## 0.39.1 (July 24, 2017)
1090
+
1091
+ ### :bug: Bug fixes
1092
+ - Fix packaging issue in 0.39.0 [#5025](https://github.com/mapbox/mapbox-gl-js/issues/5025)
1093
+ - Correctly evaluate enum-based identity functions [#5023](https://github.com/mapbox/mapbox-gl-js/issues/5023)
1094
+
1095
+ ## 0.39.0 (July 21, 2017)
1096
+
1097
+ ### :warning: Breaking changes
1098
+
1099
+ - `GeolocateControl` breaking changes #4479
1100
+ * The option `watchPosition` has been replaced with `trackUserLocation`
1101
+ * The camera operation has changed from `jumpTo` (not animated) to `fitBounds` (animated). An effect of this is the map pitch is no longer reset, although the bearing is still reset to 0.
1102
+ * The accuracy of the geolocation provided by the device is used to set the view (previously it was fixed at zoom level 17). The `maxZoom` can be controlled via the new `fitBoundsOptions` option (defaults to 15).
1103
+ - Anchor `Marker`s at their center by default #5019 @andrewharvey
1104
+ - Increase `significantRotateThreshold` for the `TouchZoomRotateHandler` #4971, @dagjomar
1105
+
1106
+ ### :sparkles: Features and improvements
1107
+ - Improve performance of updating GeoJSON sources #4069, @ezheidtmann
1108
+ - Improve rendering speed of extrusion layers #4818
1109
+ - Improve line label legibility in pitched views #4781
1110
+ - Improve line label legibility on curved lines #4853
1111
+ - Add user location tracking capability to `GeolocateControl` #4479, @andrewharvey
1112
+ * New option `showUserLocation` to draw a "dot" as a `Marker` on the map at the user's location
1113
+ * An active lock and background state are introduced with `trackUserLocation`. When in active lock the camera will update to follow the user location, however if the camera is changed by the API or UI then the control will enter the background state where it won't update the camera to follow the user location.
1114
+ * New option `fitBoundsOptions` to control the camera operation
1115
+ * New `trackuserlocationstart` and `trackuserlocationend` events
1116
+ * New `LngLat.toBounds` method to extend a point location by a given radius to a `LngLatBounds` object
1117
+ - Include main CSS file in `package.json` #4809, @tomscholz
1118
+ - Add property function (data-driven styling) support for `line-width` #4773
1119
+ - Add property function (data-driven styling) support for `text-anchor` #4997
1120
+ - Add property function (data-driven styling) support for `text-justify` #5000
1121
+ - Add `maxTileCacheSize` option #4778, @jczaplew
1122
+ - Add new `icon-pitch-alignment` and `circle-pitch-alignment` properties #4869 #4871
1123
+ - Add `Map#getMaxBounds` method #4890, @andrewharvey @lamuertepeluda
1124
+ - Add option (`localIdeographFontFamily`) to use TinySDF to avoid loading expensive CJK glyphs #4895
1125
+ - If `config.API_URL` includes a path prepend it to the request URL #4995
1126
+ - Bump `supercluster` version to expose `cluster_id` property on clustered sources #5002
1127
+
1128
+ ### :bug: Bug fixes
1129
+ - Do not display `FullscreenControl` on unsupported devices #4838, @stepankuzmin
1130
+ - Fix yarn build on Windows machines #4887
1131
+ - Prevent potential memory leaks by dispatching `loadData` to the same worker every time #4877
1132
+ - Fix bug preventing the rtlTextPlugin from loading before the initial style `load` #4870
1133
+ - Fix bug causing runtime-stying to not take effect in some situations #4893
1134
+ - Prevent requests of vertical glyphs for labels that can't be verticalized #4720
1135
+ - Fix character detection for Zanabazar Square #4940
1136
+ - Fix `LogoControl` logic to update correctly, and hide the `<div>` instead of removing it from the DOM when it is not needed #4842
1137
+ - Fix `GeoJSONSource#serialize` to include all options
1138
+ - Fix error handling in `GlyphSource#getSimpleGlyphs`#4992
1139
+ - Fix bug causing `setStyle` to reload raster tiles #4852
1140
+ - Fix bug causing symbol layers not to render on devices with non-integer device pixel ratios #4989
1141
+ - Fix bug where `Map#queryRenderedFeatures` would error when returning no results #4993
1142
+ - Fix bug where `Map#areTilesLoaded` would always be false on `sourcedata` events for reloading tiles #4987
1143
+ - Fix bug causing categorical property functions to error on non-ascending order stops #4996
1144
+
1145
+ ### :hammer_and_wrench: Development workflow changes
1146
+ - Use flow to type much of the code base #4629 #4903 #4909 #4910 #4911 #4913 #4915 #4918 #4932 #4933 #4948 #4949 #4955 #4966 #4967 #4973 :muscle: @jfirebaugh @vicapow
1147
+ - Use style specification to generate flow type #4958
1148
+ - Explicitly list which files to publish in `package.json` #4819 @tomscholz
1149
+ - Move render test ignores to a separate file #4977
1150
+ - Add code of conduct #5015 :sparkling_heart:
1151
+
1152
+ ## 0.38.0 (June 9, 2017)
1153
+
1154
+ #### New features :sparkles:
1155
+
1156
+ - Attenuate label size scaling with distance, improving readability of pitched maps [#4547](https://github.com/mapbox/mapbox-gl-js/pull/4547)
1157
+
1158
+ #### Bug fixes :beetle:
1159
+
1160
+ - Skip rendering for patterned layers when pattern is missing [#4687](https://github.com/mapbox/mapbox-gl-js/pull/4687)
1161
+ - Fix bug with map failing to rerender after `webglcontextlost` event [#4725](https://github.com/mapbox/mapbox-gl-js/pull/4725) @cdawi
1162
+ - Clamp zoom level in `flyTo` to within the map's specified min- and maxzoom to prevent undefined behavior [#4726](https://github.com/mapbox/mapbox-gl-js/pull/4726) @ IvanSanchez
1163
+ - Fix wordmark rendering in IE [#4741](https://github.com/mapbox/mapbox-gl-js/pull/4741)
1164
+ - Fix slight pixelwise symbol rendering bugs caused by incorrect sprite calculations [#4737](https://github.com/mapbox/mapbox-gl-js/pull/4737)
1165
+ - Prevent exceptions thrown by certain `flyTo` calls [#4761](https://github.com/mapbox/mapbox-gl-js/pull/4761)
1166
+ - Fix "Improve this map" link [#4685](https://github.com/mapbox/mapbox-gl-js/pull/4685)
1167
+ - Tweak `queryRenderedSymbols` logic to better account for pitch scaling [#4792](https://github.com/mapbox/mapbox-gl-js/pull/4792)
1168
+ - Fix for symbol layers sometimes failing to render, most frequently in Safari [#4795](https://github.com/mapbox/mapbox-gl-js/pull/4795)
1169
+ - Apply `text-keep-upright` after `text-offset` to keep labels upright when intended [#4779](https://github.com/mapbox/mapbox-gl-js/pull/4779) **[Potentially breaking :warning: but considered a bugfix]**
1170
+ - Prevent exceptions thrown by empty GeoJSON tiles [4803](https://github.com/mapbox/mapbox-gl-js/pull/4803)
1171
+
1172
+ #### Accessibility improvements :sound:
1173
+
1174
+ - Add `aria-label` to popup close button [#4799](https://github.com/mapbox/mapbox-gl-js/pull/4799) @andrewharvey
1175
+
1176
+ #### Development workflow + testing improvements :wrench:
1177
+
1178
+ - Fix equality assertion bug in tests [#4731](https://github.com/mapbox/mapbox-gl-js/pull/4731) @IvanSanchez
1179
+ - Benchmark results page improvements [#4746](https://github.com/mapbox/mapbox-gl-js/pull/4746)
1180
+ - Require node version >=6.4.0, enabling the use of more ES6 features [#4752](https://github.com/mapbox/mapbox-gl-js/pull/4752)
1181
+ - Document missing `pitchWithRotate` option [#4800](https://github.com/mapbox/mapbox-gl-js/pull/4800) @simast
1182
+ - Move Github-specific Markdown files into subdirectory [#4806](https://github.com/mapbox/mapbox-gl-js/pull/4806) @tomscholz
1183
+
1184
+ ## 0.37.0 (May 2nd, 2017)
1185
+
1186
+ #### :warning: Breaking changes
1187
+
1188
+ - Removed `LngLat#wrapToBestWorld`
1189
+
1190
+ #### New features :rocket:
1191
+
1192
+ - Improve popup/marker positioning #4577
1193
+ - Add `Map#isStyleLoaded` and `Map#areTilesLoaded` events #4321
1194
+ - Support offline sprites using `file:` protocol #4649 @oscarfonts
1195
+
1196
+ #### Bug fixes :bug:
1197
+
1198
+ - Fix fullscreen control in Firefox #4666
1199
+ - Fix rendering artifacts that caused tile boundaries to be visible in some cases #4636
1200
+ - Fix default calculation for categorical zoom-and-property functions #4657
1201
+ - Fix scaling of images on retina screens #4645
1202
+ - Rendering error when a transparent image is added via `Map#addImage` #4644
1203
+ - Fix an issue with rendering lines with duplicate points #4634
1204
+ - Fix error when switching from data-driven styles to a constant paint value #4611
1205
+ - Add check to make sure invalid bounds on tilejson don't error out #4641
1206
+
1207
+ #### Development workflow improvements :computer:
1208
+
1209
+ - Add flowtype interfaces and definitions @vicapow
1210
+ - Add stylelinting to ensure `mapboxgl-` prefix on all classes #4584 @asantos3026
1211
+
1212
+ ## 0.36.0 (April 19, 2017)
1213
+
1214
+ #### New features :sparkles:
1215
+
1216
+ - Replace LogoControl logo with the new Mapbox logo #4598
1217
+
1218
+ #### Bug fixes :bug:
1219
+
1220
+ - Fix bug with the BoxZoomHandler that made it glitchy if it is enabled after the DragPanHandler #4528
1221
+ - Fix undefined behavior in `fill_outline` shaders #4600
1222
+ - Fix `Camera#easeTo` interpolation on pitched maps #4540
1223
+ - Choose property function interpolation method by the `property`'s type #4614
1224
+
1225
+ #### Development workflow improvements :nerd_face:
1226
+
1227
+ - Fix crash on missing `style.json` in integration tests
1228
+ - `gl-style-composite` is now executable in line with the other tools @andrewharvey #4595
1229
+ - `gl-style-composite` utility now throws an error if a name conflict would occur between layers @andrewharvey #4595
1230
+
1231
+ ## 0.35.1 (April 12, 2017)
1232
+
1233
+ #### Bug fixes :bug:
1234
+
1235
+ - Add `.json` extension to style-spec `require` statements for webpack compatibility #4563 @orangemug
1236
+ - Fix documentation type for `Map#fitBounde` #4569 @andrewharvey
1237
+ - Fix bug causing {Image,Video,Canvas}Source to throw exception if latitude is outside of +/-85.05113 #4574
1238
+ - Fix bug causing overzoomed raster tiles to disappear from map #4567
1239
+ - Fix bug causing queryRenderedFeatures to crash on polygon features that have an `id` field. #4581
1240
+
1241
+ ## 0.35.0 (April 7, 2017)
1242
+
1243
+ #### New features :rocket:
1244
+ - Use anisotropic filtering to improve rendering of raster tiles on pitched maps #1064
1245
+ - Add `pitchstart` and `pitchend` events #2449
1246
+ - Add an optional `layers` parameter to `Map#on` #1002
1247
+ - Add data-driven styling support for `text-offset` #4495
1248
+ - Add data-driven styling support for `text-rotate` #3516
1249
+ - Add data-driven styling support for `icon-image` #4304
1250
+ - Add data-driven styling support for `{text,icon}-size` #4455
1251
+
1252
+ #### Bug fixes :bug:
1253
+ - Suppress error messages in JS console due to missing tiles #1800
1254
+ - Fix bug wherein `GeoJSONSource#setData()` could cause unnecessary DOM updates #4447
1255
+ - Fix bug wherein `Map#flyTo` did not respect the `renderWorldCopies` setting #4449
1256
+ - Fix regression in browserify support # 4453
1257
+ - Fix bug causing poor touch event behavior on mobile devices #4259
1258
+ - Fix bug wherein duplicate stops in property functions could cause an infinite loop #4498
1259
+ - Respect image height/width in `addImage` api #4531
1260
+ - Fix bug preventing correct behavior of `shift+zoom` #3334
1261
+ - Fix bug preventing image source from rendering when coordinate area is too large #4550
1262
+ - Show image source on horizontally wrapped worlds #4555
1263
+ - Fix bug in the handling of `refreshedExpiredTiles` option #4549
1264
+ - Support the TileJSON `bounds` property #1775
1265
+
1266
+ #### Development workflow improvements :computer:
1267
+ - Upgrade flow to 0.42.0 (#4500)
1268
+
1269
+
1270
+ ## 0.34.0 (March 17, 2017)
1271
+
1272
+ #### New features :rocket:
1273
+ - Add `Map#addImage` and `Map#removeImage` API to allow adding icon images at runtime #4404
1274
+ - Simplify non-browserify bundler usage by making the distribution build the main entrypoint #4423
1275
+
1276
+ #### Bug fixes :bug:
1277
+ - Fix issue where coincident start/end points of LineStrings were incorrectly rendered as joined #4413
1278
+ - Fix bug causing `queryRenderedFeatures` to fail in cases where both multiple sources and data-driven paint properties were present #4417
1279
+ - Fix bug where tile request errors caused `map.loaded()` to incorrectly return `false` #4425
1280
+
1281
+ #### Testing improvements :white_check_mark:
1282
+ - Improve test coverage across several core modules #4432 #4431 #4422 #4244 :bowing_man:
1283
+
1284
+ ## 0.33.1 (March 10, 2017)
1285
+
1286
+ #### Bug fixes :bug:
1287
+ - Prevent Mapbox logo from being added to the map more than once #4386
1288
+ - Add `type='button'` to `FullscreenControl` to prevent button from acting as a form submit #4397
1289
+ - Fix issue where map would continue to rotate if `Ctrl` key is released before the click during a `DragRotate` event #4389
1290
+ - Remove double `options.easing` description from the `Map#fitBounds` documentation #4402
1291
+
1292
+
1293
+ ## 0.33.0 (March 8, 2017)
1294
+
1295
+ #### :warning: Breaking changes
1296
+ - Automatically add Mapbox wordmark when required by Mapbox TOS #3933
1297
+ - Increase default `maxZoom` from 20 to 22 #4333
1298
+ - Deprecate `tiledata` and `tiledataloading` events in favor of `sourcedata` and `sourcedataloading`. #4347
1299
+ - `mapboxgl.util` is no longer exported #1408
1300
+ - `"type": "categorical"` is now required for all categorical functions. Previously, some forms of "implicitly" categorical functions worked, and others did not. #3717
1301
+
1302
+ #### :white_check_mark: New features
1303
+ - Add property functions support for most symbol paint properties #4074, #4186, #4226
1304
+ - Add ability to specify default property value for undefined or invalid property values used in property functions. #4175
1305
+ - Improve `Map#fitBounds` to accept different values for top, bottom, left, and right `padding` #3890
1306
+ - Add a `FullscreenControl` for displaying a fullscreen map #3977
1307
+
1308
+ #### :beetle: Bug fixes
1309
+ - Fix validation error on categorical zoom-and-property functions #4220
1310
+ - Fix bug causing expired resources to be re-requested causing an infinite loop #4255
1311
+ - Fix problem where `MapDataEvent#isSourceLoaded` always returned false #4254
1312
+ - Resolve an issue where tiles in the source cache were prematurely deleted, resulting in tiles flickering when zooming in and out and #4311
1313
+ - Make sure `MapEventData` is passed through on calls `Map#flyTo` #4342
1314
+ - Fix incorrect returned values for `Map#isMoving` #4350
1315
+ - Fix categorical functions not allowing boolean stop domain values #4195
1316
+ - Fix piecewise-constant functions to allow non-integer zoom levels. #4196
1317
+ - Fix issues with `$id` in filters #4236 #4237
1318
+ - Fix a race condition with polygon centroid algorithm causing tiles not to load in some cases. #4273
1319
+ - Throw a meaningful error when giving non-array `layers` parameter to `queryRenderedFeatures` #4331
1320
+ - Throw a meaningful error when supplying invalid `minZoom` and `maxZoom` values #4324
1321
+ - Fix a memory leak when using the RTL Text plugin #4248
1322
+
1323
+ #### Dev workflow changes
1324
+ - Merged the [Mapbox GL style specification](https://github.com/mapbox/mapbox-gl-style-spec) repo to this one (now under `src/style-spec` and `test/unit/style-spec`).
1325
+
1326
+ ## 0.32.1 (Jan 26, 2017)
1327
+
1328
+ #### Bug Fixes
1329
+
1330
+ - Fix bug causing [`mapbox-gl-rtl-text` plugin](https://github.com/mapbox/mapbox-gl-rtl-text) to not work #4055
1331
+
1332
+ ## 0.32.0 (Jan 26, 2017)
1333
+
1334
+ #### Deprecation Notices
1335
+
1336
+ - [Style classes](https://www.mapbox.com/mapbox-gl-style-spec/#layer-paint.*) are deprecated and will be removed in an upcoming release of Mapbox GL JS.
1337
+
1338
+ #### New Features
1339
+
1340
+ - Add `Map#isSourceLoaded` method #4033
1341
+ - Automatically reload tiles based on their `Expires` and `Cache-Control` HTTP headers #3944
1342
+ - Add `around=center` option to `scrollZoom` and `touchZoomRotate` interaction handlers #3876
1343
+ - Add support for [`mapbox-gl-rtl-text` plugin](https://github.com/mapbox/mapbox-gl-rtl-text) to support right-to-left scripts #3758
1344
+ - Add `canvas` source type #3765
1345
+ - Add `Map#isMoving` method #2792
1346
+
1347
+ #### Bug Fixes
1348
+
1349
+ - Fix bug causing garbled text on zoom #3962
1350
+ - Fix bug causing crash in Firefox and Mobile Safari when rendering a large map #4037
1351
+ - Fix bug causing raster tiles to flicker during zoom #2467
1352
+ - Fix bug causing exception when unsetting and resetting fill-outline-color #3657
1353
+ - Fix memory leak when removing raster sources #3951
1354
+ - Fix bug causing exception when when zooming in / out on empty GeoJSON tile #3985
1355
+ - Fix line join artifacts at very sharp angles #4008
1356
+
1357
+ ## 0.31.0 (Jan 10 2017)
1358
+
1359
+ #### New Features
1360
+
1361
+ - Add `renderWorldCopies` option to the `Map` constructor to give users control over whether multiple worlds are rendered in a map #3885
1362
+
1363
+ #### Bug Fixes
1364
+
1365
+ - Fix performance regression triggered when `Map` pitch or bearing is changed #3938
1366
+ - Fix null pointer exception caused by trying to clear an `undefined` source #3903
1367
+
1368
+ #### Miscellaneous
1369
+
1370
+ - Incorporate integration tests formerly at [`mapbox-gl-test-suite`](https://github.com/mapbox/mapbox-gl-test-suite) into this repository #3834
1371
+
1372
+ ## 0.30.0 (Jan 5 2017)
1373
+
1374
+ #### New Features
1375
+
1376
+ - Fire an error when map canvas is larger than allowed by `gl.MAX_RENDERBUFFER_SIZE` #2893
1377
+ - Improve error messages when referencing a nonexistent layer id #2597
1378
+ - Fire an error when layer uses a `geojson` source and specifies a `source-layer` #3896
1379
+ - Add inline source declaration syntax #3857
1380
+ - Improve line breaking behavior #3887
1381
+
1382
+ #### Performance Improvements
1383
+
1384
+ - Improve `Map#setStyle` performance in some cases #3853
1385
+
1386
+ #### Bug Fixes
1387
+
1388
+ - Fix unexpected popup positioning when some offsets are unspecified #3367
1389
+ - Fix incorrect interpolation in functions #3838
1390
+ - Fix incorrect opacity when multiple backgrounds are rendered #3819
1391
+ - Fix exception thrown when instantiating geolocation control in Safari #3844
1392
+ - Fix exception thrown when setting `showTileBoundaries` with no sources #3849
1393
+ - Fix incorrect rendering of transparent parts of raster layers in some cases #3723
1394
+ - Fix non-terminating render loop when zooming in in some cases #3399
1395
+
1396
+ ## 0.29.0 (December 20 2016)
1397
+
1398
+ #### New Features
1399
+
1400
+ - Add support for property functions for many style properties on line layers #3033
1401
+ - Make `Map#setStyle` smoothly transition to the new style #3621
1402
+ - Add `styledata`, `sourcedata`, `styledataloading`, and `sourcedataloading` events
1403
+ - Add `isSourceLoaded` and `source` properties to `MapDataEvent` #3590
1404
+ - Remove "max zoom" cap of 20 #3683
1405
+ - Add `circle-stroke-*` style properties #3672
1406
+ - Add a more helpful error message when the specified `container` element doesn't exist #3719
1407
+ - Add `watchPosition` option to `GeolocateControl` #3739
1408
+ - Add `positionOptions` option to `GeolocateControl` #3739
1409
+ - Add `aria-label` to map canvas #3782
1410
+ - Adjust multipoint symbol rendering behavior #3763
1411
+ - Add support for property functions for `icon-offset` #3791
1412
+ - Improved antialiasing on pitched lines #3790
1413
+ - Allow attribution control to collapse to an ⓘ button on smaller screens #3783
1414
+ - Improve line breaking algorithm #3743
1415
+
1416
+ #### Performance Improvements
1417
+
1418
+ - Fix memory leak when calling `Map#removeSource` #3602
1419
+ - Reduce bundle size by adding custom build of `gl-matrix` #3734
1420
+ - Improve performance of projection code #3721
1421
+ - Improve performance of style function evaluation #3816
1422
+
1423
+ #### Bug fixes
1424
+
1425
+ - Fix exception thrown when using `line-color` property functions #3639
1426
+ - Fix exception thrown when removing a layer and then adding another layer with the same id but different type #3655
1427
+ - Fix exception thrown when passing a single point to `Map#fitBounds` #3655
1428
+ - Fix exception thrown occasionally during rapid map mutations #3681
1429
+ - Fix rendering defects on pitch=0 on some systems #3740
1430
+ - Fix unnecessary CPU usage when displaying a raster layer #3764
1431
+ - Fix bug causing sprite after `Map#setStyle` #3829
1432
+ - Fix bug preventing `Map` from emitting a `contextmenu` event on Windows browsers #3822
1433
+
1434
+ ## 0.28.0 (November 17 2016)
1435
+
1436
+ #### New features and improvements
1437
+
1438
+ - Performance improvements for `Map#addLayer` and `Map#removeLayer` #3584
1439
+ - Add method for changing layer order at runtime - `Map#moveLayer` #3584
1440
+ - Update vertical punctuation logic to Unicode 9.0 standard #3608
1441
+
1442
+ #### Bug fixes
1443
+
1444
+ - Fix data-driven `fill-opacity` rendering when using a `fill-pattern` #3598
1445
+ - Fix line rendering artifacts #3627
1446
+ - Fix incorrect rendering of opaque fills on top of transparent fills #2628
1447
+ - Prevent `AssertionErrors` from pitching raster layers by only calling `Worker#redoPlacement` on vector and GeoJSON sources #3624
1448
+ - Restore IE11 compatability #3635
1449
+ - Fix symbol placement for cached tiles #3637
1450
+
1451
+
1452
+ ## 0.27.0 (November 11 2016)
1453
+
1454
+ #### ⚠️ Breaking changes ⚠️
1455
+
1456
+ - Replace `fill-extrude-height` and `fill-extrude-base` properties of `fill` render type with a separate `fill-extrusion` type (with corresponding `fill-extrusion-height` and `fill-extrusion-base` properties), solving problems with render parity and runtime switching between flat and extruded fills. https://github.com/mapbox/mapbox-gl-style-spec/issues/554
1457
+ - Change the units for extrusion height properties (`fill-extrusion-height`, `fill-extrusion-base`) from "magic numbers" to meters. #3509
1458
+ - Remove `mapboxgl.Control` class and change the way custom controls should be implemented. #3497
1459
+ - Remove `mapboxgl.util` functions: `inherit`, `extendAll`, `debounce`, `coalesce`, `startsWith`, `supportsGeolocation`. #3441 #3571
1460
+ - **`mapboxgl.util` is deprecated** and will be removed in the next release. #1408
1461
+
1462
+ #### New features and improvements
1463
+
1464
+ - Tons of **performance improvements** that combined make rendering **up to 3 times faster**, especially for complex styles. #3485 #3489 #3490 #3491 #3498 #3499 #3501 #3510 #3514 #3515 #3486 #3527 #3574 ⚡️⚡️⚡️
1465
+ - 🈯 Added **vertical text writing mode** for languages that support it. #3438
1466
+ - 🈯 Improved **line breaking of Chinese and Japanese text** in point-placed labels. #3420
1467
+ - Reduce the default number of worker threads (`mapboxgl.workerCount`) for better performance. #3565
1468
+ - Automatically use `categorical` style function type when input values are strings. #3384
1469
+ - Improve control buttons accessibility. #3492
1470
+ - Remove geolocation button if geolocation is disabled (e.g. the page is not served through `https`). #3571
1471
+ - Added `Map#getMaxZoom` and `Map#getMinZoom` methods #3592
1472
+
1473
+ #### Bugfixes
1474
+
1475
+ - Fix several line dash rendering bugs. #3451
1476
+ - Fix intermittent map flicker when using image sources. #3522
1477
+ - Fix incorrect rendering of semitransparent `background` layers. #3521
1478
+ - Fix broken `raster-fade-duration` property. #3532
1479
+ - Fix handling of extrusion heights with negative values (by clamping to `0`). #3463
1480
+ - Fix GeoJSON sources not placing labels/icons correctly after map rotation. #3366
1481
+ - Fix icon/label placement not respecting order for layers with numeric names. #3404
1482
+ - Fix `queryRenderedFeatures` working incorrectly on colliding labels. #3459
1483
+ - Fix a bug where changing extrusion properties at runtime sometimes threw an error. #3487 #3468
1484
+ - Fix a bug where `map.loaded()` always returned `true` when using raster tile sources. #3302
1485
+ - Fix a bug where moving the map out of bounds sometimes threw `failed to invert matrix` error. #3518
1486
+ - Fixed `queryRenderedFeatures` throwing an error if no parameters provided. #3542
1487
+ - Fixed a bug where using multiple `\n` in a text field resulted in an error. #3570
1488
+
1489
+ #### Misc
1490
+
1491
+ - 🐞 Fix `npm install mapbox-gl` pulling in all `devDependencies`, leading to an extremely slow install. #3377
1492
+ - Switch the codebase to ES6. #3388 #3408 #3415 #3421
1493
+ - A lot of internal refactoring to make the codebase simpler and more maintainable.
1494
+ - Various documentation fixes. #3440
1495
+
1496
+ ## 0.26.0 (October 13 2016)
1497
+
1498
+ #### New Features & Improvements
1499
+
1500
+ * Add `fill-extrude-height` and `fill-extrude-base` style properties (3d buildings) :cityscape: #3223
1501
+ * Add customizable `colorSpace` interpolation to functions #3245
1502
+ * Add `identity` function type #3274
1503
+ * Add depth testing for symbols with `'pitch-alignment': 'map'` #3243
1504
+ * Add `dataloading` events for styles and sources #3306
1505
+ * Add `Control` suffix to all controls :warning: BREAKING CHANGE :warning: #3355
1506
+ * Calculate style layer `ref`s automatically and get rid of user-specified `ref`s :warning: BREAKING CHANGE :warning: #3486
1507
+
1508
+ #### Performance Improvements
1509
+
1510
+ * Ensure removing style or source releases all tile resources #3359
1511
+
1512
+ #### Bugfixes
1513
+
1514
+ * Fix bug causing an error when `Marker#setLngLat` is called #3294
1515
+ * Fix bug causing incorrect coordinates in `touchend` on Android Chrome #3319
1516
+ * Fix bug causing incorrect popup positioning at top of screen #3333
1517
+ * Restore `tile` property to `data` events fired when a tile is removed #3328
1518
+ * Fix bug causing "Improve this map" link to not preload map location #3356
1519
+
1520
+ ## 0.25.1 (September 30 2016)
1521
+
1522
+ #### Bugfixes
1523
+
1524
+ * Fix bug causing attribution to not be shown #3278
1525
+ * Fix bug causing exceptions when symbol text has a trailing newline #3281
1526
+
1527
+ ## 0.25.0 (September 29 2016)
1528
+
1529
+ #### Breaking Changes
1530
+
1531
+ * `Evented#off` now require two arguments; omitting the second argument in order to unbind all listeners for an event
1532
+ type is no longer supported, as it could cause unintended unbinding of internal listeners.
1533
+
1534
+ #### New Features & Improvements
1535
+
1536
+ * Consolidate undocumented data lifecycle events into `data` and `dataloading` events (#3255)
1537
+ * Add `auto` value for style spec properties (#3203)
1538
+
1539
+ #### Bugfixes
1540
+
1541
+ * Fix bug causing "Map#queryRenderedFeatures" to return no features after map rotation or filter change (#3233)
1542
+ * Change webpack build process (#3235) :warning: BREAKING CHANGE :warning:
1543
+ * Improved error messages for `LngLat#convert` (#3232)
1544
+ * Fix bug where the `tiles` field is omitted from the `RasterTileSource#serialize` method (#3259)
1545
+ * Comply with HTML spec by replacing the `div` within the `Navigation` control `<button>` with a `span` element (#3268)
1546
+ * Fix bug causing `Marker` instances to be translated to non-whole pixel coordinates that caused blurriness (#3270)
1547
+
1548
+ #### Performance Improvements
1549
+
1550
+ * Avoid unnecessary style validation (#3224)
1551
+ * Share a single blob URL between all workers (#3239)
1552
+
1553
+ ## 0.24.0 (September 19 2016)
1554
+
1555
+ #### New Features & Improvements
1556
+
1557
+ * Allow querystrings in `mapbox://` URLs #3113
1558
+ * Allow "drag rotate" interaction to control pitch #3105
1559
+ * Improve performance by decreasing `Worker` script `Blob` size #3158
1560
+ * Improve vector tile performance #3067
1561
+ * Decrease size of distributed library by removing `package.json` #3174
1562
+ * Add support for new lines in `text-field` #3179
1563
+ * Make keyboard navigation smoother #3190
1564
+ * Make mouse wheel zooming smoother #3189
1565
+ * Add better error message when calling `Map#queryRenderedFeatures` on nonexistent layer #3196
1566
+ * Add support for imperial units on `Scale` control #3160
1567
+ * Add map's pitch to URL hash #3218
1568
+
1569
+ #### Bugfixes
1570
+
1571
+ * Fix exception thrown when using box zoom handler #3078
1572
+ * Ensure style filters cannot be mutated by reference #3093
1573
+ * Fix exceptions thrown when opening marker-bound popup by click #3104
1574
+ * Fix bug causing fills with transparent colors and patterns to not render #3107
1575
+ * Fix order of latitudes in `Map#getBounds` #3081
1576
+ * Fix incorrect evaluation of zoom-and-property functions #2827 #3155
1577
+ * Fix incorrect evaluation of property functions #2828 #3155
1578
+ * Fix bug causing garbled text rendering when multiple maps are rendered on the page #3086
1579
+ * Fix rendering defects caused by `Map#setFilter` and map rotation on iOS 10 #3207
1580
+ * Fix bug causing image and video sources to disappear when zooming in #3010
1581
+
1582
+
1583
+ ## 0.23.0 (August 25 2016)
1584
+
1585
+ #### New Features & Improvements
1586
+
1587
+ * Add support for `line-color` property functions #2938
1588
+ * Add `Scale` control #2940 #3042
1589
+ * Improve polygon label placement by rendering labels at the pole of inaccessability #3038
1590
+ * Add `Popup` `offset` option #1962
1591
+ * Add `Marker#bindPopup` method #3056
1592
+
1593
+ #### Performance Improvements
1594
+
1595
+ * Improve performance of pages with multiple maps using a shared `WebWorker` pool #2952
1596
+
1597
+ #### Bugfixes
1598
+
1599
+ * Make `LatLngBounds` obey its documented argument order (`southwest`, `northeast`), allowing bounds across the dateline #2414 :warning: **BREAKING CHANGE** :warning:
1600
+ * Fix bug causing `fill-opacity` property functions to not render as expected #3061
1601
+
1602
+ ## 0.22.1 (August 18 2016)
1603
+
1604
+ #### New Features & Improvements
1605
+
1606
+ * Reduce library size by using minified version of style specification #2998
1607
+ * Add a warning when rendering artifacts occur due to too many symbols or glyphs being rendered in a tile #2966
1608
+
1609
+ #### Bugfixes
1610
+
1611
+ * Fix bug causing exception to be thrown by `Map#querySourceFeatures` #3022
1612
+ * Fix bug causing `Map#loaded` to return true while there are outstanding tile updates #2847
1613
+
1614
+ ## 0.22.0 (August 11 2016)
1615
+
1616
+ #### Breaking Changes
1617
+
1618
+ * The `GeoJSONSource`, `VideoSource`, `ImageSource` constructors are now private. Please use `map.addSource({...})` to create sources and `map.getSource(...).setData(...)` to update GeoJSON sources. #2667
1619
+ * `Map#onError` has been removed. You may catch errors by listening for the `error` event. If no listeners are bound to `error`, error messages will be printed to the console. #2852
1620
+
1621
+ #### New Features & Improvements
1622
+
1623
+ * Increase max glyph atlas size to accomodate alphabets with large numbers of characters #2930
1624
+ * Add support for filtering features on GeoJSON / vector tile `$id` #2888
1625
+ * Update geolocate icon #2973
1626
+ * Add a `close` event to `Popup`s #2953
1627
+ * Add a `offset` option to `Marker` #2885
1628
+ * Print `error` events without any listeners to the console #2852
1629
+ * Refactored `Source` interface to prepare for custom source types #2667
1630
+
1631
+ #### Bugfixes
1632
+
1633
+ * Fix opacity property-functions for fill layers #2971
1634
+ * Fix `DataCloneError` in Firefox and IE11 #2559
1635
+ * Fix bug preventing camera animations from being triggered in `moveend` listeners #2944
1636
+ * Fix bug preventing `fill-outline-color` from being unset #2964
1637
+ * Fix webpack support #2887
1638
+ * Prevent buttons in controls from acting like form submit buttons #2935
1639
+ * Fix bug preventing map interactions near two controls in the same corner #2932
1640
+ * Fix crash resulting for large style batch queue #2926
1641
+
1642
+ ## 0.21.0 (July 13 2016)
1643
+
1644
+ #### Breaking Changes
1645
+
1646
+ * GeoJSON polygon inner rings are now rewound for compliance with the [v2 vector tile](https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#4344-polygon-geometry-type). This may affect some uses of `line-offset`, reversing the direction of the offset. #2889
1647
+
1648
+ #### New Features & Improvements
1649
+
1650
+ * Add `text-pitch-alignment` style property #2668
1651
+ * Allow query parameters on `mapbox://` URLs #2702
1652
+ * Add `icon-text-fit` and `icon-text-fit-padding` style properties #2720
1653
+ * Enable property functions for `icon-rotate` #2738
1654
+ * Enable property functions for `fill-opacity` #2733
1655
+ * Fire `Map#mouseout` events #2777
1656
+ * Allow query parameters on all sprite URLs #2772
1657
+ * Increase sprite atlas size to 1024px square, allowing more and larger sprites #2802
1658
+ * Add `Marker` class #2725 #2810
1659
+ * Add `{quadkey}` URL parameter #2805
1660
+ * Add `circle-pitch-scale` style property #2821
1661
+
1662
+ #### Bugfixes
1663
+
1664
+ * Fix rendering of layers with large numbers of features #2794
1665
+ * Fix exceptions thrown during drag-rotate interactions #2840
1666
+ * Fix error when adding and removing a layer within the same update cycle #2845
1667
+ * Fix false "Geometry exceeds allowed extent" warnings #2568
1668
+ * Fix `Map#loaded` returning true while there are outstanding tile updates #2847
1669
+ * Fix style validation error thrown while removing a filter #2847
1670
+ * Fix event data object not being passed for double click events #2814
1671
+ * Fix multipolygons disappearing from map at certain zoom levels #2704
1672
+ * Fix exceptions caused by `queryRenderedFeatures` in Safari and Firefox #2822
1673
+ * Fix `mapboxgl#supported()` returning `true` in old versions of IE11 mapbox/mapbox-gl-supported#1
1674
+
1675
+ ## 0.20.1 (June 21 2016)
1676
+
1677
+ #### Bugfixes
1678
+
1679
+ * Fixed exception thrown when changing `*-translate` properties via `setPaintProperty` (#2762)
1680
+
1681
+ ## 0.20.0 (June 10 2016)
1682
+
1683
+ #### New Features & Improvements
1684
+
1685
+ * Add limited WMS support #2612
1686
+ * Add `workerCount` constructor option #2666
1687
+ * Improve performance of `locationPoint` and `pointLocation` #2690
1688
+ * Remove "Not using VertexArrayObject extension" warning messages #2707
1689
+ * Add `version` property to mapboxgl #2660
1690
+ * Support property functions in `circle-opacity` and `circle-blur` #2693
1691
+
1692
+ #### Bugfixes
1693
+
1694
+ * Fix exception thrown by "drag rotate" handler #2680
1695
+ * Return an empty array instead of an empty object from `queryRenderedFeatures` #2694
1696
+ * Fix bug causing map to not render in IE
1697
+
1698
+ ## 0.19.1 (June 2 2016)
1699
+
1700
+ #### Bugfixes
1701
+
1702
+ * Fix rendering of polygons with more than 35k vertices #2657
1703
+
1704
+ ## 0.19.0 (May 31 2016)
1705
+
1706
+ #### New Features & Improvements
1707
+
1708
+ * Allow use of special characters in property field names #2547
1709
+ * Improve rendering speeds on fill layers #1606
1710
+ * Add data driven styling support for `fill-color` and `fill-outline-color` #2629
1711
+ * Add `has` and `!has` filter operators mapbox/feature-filter#15
1712
+ * Improve keyboard handlers with held-down keys #2530
1713
+ * Support 'tms' tile scheme #2565
1714
+ * Add `trackResize` option to `Map` #2591
1715
+
1716
+ #### Bugfixes
1717
+
1718
+ * Scale circles when map is displayed at a pitch #2541
1719
+ * Fix background pattern rendering bug #2557
1720
+ * Fix bug that prevented removal of a `fill-pattern` from a fill layer #2534
1721
+ * Fix `line-pattern` and `fill-pattern`rendering #2596
1722
+ * Fix some platform specific rendering bugs #2553
1723
+ * Return empty object from `queryRenderedFeatures` before the map is loaded #2621
1724
+ * Fix "there is no texture bound to the unit 1" warnings #2509
1725
+ * Allow transitioned values to be unset #2561
1726
+
1727
+ ## 0.18.0 (April 13 2016)
1728
+
1729
+ #### New Features & Improvements
1730
+
1731
+ * Implement zoom-and-property functions for `circle-color` and `circle-size` #2454
1732
+ * Dedupe attributions that are substrings of others #2453
1733
+ * Misc performance improvements #2483 #2488
1734
+
1735
+ #### Bugfixes
1736
+
1737
+ * Fix errors when unsetting and resetting a style property #2464
1738
+ * Fix errors when updating paint properties while using classes #2496
1739
+ * Fix errors caused by race condition in unserializeBuckets #2497
1740
+ * Fix overzoomed tiles in wrapped worlds #2482
1741
+ * Fix errors caused by mutating a filter object after calling `Map#setFilter` #2495
1742
+
1743
+ ## 0.17.0 (April 13 2016)
1744
+
1745
+ #### Breaking Changes
1746
+
1747
+ * Remove `map.batch` in favor of automatically batching style mutations (i.e. calls to `Map#setLayoutProperty`, `Map#setPaintProperty`, `Map#setFilter`, `Map#setClasses`, etc.) and applying them once per frame, significantly improving performance when updating the style frequently #2355 #2380
1748
+ * Remove `util.throttle` #2345
1749
+
1750
+ #### New Features & Improvements
1751
+
1752
+ * Improve performance of all style mutation methods by only recalculating affected properties #2339
1753
+ * Improve fading of labels and icons #2376
1754
+ * Improve rendering performance by reducing work done on the main thread #2394
1755
+ * Validate filters passed to `Map#queryRenderedFeatures` and `Map#querySourceFeatures` #2349
1756
+ * Display a warning if a vector tile's geometry extent is larger than supported #2383
1757
+ * Implement property functions (i.e. data-driven styling) for `circle-color` and `circle-size` #1932
1758
+ * Add `Popup#setDOMContent` method #2436
1759
+
1760
+ #### Bugfixes
1761
+
1762
+ * Fix a performance regression caused by using 1 `WebWorker` instead of `# cpus - 1` `WebWorker`s, slowing down tile loading times #2408
1763
+ * Fix a bug in which `Map#queryRenderedFeatures` would sometimes return features that had been removed #2353
1764
+ * Fix `clusterMaxZoom` option on `GeoJSONSource` not working as expected #2374
1765
+ * Fix anti-aliased rendering for pattern fills #2372
1766
+ * Fix exception caused by calling `Map#queryRenderedFeatures` or `Map#querySourceFeatures` with no arguments
1767
+ * Fix exception caused by calling `Map#setLayoutProperty` for `text-field` or `icon-image` #2407
1768
+
1769
+ ## 0.16.0 (March 24 2016)
1770
+
1771
+ #### Breaking Changes
1772
+
1773
+ * Replace `Map#featuresAt` and `Map#featuresIn` with `Map#queryRenderedFeatures` and `map.querySourceFeatures` (#2224)
1774
+ * Replace `featuresAt` and `featuresIn` with `queryRenderedFeatures`
1775
+ * Make `queryRenderedFeatures` synchronous, remove the callback and use the return value.
1776
+ * Rename `layer` parameter to `layers` and make it an array of layer names.
1777
+ * Remove the `radius` parameter. `radius` was used with `featuresAt` to account for style properties like `line-width` and `circle-radius`. `queryRenderedFeatures` accounts for these style properties. If you need to query a larger area, use a bounding box query instead of a point query.
1778
+ * Remove the `includeGeometry` parameter because `queryRenderedFeatures` always includes geometries.
1779
+ * `Map#debug` is renamed to `Map#showTileBoundaries` (#2284)
1780
+ * `Map#collisionDebug` is renamed to `Map#showCollisionBoxes` (#2284)
1781
+
1782
+ #### New Features & Improvements
1783
+
1784
+ * Improve overall rendering performance. (#2221)
1785
+ * Improve performance of `GeoJSONSource#setData`. (#2222)
1786
+ * Add `Map#setMaxBounds` method (#2234)
1787
+ * Add `isActive` and `isEnabled` methods to interaction handlers (#2238)
1788
+ * Add `Map#setZoomBounds` method (#2243)
1789
+ * Add touch events (#2195)
1790
+ * Add `map.queryRenderedFeatures` to query the styled and rendered representations of features (#2224)
1791
+ * Add `map.querySourceFeatures` to get features directly from vector tiles, independent of the style (#2224)
1792
+ * Add `mapboxgl.Geolocate` control (#1939)
1793
+ * Make background patterns render seamlessly across tile boundaries (#2305)
1794
+
1795
+ #### Bugfixes
1796
+
1797
+ * Fix calls to `setFilter`, `setLayoutProperty`, and `setLayerZoomRange` on ref children (#2228)
1798
+ * Fix `undefined` bucket errors after `setFilter` calls (#2244)
1799
+ * Fix bugs causing hidden symbols to be rendered (#2246, #2276)
1800
+ * Fix raster flickering (#2236)
1801
+ * Fix `queryRenderedFeatures` precision at high zoom levels (#2292)
1802
+ * Fix holes in GeoJSON data caused by unexpected winding order (#2285)
1803
+ * Fix bug causing deleted features to be returned by `queryRenderedFeatures` (#2306)
1804
+ * Fix bug causing unexpected fill patterns to be rendered (#2307)
1805
+ * Fix popup location with preceding sibling elements (#2311)
1806
+ * Fix polygon anti-aliasing (#2319)
1807
+ * Fix slivers between non-adjacent polygons (#2319)
1808
+ * Fix keyboard shortcuts causing page to scroll (#2312)
1809
+
1810
+ ## 0.15.0 (March 1 2016)
1811
+
1812
+ #### New Features & Improvements
1813
+
1814
+ * Add `ImageSource#setCoordinates` and `VideoSource#setCoordinates` (#2184)
1815
+
1816
+ #### Bugfixes
1817
+
1818
+ * Fix flickering on raster layers (#2211)
1819
+ * Fix browser hang when zooming quickly on raster layers (#2211)
1820
+
1821
+ ## 0.14.3 (Feb 25 2016)
1822
+
1823
+ #### New Features & Improvements
1824
+
1825
+ * Improve responsiveness of zooming out by using cached parent tiles (#2168)
1826
+ * Improve contextual clues on style API validation (#2170)
1827
+ * Improve performance of methods including `setData` (#2174)
1828
+
1829
+ #### Bugfixes
1830
+
1831
+ * Fix incorrectly sized line dashes (#2099)
1832
+ * Fix bug in which `in` feature filter drops features (#2166)
1833
+ * Fix bug preventing `Map#load` from firing when tile "Not Found" errors occured (#2176)
1834
+ * Fix rendering artifacts on mobile GPUs (#2117)
1835
+
1836
+ ## 0.14.2 (Feb 19 2016)
1837
+
1838
+ #### Bugfixes
1839
+
1840
+ * Look for loaded parent tiles in cache
1841
+ * Set tile cache size based on viewport size (#2137)
1842
+ * Fix tile render order for layer-by-layer
1843
+ * Remove source update throttling (#2139)
1844
+ * Make panning while zooming more linear (#2070)
1845
+ * Round points created during bucket creation (#2067)
1846
+ * Correct bounds for a rotated or tilted map (#1842)
1847
+ * Fix overscaled featuresAt (#2103)
1848
+ * Allow using `tileSize: 512` as a switch to trade retina support for 512px raster tiles
1849
+ * Fix the serialization of paint classes (#2107)
1850
+ * Fixed bug where unsetting style properties could mutate the value of other style properties (#2105)
1851
+ * Less slanted dashed lines near sharp corners (#967)
1852
+ * Fire map#load if no initial style is set (#2042)
1853
+
1854
+ ## 0.14.1 (Feb 10 2016)
1855
+
1856
+ #### Bugfixes
1857
+
1858
+ * Fix incorrectly rotated symbols along lines near tile boundries (#2062)
1859
+ * Fix broken rendering when a fill layer follows certain symbol layers (#2092)
1860
+
1861
+ ## 0.14.0 (Feb 8 2016)
1862
+
1863
+ #### Breaking Changes
1864
+
1865
+ * Switch `GeoJSONSource` clustering options from being measured in extent-units to pixels (#2026)
1866
+
1867
+ #### New Features & Improvements
1868
+
1869
+ * Improved error message for invalid colors (#2006)
1870
+ * Added support for tiles with variable extents (#2010)
1871
+ * Improved `filter` performance and maximum size (#2024)
1872
+ * Changed circle rendering such that all geometry nodes are drawn, not just the geometry's outer ring (#2027)
1873
+ * Added `Map#getStyle` method (#1982)
1874
+
1875
+ #### Bugfixes
1876
+
1877
+ * Fixed bug causing WebGL contexts to be "used up" by calling `mapboxgl.supported()` (#2018)
1878
+ * Fixed non-deterministic symbol z-order sorting (#2023)
1879
+ * Fixed garbled labels while zooming (#2012)
1880
+ * Fixed icon jumping when touching trackpad with two fingers (#1990)
1881
+ * Fixed overzoomed collision debug labels (#2033)
1882
+ * Fixed dashes sliding along their line during zooming (#2039)
1883
+ * Fixed overscaled `minzoom` setting for GeoJSON sources (#1651)
1884
+ * Fixed overly-strict function validation for duplicate stops (#2075)
1885
+ * Fixed crash due to `performance.now` not being present on some browsers (#2056)
1886
+ * Fixed the unsetting of paint properties (#2037)
1887
+ * Fixed bug causing multiple interaction handler event listeners to be attached (#2069)
1888
+ * Fixed bug causing only a single debug box to be drawn (#2034)
1889
+
1890
+ ## 0.13.1 (Jan 27 2016)
1891
+
1892
+ #### Bugfixes
1893
+
1894
+ * Fixed broken npm package due to outdated bundled modules
1895
+
1896
+ ## 0.13.0 (Jan 27 2016)
1897
+
1898
+ #### Bugfixes
1899
+
1900
+ * Fixed easeTo pan, zoom, and rotate when initial rotation != 0 (#1950)
1901
+ * Fixed rendering of tiles with an extent != 4096 (#1952)
1902
+ * Fixed missing icon collision boxes (#1978)
1903
+ * Fixed null `Tile#buffers` errors (#1987)
1904
+
1905
+ #### New Features & Improvements
1906
+
1907
+ * Added `symbol-avoid-edges` style property (#1951)
1908
+ * Improved `symbol-max-angle` check algorithm (#1959)
1909
+ * Added marker clustering! (#1931)
1910
+ * Added zoomstart, zoom, and zoomend events (#1958)
1911
+ * Disabled drag on mousedown when using boxzoom (#1907)
1912
+
1913
+ ## 0.12.4 (Jan 19 2016)
1914
+
1915
+ #### Bugfixes
1916
+
1917
+ * Fix elementGroups null value errors (#1933)
1918
+ * Fix some glyph atlas overflow cases (#1923)
1919
+
1920
+ ## 0.12.3 (Jan 14 2016)
1921
+
1922
+ #### API Improvements
1923
+ * Support inline attribution options in map options (#1865)
1924
+ * Improve flyTo options (#1854, #1429)
1925
+
1926
+ #### Bugfixes
1927
+ * Fix flickering with overscaled tiles (#1921)
1928
+ * Remove Node.remove calls for IE browser compatibility (#1900)
1929
+ * Match patterns at tile boundaries (#1908)
1930
+ * Fix Tile#positionAt, fix query tests (#1899)
1931
+ * Fix flickering on streets (#1875)
1932
+ * Fix text-max-angle property (#1870)
1933
+ * Fix overscaled line patterns (#1856)
1934
+ * Fix patterns and icons for mismatched pixelRatios (#1851)
1935
+ * Fix missing labels when text size 0 at max zoom (#1809)
1936
+ * Use linear interp when pixel ratios don't match (#1601)
1937
+ * Fix blank areas, flickering in raster layers (#1876, #675)
1938
+ * Fix labels slipping/cropping at tile bounds (#757)
1939
+
1940
+ #### UX Improvements
1941
+ * Improve touch handler perceived performance (#1844)
1942
+
1943
+ ## 0.12.2 (Dec 22 2015)
1944
+
1945
+ #### API Improvements
1946
+
1947
+ * Support LngLat.convert([w, s, e, n]) (#1812)
1948
+ * Invalid GeoJSON is now handled better
1949
+
1950
+ #### Bugfixes
1951
+
1952
+ * Fixed `Popup#addTo` when the popup is already open (#1811)
1953
+ * Fixed warping when rotating / zooming really fast
1954
+ * `Map#flyTo` now flies across the antimeridan if shorter (#1853)
1955
+
1956
+ ## 0.12.1 (Dec 8 2015)
1957
+
1958
+ #### Breaking changes
1959
+
1960
+ * Reversed the direction of `line-offset` (#1808)
1961
+ * Renamed `Pinch` interaction handler to `TouchZoomRotate` (#1777)
1962
+ * Made `Map#update` and `Map#render` private methods (#1798)
1963
+ * Made `Map#remove` remove created DOM elements (#1789)
1964
+
1965
+ #### API Improvements
1966
+
1967
+ * Added an method to disable touch rotation (#1777)
1968
+ * Added a `position` option for `Attribution` (#1689)
1969
+
1970
+ #### Bugfixes
1971
+
1972
+ * Ensure tile loading errors are properly reported (#1799)
1973
+ * Ensure re-adding a previously removed pop-up works (#1477)
1974
+
1975
+ #### UX Improvements
1976
+
1977
+ * Don't round zoom level during double-click interaction (#1640)
1978
+
1979
+ ## 0.12.0 (Dec 2 2015)
1980
+
1981
+ #### API Improvements
1982
+
1983
+ * Added `line-offset` style property (#1778)
1984
+
1985
+ ## 0.11.5 (Dec 1 2015)
1986
+
1987
+ #### Bugfixes
1988
+
1989
+ * Fixed unstable symbol layer render order when adding / removing layers (#1558)
1990
+ * Fire map loaded event even if raster tiles have errors
1991
+ * Fix panning animation during easeTo with zoom change
1992
+ * Fix pitching animation during flyTo
1993
+ * Fix pitching animation during easeTo
1994
+ * Prevent rotation from firing `mouseend` events (#1104)
1995
+
1996
+ #### API Improvements
1997
+
1998
+ * Fire `mousedown` and `mouseup` events (#1411)
1999
+ * Fire `movestart` and `moveend` when panning (#1658)
2000
+ * Added drag events (#1442)
2001
+ * Request webp images for mapbox:// raster tiles in chrome (#1725)
2002
+
2003
+ #### UX Improvements
2004
+
2005
+ * Added inertia to map rotation (#620)
2006
+
2007
+ ## 0.11.4 (Nov 16 2015)
2008
+
2009
+ #### Bugfixes
2010
+
2011
+ * Fix alpha blending of alpha layers (#1684)
2012
+
2013
+ ## 0.11.3 (Nov 10 2015)
2014
+
2015
+ #### Bugfixes
2016
+
2017
+ * Fix GeoJSON rendering and performance (#1685)
2018
+
2019
+ #### UX Improvements
2020
+
2021
+ * Use SVG assets for UI controls (#1657)
2022
+ * Zoom out with shift + dblclick (#1666)
2023
+
2024
+ ## 0.11.2 (Oct 29 2015)
2025
+
2026
+ * Misc performance improvements
2027
+
2028
+ #### Bugfixes
2029
+
2030
+ * Fix sprites on systems with non-integer `devicePixelRatio`s (#1029 #1475 #1476)
2031
+ * Fix layer minZoom being ignored if not less than source maxZoom
2032
+ * Fix symbol placement at the start of a line (#1461)
2033
+ * Fix `raster-opacity` on non-tile sources (#1270)
2034
+ * Ignore boxzoom on shift-click (#1655)
2035
+
2036
+ #### UX Improvements
2037
+
2038
+ * Enable line breaks on common punctuation (#1115)
2039
+
2040
+ #### API Improvements
2041
+
2042
+ * Add toString and toArray methods to LngLat, LngLatBounds (#1571)
2043
+ * Add `Transform#resize` method
2044
+ * Add `Map#getLayer` method (#1183)
2045
+ * Add `Transform#unmodified` property (#1452)
2046
+ * Propagate WebGL context events (#1612)
2047
+
2048
+ ## 0.11.1 (Sep 30 2015)
2049
+
2050
+ #### Bugfixes
2051
+
2052
+ * Add statistics and checkboxes to debug page
2053
+ * Fix `Map#featuresAt` for non-4096 vector sources (#1529)
2054
+ * Don't fire `mousemove` on drag-pan
2055
+ * Fix maxBounds constrains (#1539)
2056
+ * Fix maxBounds infinite loop (#1538)
2057
+ * Fix memory leak in worker
2058
+ * Assert valid `TileCoord`, fix wrap calculation in `TileCoord#cover` (#1483)
2059
+ * Abort raster tile load if not in viewport (#1490)
2060
+
2061
+ #### API Improvements
2062
+
2063
+ * Add `Map` event listeners for `mouseup`, `contextmenu` (right click) (#1532)
2064
+
2065
+
2066
+ ## 0.11.0 (Sep 11 2015)
2067
+
2068
+ #### API Improvements
2069
+
2070
+ * Add `Map#featuresIn`: a bounding-box feature query
2071
+ * Emit stylesheet validation errors (#1436)
2072
+
2073
+ #### UX Improvements
2074
+
2075
+ * Handle v8 style `center`, `zoom`, `bearing`, `pitch` (#1452)
2076
+ * Improve circle type styling (#1446)
2077
+ * Improve dashed and patterned line antialiasing
2078
+
2079
+ #### Bugfixes
2080
+
2081
+ * Load images in a way that respects Cache-Control headers
2082
+ * Filter for rtree matches to those crossing bbox
2083
+ * Log errors by default (#1463)
2084
+ * Fixed modification of `text-size` via `setLayoutProperty` (#1451)
2085
+ * Throw on lat > 90 || < -90. (#1443)
2086
+ * Fix circle clipping bug (#1457)
2087
+
2088
+
2089
+ ## 0.10.0 (Aug 21 2015)
2090
+
2091
+ #### Breaking changes
2092
+
2093
+ * Switched to [longitude, latitude] coordinate order, matching GeoJSON. We anticipate that mapbox-gl-js will be widely used
2094
+ with GeoJSON, and in the long term having a coordinate order that is consistent with GeoJSON will lead to less confusion
2095
+ and impedance mismatch than will a [latitude, longitude] order.
2096
+
2097
+ The following APIs were renamed:
2098
+
2099
+ * `LatLng` was renamed to `LngLat`
2100
+ * `LatLngBounds` was renamed to `LngLatBounds`
2101
+ * `Popup#setLatLng` was renamed to `Popup#setLngLat`
2102
+ * `Popup#getLatLng` was renamed to `Popup#getLngLat`
2103
+ * The `latLng` property of Map events was renamed `lngLat`
2104
+
2105
+ The following APIs now expect array coordinates in [longitude, latitude] order:
2106
+
2107
+ * `LngLat.convert`
2108
+ * `LngLatBounds.convert`
2109
+ * `Popup#setLngLat`
2110
+ * The `center` and `maxBounds` options of the `Map` constructor
2111
+ * The arguments to `Map#setCenter`, `Map#fitBounds`, `Map#panTo`, and `Map#project`
2112
+ * The `center` option of `Map#jumpTo`, `Map#easeTo`, and `Map#flyTo`
2113
+ * The `around` option of `Map#zoomTo`, `Map#rotateTo`, and `Map#easeTo`
2114
+ * The `coordinates` properties of video and image sources
2115
+
2116
+ * Updated to mapbox-gl-style-spec v8.0.0 ([Changelog](https://github.com/mapbox/mapbox-gl-style-spec/blob/v8.0.0/CHANGELOG.md)). Styles are
2117
+ now expected to be version 8. You can use the [gl-style-migrate](https://github.com/mapbox/mapbox-gl-style-lint#migrations)
2118
+ utility to update existing styles.
2119
+
2120
+ * The format for `mapbox://` style and glyphs URLs has changed. For style URLs, you should now use the format
2121
+ `mapbox://styles/:username/:style`. The `:style` portion of the URL no longer contains a username. For font URLs, you
2122
+ should now use the format `mapbox://fonts/:username/{fontstack}/{range}.pbf`.
2123
+ * Mapbox default styles are now hosted via the Styles API rather than www.mapbox.com. You can make use of the Styles API
2124
+ with a `mapbox://` style URL pointing to a v8 style, e.g. `mapbox://styles/mapbox/streets-v8`.
2125
+ * The v8 satellite style (`mapbox://styles/mapbox/satellite-v8`) is now a plain satellite style, and not longer supports labels
2126
+ or contour lines via classes. For a labeled satellite style, use `mapbox://styles/mapbox/satellite-hybrid`.
2127
+
2128
+ * Removed `mbgl.config.HTTP_URL` and `mbgl.config.FORCE_HTTPS`; https is always used when connecting to the Mapbox API.
2129
+ * Renamed `mbgl.config.HTTPS_URL` to `mbgl.config.API_URL`.
2130
+
2131
+ #### Bugfixes
2132
+
2133
+ * Don't draw halo when halo-width is 0 (#1381)
2134
+ * Reverted shader changes that degraded performance on IE
2135
+
2136
+ #### API Improvements
2137
+
2138
+ * You can now unset layout and paint properties via the `setLayoutProperty` and `setPaintProperty` APIs
2139
+ by passing `undefined` as a property value.
2140
+ * The `layer` option of `featuresAt` now supports an array of layers.
2141
+
2142
+ ## 0.9.0 (Jul 29 2015)
2143
+
2144
+ * `glyphs` URL now normalizes without the `/v4/` prefix for `mapbox://` urls. Legacy behavior for `mapbox://fontstacks` is still maintained (#1385)
2145
+ * Expose `geojson-vt` options for GeoJSON sources (#1271)
2146
+ * bearing snaps to "North" within a tolerance of 7 degrees (#1059)
2147
+ * Now you can directly mutate the minzoom and maxzoom layer properties with `map.setLayerZoomRange(layerId, minzoom, maxzoom)`
2148
+ * Exposed `mapboxgl.Control`, a base class used by all UI controls
2149
+ * Refactored handlers to be individually included in Map options, or enable/disable them individually at runtime, e.g. `map.scrollZoom.disable()`.
2150
+ * New feature: Batch operations can now be done at once, improving performance for calling multiple style functions: (#1352)
2151
+
2152
+ ```js
2153
+ style.batch(function(s) {
2154
+ s.addLayer({ id: 'first', type: 'symbol', source: 'streets' });
2155
+ s.addLayer({ id: 'second', type: 'symbol', source: 'streets' });
2156
+ s.addLayer({ id: 'third', type: 'symbol', source: 'terrain' });
2157
+ s.setPaintProperty('first', 'text-color', 'black');
2158
+ s.setPaintProperty('first', 'text-halo-color', 'white');
2159
+ });
2160
+ ```
2161
+ * Improved documentation
2162
+ * `featuresAt` performance improvements by exposing `includeGeometry` option
2163
+ * Better label placement along lines (#1283)
2164
+ * Improvements to round linejoins on semi-transparent lines (mapbox/mapbox-gl-native#1771)
2165
+ * Round zoom levels for raster tile loading (2a2aec)
2166
+ * Source#reload cannot be called if source is not loaded (#1198)
2167
+ * Events bubble to the canvas container for custom overlays (#1301)
2168
+ * Move handlers are now bound on mousedown and touchstart events
2169
+ * map.featuresAt() now works across the dateline
2170
+
2171
+ ## 0.8.1 (Jun 16 2015)
2172
+
2173
+ * No code changes; released only to correct a build issue in 0.8.0.
2174
+
2175
+ ## 0.8.0 (Jun 15 2015)
2176
+
2177
+ #### Breaking changes
2178
+
2179
+ * `map.setView(latlng, zoom, bearing)` has been removed. Use
2180
+ [`map.jumpTo(options)`](https://www.mapbox.com/mapbox-gl-js/api/#map/jumpto) instead:
2181
+
2182
+ ```js
2183
+ map.setView([40, -74.50], 9) // 0.7.0 or earlier
2184
+ map.jumpTo({center: [40, -74.50], zoom: 9}); // now
2185
+ ```
2186
+ * [`map.easeTo`](https://www.mapbox.com/mapbox-gl-js/api/#map/easeto) and
2187
+ [`map.flyTo`](https://www.mapbox.com/mapbox-gl-js/api/#map/flyto) now accept a single
2188
+ options object rather than positional parameters:
2189
+
2190
+ ```js
2191
+ map.easeTo([40, -74.50], 9, null, {duration: 400}); // 0.7.0 or earlier
2192
+ map.easeTo({center: [40, -74.50], zoom: 9, duration: 400}); // now
2193
+ ```
2194
+ * `mapboxgl.Source` is no longer exported. Use `map.addSource()` instead. See the
2195
+ [GeoJSON line](https://www.mapbox.com/mapbox-gl-js/example/geojson-line/) or
2196
+ [GeoJSON markers](https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/)
2197
+ examples.
2198
+ * `mapboxgl.util.supported()` moved to [`mapboxgl.supported()`](https://www.mapbox.com/mapbox-gl-js/api/#mapboxgl/supported).
2199
+
2200
+ #### UX improvements
2201
+
2202
+ * Add perspective rendering (#1049)
2203
+ * Better and faster labelling (#1079)
2204
+ * Add touch interactions support on mobile devices (#949)
2205
+ * Viewport-relative popup arrows (#1065)
2206
+ * Normalize mousewheel zooming speed (#1060)
2207
+ * Add proper handling of GeoJSON features that cross the date line (#1275)
2208
+ * Sort overlapping symbols in the y direction (#470)
2209
+ * Control buttons are now on a 30 pixel grid (#1143)
2210
+ * Improve GeoJSON processing performance
2211
+
2212
+ #### API Improvements
2213
+
2214
+ * Switch to JSDoc for documentation
2215
+ * Bundling with browserify is now supported
2216
+ * Validate incoming map styles (#1054)
2217
+ * Add `Map` `setPitch` `getPitch`
2218
+ * Add `Map` `dblclick` event. (#1168)
2219
+ * Add `Map` `getSource` (660a8c1)
2220
+ * Add `Map` `setFilter` and `getFilter` (#985)
2221
+ * Add `Map` `failIfMajorPerformanceCaveat` option (#1082)
2222
+ * Add `Map` `preserveDrawingBuffer` option (#1232)
2223
+ * Add `VideoSource` `getVideo()` (#1162)
2224
+ * Support vector tiles with extents other than 4096 (#1227)
2225
+ * Use a DOM hierarchy that supports evented overlays (#1217)
2226
+ * Pass `latLng` to the event object (#1068)
2227
+
2228
+ #### UX Bugfixes
2229
+
2230
+ * Fix rendering glitch on iOS 8 (#750)
2231
+ * Fix line triangulation errors (#1120, #992)
2232
+ * Support unicode range 65280-65535 (#1108)
2233
+ * Fix cracks between fill patterns (#972)
2234
+ * Fix angle of icons aligned with lines (37a498a)
2235
+ * Fix dashed line bug for overscaled tiles (#1132)
2236
+ * Fix icon artifacts caused by sprite neighbors (#1195)
2237
+
2238
+ #### API Bugfixes
2239
+
2240
+ * Don't fire spurious `moveend` events on mouseup (#1107)
2241
+ * Fix a race condition in `featuresAt` (#1220)
2242
+ * Fix for brittle fontstack name convention (#1070)
2243
+ * Fix broken `Popup` `setHTML` (#1272)
2244
+ * Fix an issue with cross-origin image requests (#1269)
2245
+
2246
+
2247
+ ## 0.7.0 (Mar 3 2015)
2248
+
2249
+ #### Breaking
2250
+
2251
+ * Rename `Map` `hover` event to `mousemove`.
2252
+ * Change `featuresAt` to return GeoJSON objects, including geometry (#1010)
2253
+ * Remove `Map` `canvas` and `container` properties, add `getCanvas` and `getContainer` methods instead
2254
+
2255
+ #### UX Improvements
2256
+
2257
+ * Improve line label density
2258
+ * Add boxzoom interaction (#1038)
2259
+ * Add keyboard interaction (#1034)
2260
+ * Faster `GeoJSONSource` `setData` without flickering (#973)
2261
+
2262
+ #### API Improvements
2263
+
2264
+ * Add Popup component (#325)
2265
+ * Add layer API (#1022)
2266
+ * Add filter API (#985)
2267
+ * More efficient filter API (#1018)
2268
+ * Accept plain old JS object for `addSource` (#1021)
2269
+ * Reparse overscaled tiles
2270
+
2271
+ #### Bugfixes
2272
+
2273
+ * Fix `featuresAt` for LineStrings (#1006)
2274
+ * Fix `tileSize` argument to `GeoJSON` worker (#987)
2275
+ * Remove extraneous files from the npm package (#1024)
2276
+ * Hide "improve map" link in print (#988)
2277
+
2278
+
2279
+ ## 0.6.0 (Feb 9 2015)
2280
+
2281
+ #### Bugfixes
2282
+
2283
+ * Add wrapped padding to sprite for repeating images (#972)
2284
+ * Clear color buffers before rendering (#966)
2285
+ * Make line-opacity work with line-image (#970)
2286
+ * event.toElement fallback for Firefox (#932)
2287
+ * skip duplicate vertices at ends of lines (#776)
2288
+ * allow characters outside \w to be used in token
2289
+ * Clear old tiles when new GeoJSON is loaded (#905)
2290
+
2291
+ #### Improvements
2292
+
2293
+ * Added `map.setPaintProperty()`, `map.getPaintProperty()`, `map.setLayoutProperty()`, and `map.getLayoutProperty()`.
2294
+ * Switch to ESLint and more strict code rules (#957)
2295
+ * Grab 2x raster tiles if retina (#754)
2296
+ * Support for mapbox:// style URLs (#875)
2297
+
2298
+ #### Breaking
2299
+
2300
+ * Updated to mapbox-gl-style-spec v7.0.0 ([Changelog](https://github.com/mapbox/mapbox-gl-style-spec/blob/a2b0b561ce16015a1ef400dc870326b1b5255091/CHANGELOG.md)). Styles are
2301
+ now expected to be version 7. You can use the [gl-style-migrate](https://github.com/mapbox/mapbox-gl-style-lint#migrations)
2302
+ utility to update existing styles.
2303
+ * HTTP_URL and HTTPS_URL config options must no longer include a `/v4` path prefix.
2304
+ * `addClass`, `removeClass`, `setClasses`, `hasClass`, and `getClasses` are now methods
2305
+ on Map.
2306
+ * `Style#cascade` is now private, pending a public style mutation API (#755).
2307
+ * The format for `featuresAt` results changed. Instead of result-per-geometry-cross-layer,
2308
+ each result has a `layers` array with all layers that contain the feature. This avoids
2309
+ duplication of geometry and properties in the result set.
2310
+
2311
+
2312
+ ## 0.5.2 (Jan 07 2015)
2313
+
2314
+ #### Bugfixes
2315
+
2316
+ * Remove tiles for unused sources (#863)
2317
+ * Fix fill pattern alignment
2318
+
2319
+ #### Improvements
2320
+
2321
+ * Add GeoJSONSource maxzoom option (#760)
2322
+ * Return ref layers in featuresAt (#847)
2323
+ * Return any extra layer keys provided in the stylesheet in featuresAt
2324
+ * Faster protobuf parsing
2325
+
2326
+ ## 0.5.1 (Dec 19 2014)
2327
+
2328
+ #### Bugfixes
2329
+
2330
+ * Fix race conditions with style loading/rendering
2331
+ * Fix race conditions with setStyle
2332
+ * Fix map.remove()
2333
+ * Fix featuresAt properties
2334
+
2335
+ ## 0.5.0 (Dec 17 2014)
2336
+
2337
+ #### Bugfixes
2338
+
2339
+ * Fix multiple calls to setStyle
2340
+
2341
+ #### Improvements
2342
+
2343
+ * `featuresAt` now returns additional information
2344
+ * Complete style/source/tile event suite:
2345
+ style.load, style.error, style.change,
2346
+ source.add, source.remove, source.load, source.error, source.change,
2347
+ tile.add, tile.remove, tile.load, tile.error
2348
+ * Vastly improved performance and correctness for GeoJSON sources
2349
+ * Map#setStyle accepts a style URL
2350
+ * Support {prefix} in tile URL templates
2351
+ * Provide a source map with minified source
2352
+
2353
+ #### Breaking
2354
+
2355
+ * Results format for `featuresAt` changed
2356
+
2357
+ ## 0.4.2 (Nov 14 2014)
2358
+
2359
+ #### Bugfixes
2360
+
2361
+ - Ensure only one easing is active at a time (#807)
2362
+ - Don't require style to perform easings (#817)
2363
+ - Fix raster tiles sometimes not showing up (#761)
2364
+
2365
+ #### Improvements
2366
+
2367
+ - Internet Explorer 11 support (experimental)
2368
+
2369
+ ## 0.4.1 (Nov 10 2014)
2370
+
2371
+ #### Bugfixes
2372
+
2373
+ - Interpolate to the closest bearing when doing rotation animations (#818)
2374
+
2375
+ ## 0.4.0 (Nov 4 2014)
2376
+
2377
+ #### Breaking
2378
+
2379
+ - Updated to mapbox-gl-style-spec v6.0.0 ([Changelog](https://github.com/mapbox/mapbox-gl-style-spec/blob/v6.0.0/CHANGELOG.md)). Styles are
2380
+ now expected to be version 6. You can use the [gl-style-migrate](https://github.com/mapbox/mapbox-gl-style-lint#migrations)
2381
+ utility to update existing styles.
2382
+
2383
+ ## 0.3.2 (Oct 23 2014)
2384
+
2385
+ #### Bugfixes
2386
+
2387
+ - Fix worker initialization with deferred or async scripts
2388
+
2389
+ #### Improvements
2390
+
2391
+ - Added map.remove()
2392
+ - CDN assets are now served with gzip compression
2393
+
2394
+ ## 0.3.1 (Oct 06 2014)
2395
+
2396
+ #### Bugfixes
2397
+
2398
+ - Fixed iteration over arrays with for/in
2399
+ - Made browserify deps non-dev (#752)
2400
+
2401
+ ## 0.3.0 (Sep 23 2014)
2402
+
2403
+ #### Breaking
2404
+
2405
+ - Updated to mapbox-gl-style-spec v0.0.5 ([Changelog](https://github.com/mapbox/mapbox-gl-style-spec/blob/v0.0.5/CHANGELOG.md)). Styles are
2406
+ now expected to be version 5. You can use the [gl-style-migrate](https://github.com/mapbox/mapbox-gl-style-lint#migrations)
2407
+ utility to update existing styles.
2408
+ - Removed support for composite layers for performance reasons. [#523](https://github.com/mapbox/mapbox-gl-js/issues/523#issuecomment-51731405)
2409
+ - `raster-hue-rotate` units are now degrees.
2410
+
2411
+ ### Improvements
2412
+
2413
+ - Added LatLng#wrap
2414
+ - Added support for Mapbox fontstack API.
2415
+ - Added support for remote, non-Mapbox TileJSON sources and inline TileJSON sources (#535, #698).
2416
+ - Added support for `symbol-avoid-edges` property to allow labels to be placed across tile edges.
2417
+ - Fixed mkdir issue on Windows (#674).
2418
+ - Fixed drawing beveled line joins without overlap.
2419
+
2420
+ #### Bugfixes
2421
+
2422
+ - Fixed performance when underzooming a layer's minzoom.
2423
+ - Fixed `raster-opacity` for regular raster layers.
2424
+ - Fixed various corner cases of easing functions.
2425
+ - Do not modify original stylesheet (#728).
2426
+ - Inherit video source from source (#699).
2427
+ - Fixed interactivity for geojson layers.
2428
+ - Stop dblclick on navigation so the map does not pan (#715).
2429
+
2430
+ ## 0.2.2 (Aug 12 2014)
2431
+
2432
+ #### Breaking
2433
+
2434
+ - `map.setBearing()` no longer supports a second argument. Use `map.rotateTo` with an `offset` option and duration 0
2435
+ if you need to rotate around a point other than the map center.
2436
+
2437
+ #### Improvements
2438
+
2439
+ - Improved `GeoJSONSource` to also accept URL as `data` option, eliminating a huge performance bottleneck in case of large GeoJSON files.
2440
+ [#669](https://github.com/mapbox/mapbox-gl-js/issues/669) [#671](https://github.com/mapbox/mapbox-gl-js/issues/671)
2441
+ - Switched to a different fill outlines rendering approach. [#668](https://github.com/mapbox/mapbox-gl-js/issues/668)
2442
+ - Made the minified build 12% smaller gzipped (66 KB now).
2443
+ - Added `around` option to `Map` `zoomTo`/`rotateTo`.
2444
+ - Made the permalink hash more compact.
2445
+ - Bevel linejoins no longer overlap and look much better when drawn with transparency.
2446
+
2447
+ #### Bugfixes
2448
+
2449
+ - Fixed the **broken minified build**. [#679](https://github.com/mapbox/mapbox-gl-js/issues/679)
2450
+ - Fixed **blurry icons** rendering. [#666](https://github.com/mapbox/mapbox-gl-js/issues/666)
2451
+ - Fixed `util.supports` WebGL detection producing false positives in some cases. [#677](https://github.com/mapbox/mapbox-gl-js/issues/677)
2452
+ - Fixed invalid font configuration completely blocking tile rendering. [#662](https://github.com/mapbox/mapbox-gl-js/issues/662)
2453
+ - Fixed `Map` `project`/`unproject` to properly accept array-form values.
2454
+ - Fixed sprite loading race condition. [#593](https://github.com/mapbox/mapbox-gl-js/issues/593)
2455
+ - Fixed `GeoJSONSource` `setData` not updating the map until zoomed or panned. [#676](https://github.com/mapbox/mapbox-gl-js/issues/676)
2456
+
2457
+ ## 0.2.1 (Aug 8 2014)
2458
+
2459
+ #### Breaking
2460
+
2461
+ - Changed `Navigation` control signature: now it doesn't need `map` in constructor
2462
+ and gets added with `map.addControl(nav)` or `nav.addTo(map)`.
2463
+ - Updated CSS classes to have consistent naming prefixed with `mapboxgl-`.
2464
+
2465
+ #### Improvements
2466
+
2467
+ - Added attribution control (present by default, disable by passing `attributionControl: false` in options).
2468
+ - Added rotation by dragging the compass control.
2469
+ - Added grabbing cursors for the map by default.
2470
+ - Added `util.inherit` and `util.debounce` functions.
2471
+ - Changed the default debug page style to OSM Bright.
2472
+ - Token replacements now support dashes.
2473
+ - Improved navigation control design.
2474
+
2475
+ #### Bugfixes
2476
+
2477
+ - Fixed compass control to rotate its icon with the map.
2478
+ - Fixed navigation control cursors.
2479
+ - Fixed inertia going to the wrong direction in a rotated map.
2480
+ - Fixed inertia race condition where error was sometimes thrown after erratic panning/zooming.
2481
+
2482
+
2483
+ ## 0.2.0 (Aug 6 2014)
2484
+
2485
+ - First public release.