Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mapbox/mapbox-gl-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.9.1
Choose a base ref
...
head repository: mapbox/mapbox-gl-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.10.0
Choose a head ref

Commits on Mar 11, 2020

  1. Copy the full SHA
    d144fbc View commit details

Commits on Mar 12, 2020

  1. Copy the full SHA
    da4fa2f View commit details
  2. Copy the full SHA
    b238b15 View commit details

Commits on Mar 15, 2020

  1. Copy the full SHA
    2ce78cd View commit details

Commits on Mar 16, 2020

  1. update changelog for v1.8.1

    kkaefer committed Mar 16, 2020
    Copy the full SHA
    03db9b5 View commit details

Commits on Mar 17, 2020

  1. Copy the full SHA
    a259774 View commit details
  2. Copy the full SHA
    2e3ffcd View commit details

Commits on Mar 18, 2020

  1. Copy the full SHA
    7436884 View commit details

Commits on Mar 19, 2020

  1. Use TileCoordinates instead of LngLats for within calculation (#9428)

    * Using TileCoordinates instead of LngLat for within calculation
    
    * Update tests
    
    * Adapt test data
    
    * Add render tests
    zmiao authored Mar 19, 2020
    Copy the full SHA
    96c4b66 View commit details

Commits on Mar 23, 2020

  1. v1.9.0 (#9444) (#9453)

    Ryan Hamley authored Mar 23, 2020
    Copy the full SHA
    6ffd74e View commit details
  2. Don't reload the entire font range when a glyph is missing in a font (#…

    …9375)
    
    * Ignore missing glyph when font range is already loaded
    
    * Add test
    
    * lint
    
    * Fix tests
    
    * Remove line
    
    * Remove line
    
    * Lint
    
    * Add ranges flow definition
    
    * Use helpers function
    oterral authored Mar 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a2afce6 View commit details

Commits on Mar 24, 2020

  1. populate paint arrays once per line feature (#9452)

    instead of once per linestring in a multiline
    ansis authored Mar 24, 2020
    Copy the full SHA
    eeab959 View commit details
  2. fix fill extrusion querying for colinear points (#9454)

    When checking for intersections with a fill-extrusion it has to
    calculate the distance to the plane the polygon exist on. If the first
    points of the geometry were colinear this calculation would fail.
    
    It now:
    - finds two distinct starting points a, b
    - loops over all the remaining vertices looking for a value that is not
    colinear with a, b
    
    Usually this will be the first vertex it encounters.
    ansis authored Mar 24, 2020
    Copy the full SHA
    0e04a3a View commit details

Commits on Mar 26, 2020

  1. Fix within expression issue with geometry crossing the 180th Meridi…

    …an (#9440)
    
    * Fix geometry accross meridian
    
    * Update tests
    
    * Add pre-condintion
    
    * Avoid overflow
    
    * Add more tests
    
    * Adapt test
    
    * Remove unnecessary condition
    
    * Address review findings
    zmiao authored Mar 26, 2020
    Copy the full SHA
    28ae634 View commit details
  2. Upgrade direct dependencies & do yarn upgrade (#9466)

    * upgrade direct dependencies & do yarn upgrade
    
    * fix lint warning
    
    * 😬
    
    * upgrade more stuff
    
    Co-authored-by: Arindam Bose <arindam.bose@mapbox.com>
    mourner and Arindam Bose authored Mar 26, 2020
    Copy the full SHA
    e3e348a View commit details

Commits on Mar 27, 2020

  1. add an extra check for paint member of style layer (#9437)

    * add an extra check for paint member of style layer
    
    * review comments
    
    Co-Authored-By: Vladimir Agafonkin <agafonkin@gmail.com>
    
    Co-authored-by: Vladimir Agafonkin <agafonkin@gmail.com>
    mannnick24 and mourner authored Mar 27, 2020
    Copy the full SHA
    86eae55 View commit details
  2. Copy the full SHA
    180da93 View commit details
  3. Copy the full SHA
    8c8ffb0 View commit details

Commits on Mar 30, 2020

  1. Copy the full SHA
    e27049d View commit details

Commits on Mar 31, 2020

  1. Ensure padding is not propagated from fitBounds to transform padding (#…

    …9481)
    
    (cherry picked from commit 7431c95)
    Arindam Bose authored Mar 31, 2020
    Copy the full SHA
    8131815 View commit details
  2. Fix pattern attributes vertex layout (#9482)

    * Fix vertex layout attribute offset when used with DDS
    The vertex layout offset for patternAttributes is overriden to be 0, this is incorrect as each component of this layout
    require a specific offset to be set to appropriately bind the buffers when calling vertexAttribPointer
    
    * Fix flow
    
    * Cleanup unused param
    
    * Add render tests for data driven styling coverage
    
    * EOL
    karimnaaji authored Mar 31, 2020
    Copy the full SHA
    2faf0ab View commit details

Commits on Apr 1, 2020

  1. Copy the full SHA
    928f3dd View commit details
  2. Update per mdn webgl recommendations (#9474)

    * Update per mdn webgl recommendations
    - Delete shader handles after succesfull compilation
    - Query render to half float texture instead of calling checkFramebufferStatus, potentially involving flush + round-trip on first frame
    
    * Add heatmap layer to release testing
    karimnaaji authored Apr 1, 2020
    Copy the full SHA
    0a7ecc5 View commit details
  3. Copy the full SHA
    cfc57d7 View commit details

Commits on Apr 2, 2020

  1. Ensure each tile symbol tile uses its own unique Program based on its…

    … state (#9493)
    
    (cherry picked from commit 9f1aba5)
    Arindam Bose authored Apr 2, 2020
    Copy the full SHA
    469b9ff View commit details
  2. Copy the full SHA
    274d215 View commit details
  3. Copy the full SHA
    d912efb View commit details

Commits on Apr 3, 2020

  1. Copy the full SHA
    e7deb5c View commit details
  2. Add methods to mapboxgl namespace to allow preloading of workers. (#9391

    )
    
    * Basic preload workers
    
    * Switch to hardcoded preloaded workerpool id so its easier to identify when workers have been preloaded
    
    * Add removePreloadedWorkerPool to mapboxgl namespace
    
    * Fix flow and lint errors
    
    * Add documentation and address CR comments.
    
    * Reword docs language to be clearer.
    
    Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
    
    * More cleaning of language in documentation.
    
    Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
    
    Co-authored-by: Konstantin Käfer <mail@kkaefer.com>
    Arindam Bose and kkaefer authored Apr 3, 2020
    Copy the full SHA
    c10c618 View commit details

Commits on Apr 7, 2020

  1. Remove docs pages from .gitignore file (#9504)

    Ryan Hamley authored Apr 7, 2020
    Copy the full SHA
    6088941 View commit details
  2. refactor and expand gesture handling (#9365)

    Co-authored-by: Anjana Vakil <anjana.vakil@mapbox.com>
    
    - refactor gesture handling to allow multiple handlers to run simultaneously
    - add a pitch gesture
    - add a tap-drag-zoom gesture
    - fix various bugs (see PR)
    ansis authored Apr 7, 2020
    Copy the full SHA
    164b0be View commit details

Commits on Apr 8, 2020

  1. Copy the full SHA
    97037a4 View commit details
  2. Copy the full SHA
    acb48ab View commit details

Commits on Apr 10, 2020

  1. Fix for issue 9518 (#9520)

    * Add regression test for #9518
    
    * More thorough input checks for isPatternMissing function
    Fixes regression introduced by #9380
    
    ResolvedImage.fromString may now return null, which potentially leaves CrossFaded<ResolvedImage>
    with missing image patterns
    
    I have traced other code paths using ResolvedImage.fromString and have not seen
    any other potential offenders
    karimnaaji committed Apr 10, 2020
    Copy the full SHA
    3f08a28 View commit details
  2. Copy the full SHA
    f4c148f View commit details
  3. [master] Fix style-spec isolation for within expression (#9522)

    * - Add a build-time check for style-spec referencing external files
    - Refactor within to NOT import external files
    
    * Address review comments
    
    (cherry picked from commit 2b898c9)
    Arindam Bose authored and karimnaaji committed Apr 10, 2020
    Copy the full SHA
    388424a View commit details
  4. export isExpressionFilter from spec (#9530) (#9534)

    (cherry picked from commit 7ede7d0)
    (cherry picked from commit 4134ce7)
    
    Co-authored-by: Saman Bemel-Benrud <samanpwbb@gmail.com>
    Arindam Bose and samanpwbb authored Apr 10, 2020
    Copy the full SHA
    516f44f View commit details
  5. Copy the full SHA
    5be4ca3 View commit details
  6. update changlogs to add 1.9.1 and style-spec@v13.13.1 (#9541)

    (cherry picked from commit 7f22387)
    Arindam Bose authored Apr 10, 2020
    Copy the full SHA
    65b914d View commit details

Commits on Apr 13, 2020

  1. Add changelog for 1.10.0 (#9542)

    Update version for -beta.1
    karimnaaji authored Apr 13, 2020
    Copy the full SHA
    a60e952 View commit details

Commits on Apr 24, 2020

  1. Documentation improvements sprint (#9607) (#9629)

    Various documentation enhancements from the docs sprints:
    
    * [docsprint] Clarify meaning of Map#isSourceLoaded (#9589)
    * [docsprint] Add geolocate trigger example (#9552)
    * [docsprint] Add inline snippet to marker#addTo (#9592)
    * [docsprint] Add inline snippet and related examples to popup.setHTML (#9538)
    * add inline snippet and related examples to popup.setHTML
    * update see URLs to docs subdomain
    * Add inline and related example for panTo (#9547)
    * Add inline snippet to LngLatBounds.contains (#9548)
    * [docsprint] Add inline snippet and examples to map.jumpTo (#9549)
    * add inline snippet and examples to map.jumpTo
    * minor reorder to match options and text
    * added inline and tutorial examples for map.getCenter (#9551)
    * add example for Marker class setLngLat (#9553)
    * added examples to get- and setLayoutProperty (#9554)
    * add inline snippet and examples to map.triggerRepaint (#9555)
    * CameraOptions - update pitch and bearing definitions, add inline code example, add example links (#9556)
    * add inline code snippet to map.showTileBoundaries (#9557)
    * Mark Debug namespace as private to hide it from the docs (#9558)
    * [docsprint] Add detail to docs on setFeatureState, removeFeatureState, getFeatureState (#9559)
    * add detail to docs on setFeatureState, removeFeatureState, getFeatureState
    * remove trailing spaces
    * [docsprint] map.on: remove extra on section, link to event types, add code snippet, add related (#9560)
    * add examples to open and close popup events (#9565)
    * [docsprint] Clarify how map.moveLayer works (#9566)
    * clarify how map.moveLayer works
    * fix id capitalization
    * [doscprint] add links to EPSG and minor example changes for LngLat (#9570)
    * add links to EPSG and minor example changes for LngLat
    * document the layer object's properties in addLayer (#9571)
    * [docsprint] Add inline snippet and examples to popup.addTo (#9572)
    * added inline example to popup-addto
    * added relevant examples to popup.addto
    * Add inline example for trackPointer (#9575)
    * Add inline example for Popup#getElement (#9576)
    * [docsprint] Add inline examples for Point & PointLike types (#9577)
    * Add inline examples for Point & PointLike types
    * Correct syntax
    * [docsprint] Cleanup doc for MapBoxZoomEvent (#9564)
    * Describe map style object returned by Map#getStyle (#9579)
    * [docsprint] Add inline example for getClusterLeaves (#9580)
    * [docsprint] PaddingOptions - update definition, example, and related (#9581)
    * PaddingOptions - update definition, example, and related
    * Fixes formatting issues
    * [docsprint] Add inline snippet to marker#setPopup, marker#getPopup, and marker#togglePopup (#9582)
    * update setPopup
    * update togglePopup
    * update formatting
    * update setFilter jsdoc (#9586)
    * add more details to getSource (#9587)
    * add clearStorage example (#9588)
    * [docsprint] Add documentation for RequestParameters (#9573)
    * [docsprint] Add inline example for setZoomRate and setWheelZoomRate of scrollZoomHandler (#9593)
    * Add inline example for setZoomRate of scrollZoomHandler
    * add setWheelZoomRate inline example
    * Add inline examples for map zoom-related methods (#9594)
    * [docsprint] Add example to MapMouseEvent (#9595)
    * add example to MapMouseEvent
    * Add examples for GeolocateControl events (#9596)
    * [docsprint] Add example to MapDataEvent (#9597)
    * add example to MapDataEvent
    * add example for getLngLat (#9591)
    * suggested edits for clarifying mouse events
    * Small grammar fix: "optional the `layerId`" -> "the optional `layerId"
    * Update pitch param definition; add Display buildings in 3D example
    * remove example object, light formatting and copyediting
    
    # Conflicts:
    #	src/ui/camera.js
    
    Co-Authored-By: Dan Swick <dan.swick@gmail.com>
    Co-authored-by: Adriana Babakanian <adriana.babakanian@mapbox.com>
    Co-authored-by: Sam Fader <samfader@users.noreply.github.com>
    Co-authored-by: Heather Stenson <heather.stenson@mapbox.com>
    Co-authored-by: Katy DeCorah <decorah@mapbox.com>
    Co-authored-by: jbranigan <john.branigan@mapbox.com>
    Co-authored-by: Jeremy Stratman <jstratman@users.noreply.github.com>
    Co-authored-by: Mal Wood-Santoro <mal.wood@mapbox.com>
    Co-authored-by: Asheem Mamoowala <asheem.mamoowala@mapbox.com>
    Co-authored-by: Colleen McGinnis <colleen.mcginnis@mapbox.com>
    Co-authored-by: geografa <geografa@users.noreply.github.com>
    Co-authored-by: Patrick Leonard <pjleonard37@users.noreply.github.com>
    Co-authored-by: David Wicks <david.wicks@mapbox.com>
    Co-authored-by: Deven Diliberto <deven.diliberto@mapbox.com>
    Co-authored-by: Colleen <colleen.j.mcginnis@gmail.com>
    Co-authored-by: Karim Naaji <karim.naaji@gmail.com>
    
    Co-authored-by: Dan Swick <dan.swick@gmail.com>
    Co-authored-by: Adriana Babakanian <adriana.babakanian@mapbox.com>
    Co-authored-by: Sam Fader <samfader@users.noreply.github.com>
    Co-authored-by: Heather Stenson <heather.stenson@mapbox.com>
    Co-authored-by: Katy DeCorah <decorah@mapbox.com>
    Co-authored-by: jbranigan <john.branigan@mapbox.com>
    Co-authored-by: Jeremy Stratman <jstratman@users.noreply.github.com>
    Co-authored-by: Mal Wood-Santoro <mal.wood@mapbox.com>
    Co-authored-by: Asheem Mamoowala <asheem.mamoowala@mapbox.com>
    Co-authored-by: Colleen McGinnis <colleen.mcginnis@mapbox.com>
    Co-authored-by: geografa <geografa@users.noreply.github.com>
    Co-authored-by: Patrick Leonard <pjleonard37@users.noreply.github.com>
    Co-authored-by: David Wicks <david.wicks@mapbox.com>
    Co-authored-by: Deven Diliberto <deven.diliberto@mapbox.com>
    Co-authored-by: Colleen <colleen.j.mcginnis@gmail.com>
    16 people authored Apr 24, 2020
    Copy the full SHA
    ffd5b5d View commit details

Commits on Apr 27, 2020

  1. Reverse tap-drag-zoom direction (#9618) (#9633)

    fixes #9612
    
    Co-authored-by: Joakim Berglund <neorth@gmail.com>
    karimnaaji and neorth authored Apr 27, 2020
    Copy the full SHA
    4632600 View commit details
  2. v1.10.0 (#9634)

    karimnaaji authored Apr 27, 2020
    Copy the full SHA
    9df0494 View commit details
Showing with 10,495 additions and 6,979 deletions.
  1. +1 −1 .github/PULL_REQUEST_TEMPLATE.md
  2. +0 −3 .gitignore
  3. +71 −0 CHANGELOG.md
  4. +1 −4 LICENSE.txt
  5. +1 −1 bench/benchmarks/paint.js
  6. +2 −0 build/generate-struct-arrays.js
  7. +1 −0 build/test/build-tape.js
  8. +12 −4 debug/rtl.html
  9. +14 −12 package.json
  10. +115 −74 src/data/array_types.js
  11. +4 −4 src/data/bucket/line_bucket.js
  12. +3 −1 src/data/bucket/pattern_attributes.js
  13. +10 −10 src/data/bucket/symbol_attributes.js
  14. +32 −69 src/data/bucket/symbol_bucket.js
  15. +23 −17 src/data/feature_position_map.js
  16. +6 −13 src/data/program_configuration.js
  17. +5 −2 src/geo/lng_lat.js
  18. +9 −0 src/geo/lng_lat_bounds.js
  19. +2 −0 src/gl/context.js
  20. +36 −0 src/index.js
  21. +133 −10 src/render/draw_collision_debug.js
  22. +0 −1 src/render/draw_fill_extrusion.js
  23. +3 −10 src/render/draw_heatmap.js
  24. +3 −7 src/render/draw_symbol.js
  25. +9 −1 src/render/glyph_manager.js
  26. +2 −1 src/render/painter.js
  27. +3 −0 src/render/program.js
  28. +28 −1 src/render/program/collision_program.js
  29. +2 −2 src/render/program/program_uniforms.js
  30. +9 −26 src/shaders/collision_circle.fragment.glsl
  31. +43 −20 src/shaders/collision_circle.vertex.glsl
  32. +16 −0 src/source/geojson_source.js
  33. +5 −0 src/source/rtl_text_plugin.js
  34. +3 −2 src/source/tile.js
  35. +21 −0 src/style-spec/CHANGELOG.md
  36. +6 −26 src/style-spec/expression/definitions/in.js
  37. +4 −0 src/style-spec/expression/definitions/index.js
  38. +89 −0 src/style-spec/expression/definitions/index_of.js
  39. +86 −0 src/style-spec/expression/definitions/slice.js
  40. +146 −77 src/style-spec/expression/definitions/within.js
  41. +20 −0 src/style-spec/expression/types.js
  42. +2 −2 src/style-spec/package.json
  43. +18 −0 src/style-spec/reference/v8.json
  44. +20 −0 src/style-spec/rollup.config.js
  45. +3 −1 src/style-spec/style-spec.js
  46. +26 −20 src/style/style_layer/fill_extrusion_style_layer.js
  47. +29 −137 src/symbol/collision_feature.js
  48. +134 −133 src/symbol/collision_index.js
  49. +61 −0 src/symbol/path_interpolator.js
  50. +97 −35 src/symbol/placement.js
  51. +20 −19 src/symbol/projection.js
  52. +31 −7 src/symbol/symbol_layout.js
  53. +0 −202 src/ui/bind_handlers.js
  54. +160 −28 src/ui/camera.js
  55. +92 −4 src/ui/control/geolocate_control.js
  56. +115 −10 src/ui/control/navigation_control.js
  57. +512 −18 src/ui/events.js
  58. +21 −30 src/ui/handler/box_zoom.js
  59. +48 −0 src/ui/handler/click_zoom.js
  60. +0 −139 src/ui/handler/dblclick_zoom.js
  61. +0 −416 src/ui/handler/drag_pan.js
  62. +0 −378 src/ui/handler/drag_rotate.js
  63. +12 −0 src/ui/handler/handler_util.js
  64. +51 −63 src/ui/handler/keyboard.js
  65. +157 −0 src/ui/handler/map_event.js
  66. +144 −0 src/ui/handler/mouse.js
  67. +46 −24 src/ui/handler/scroll_zoom.js
  68. +62 −0 src/ui/handler/shim/dblclick_zoom.js
  69. +88 −0 src/ui/handler/shim/drag_pan.js
  70. +67 −0 src/ui/handler/shim/drag_rotate.js
  71. +108 −0 src/ui/handler/shim/touch_zoom_rotate.js
  72. +103 −0 src/ui/handler/tap_drag_zoom.js
  73. +133 −0 src/ui/handler/tap_recognizer.js
  74. +93 −0 src/ui/handler/tap_zoom.js
  75. +101 −0 src/ui/handler/touch_pan.js
  76. +232 −222 src/ui/handler/touch_zoom_rotate.js
  77. +158 −0 src/ui/handler_inertia.js
  78. +507 −0 src/ui/handler_manager.js
  79. +365 −97 src/ui/map.js
  80. +49 −11 src/ui/marker.js
  81. +87 −13 src/ui/popup.js
  82. +16 −0 src/util/ajax.js
  83. +16 −0 src/util/debug.js
  84. +3 −5 src/util/dom.js
  85. +19 −1 src/util/global_worker_pool.js
  86. +4 −4 src/util/task_queue.js
  87. +14 −4 src/util/worker_pool.js
  88. +1 −0 test/build/dev.test.js
  89. +1 −0 test/build/min.test.js
  90. +21 −10 test/expression.test.js
  91. +2 −0 test/integration/expression-tests/in/assert-array/test.json
  92. +2 −0 test/integration/expression-tests/in/basic-array/test.json
  93. +2 −2 test/integration/expression-tests/in/invalid-needle/test.json
  94. +26 −0 test/integration/expression-tests/index-of/assert-array/test.json
  95. +26 −0 test/integration/expression-tests/index-of/assert-string/test.json
  96. +46 −0 test/integration/expression-tests/index-of/basic-array/test.json
  97. +32 −0 test/integration/expression-tests/index-of/basic-string/test.json
  98. +28 −0 test/integration/expression-tests/index-of/invalid-haystack/test.json
  99. +24 −0 test/integration/expression-tests/index-of/invalid-needle/test.json
  100. +43 −0 test/integration/expression-tests/index-of/with-from-index/test.json
  101. +23 −0 test/integration/expression-tests/slice/array-one-index/test.json
  102. +31 −0 test/integration/expression-tests/slice/array-two-indexes/test.json
  103. +40 −0 test/integration/expression-tests/slice/invalid-inputs/test.json
  104. +19 −0 test/integration/expression-tests/slice/string-one-index/test.json
  105. +25 −0 test/integration/expression-tests/slice/string-two-indexes/test.json
  106. +81 −0 test/integration/expression-tests/within/line-within-polygons/test.json
  107. +44 −0 test/integration/expression-tests/within/lines-within-polygon/test.json
  108. +57 −0 test/integration/expression-tests/within/lines-within-polygons/test.json
  109. +44 −0 test/integration/expression-tests/within/meridian-issue-line-1/test.json
  110. +56 −0 test/integration/expression-tests/within/meridian-issue-line-2/test.json
  111. +56 −0 test/integration/expression-tests/within/meridian-issue-point-1/test.json
  112. +68 −0 test/integration/expression-tests/within/meridian-issue-point-2/test.json
  113. +248 −0 test/integration/expression-tests/within/point-on-boundary-1/test.json
  114. +248 −0 test/integration/expression-tests/within/point-on-boundary-2/test.json
  115. +248 −0 test/integration/expression-tests/within/point-on-boundary-3/test.json
  116. +106 −0 test/integration/expression-tests/within/point-within-polygons/test.json
  117. +45 −0 test/integration/expression-tests/within/points-within-polygon/test.json
  118. +94 −0 test/integration/expression-tests/within/points-within-polygons/test.json
  119. +1 −1 test/integration/query-tests/regressions/mapbox-gl-js#3534/style.json
  120. +37 −0 test/integration/query-tests/regressions/mapbox-gl-js#8999-2/expected.json
  121. +70 −0 test/integration/query-tests/regressions/mapbox-gl-js#8999-2/style.json
  122. +4 −4 test/integration/query-tests/symbol-features-in/tilted-outside/style.json
  123. +2 −2 test/integration/query-tests/symbol/inside/style.json
  124. +2 −2 test/integration/query-tests/symbol/rotated-inside/style.json
  125. BIN test/integration/render-tests/debug/collision-icon-text-line-translate/expected.png
  126. BIN test/integration/render-tests/debug/collision-lines-large-font/expected.png
  127. +61 −0 test/integration/render-tests/debug/collision-lines-large-font/style.json
  128. BIN test/integration/render-tests/debug/collision-lines-notocjk/expected.png
  129. +58 −0 test/integration/render-tests/debug/collision-lines-notocjk/style.json
  130. BIN test/integration/render-tests/debug/collision-lines-overscaled/expected.png
  131. BIN test/integration/render-tests/debug/collision-lines-pitched-2/expected.png
  132. +76 −0 test/integration/render-tests/debug/collision-lines-pitched-2/style.json
  133. BIN test/integration/render-tests/debug/collision-lines-pitched/expected.png
  134. BIN test/integration/render-tests/debug/collision-lines-simple-words-pitched/expected.png
  135. +127 −0 test/integration/render-tests/debug/collision-lines-simple-words-pitched/style.json
  136. BIN test/integration/render-tests/debug/collision-lines-simple-words/expected.png
  137. +126 −0 test/integration/render-tests/debug/collision-lines-simple-words/style.json
  138. BIN test/integration/render-tests/debug/collision-lines/expected.png
  139. BIN test/integration/render-tests/fill-extrusion-pattern/2x-on-1x-add-image-dds/expected.png
  140. +97 −0 test/integration/render-tests/fill-extrusion-pattern/2x-on-1x-add-image-dds/style.json
  141. BIN test/integration/render-tests/regressions/mapbox-gl-js#5911a/expected.png
  142. BIN test/integration/render-tests/regressions/mapbox-gl-js#9518/expected.png
  143. +27 −0 test/integration/render-tests/regressions/mapbox-gl-js#9518/style.json
  144. BIN test/integration/render-tests/symbol-placement/line-center/expected.png
  145. BIN test/integration/render-tests/text-keep-upright/line-placement-true-pitched/expected.png
  146. BIN test/integration/render-tests/text-pitch-alignment/auto-text-rotation-alignment-map/expected.png
  147. BIN test/integration/render-tests/text-pitch-alignment/map-text-rotation-alignment-map/expected.png
  148. BIN test/integration/render-tests/text-pitch-alignment/viewport-overzoomed/expected.png
  149. BIN test/integration/render-tests/text-pitch-scaling/line-half/expected.png
  150. BIN test/integration/render-tests/within/within-feature-collection-geojson/expected.png
  151. +207 −0 test/integration/render-tests/within/within-feature-collection-geojson/style.json
  152. BIN test/integration/render-tests/within/within-feature-geojson/expected.png
  153. +89 −0 test/integration/render-tests/within/within-feature-geojson/style.json
  154. +3 −0 test/release/index.js
  155. +2 −1 test/unit/gl/state.test.js
  156. +40 −16 test/unit/render/glyph_manager.test.js
  157. +165 −0 test/unit/symbol/clip_line.test.js
  158. +17 −114 test/unit/symbol/collision_feature.js
  159. +146 −0 test/unit/symbol/path_interpolator.test.js
  160. +21 −0 test/unit/ui/camera.test.js
  161. +10 −10 test/unit/ui/handler/dblclick_zoom.test.js
  162. +10 −476 test/unit/ui/handler/drag_pan.test.js
  163. +43 −55 test/unit/ui/handler/drag_rotate.test.js
  164. +130 −0 test/unit/ui/handler/keyboard.test.js
  165. +48 −0 test/unit/ui/handler/map_event.test.js
  166. +3 −0 test/unit/ui/handler/scroll_zoom.test.js
  167. +33 −15 test/unit/ui/handler/touch_zoom_rotate.test.js
  168. +1 −1 test/unit/ui/map.test.js
  169. +9 −3 test/unit/ui/map/isMoving.test.js
  170. +3 −1 test/unit/ui/map/isZooming.test.js
  171. +7 −5 test/util/simulate_interaction.js
  172. +1 −1 test/util/test.js
  173. +0 −2 vendor/docs-page-shell/page-shell-script.js
  174. +0 −706 vendor/docs-page-shell/page-shell-styles.css
  175. +0 −1,233 vendor/docs-page-shell/react-page-shell.js
  176. +2,029 −1,897 yarn.lock
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
- [ ] document any changes to public APIs
- [ ] post benchmark scores
- [ ] manually test the debug page
- [ ] tagged `@mapbox/studio` and/or `@mapbox/map-design-team` if this PR includes style spec or visual changes
- [ ] tagged `@mapbox/map-design-team` `@mapbox/static-apis` if this PR includes style spec API or visual changes
- [ ] tagged `@mapbox/gl-native` if this PR includes shader changes or needs a native port
- [ ] apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
- [ ] add an entry inside this element for inclusion in the `mapbox-gl-js` changelog: `<changelog></changelog>`
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/rollup/build/
/docs/components/api.json
/dist/
/docs/pages/dist/
/docs/img/dist/
*.es.js
*.js.map
node_modules
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
## 1.10.0

### ✨ Features
* 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))
* 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))
* 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))

### 🍏 Gestures
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:

- 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))
- Fix map jump when releasing one finger after pinch zoom ([#9136](https://github.com/mapbox/mapbox-gl-js/issues/9136))
- Stop mousedown and touchstart from interrupting `easeTo` animations when interaction handlers are disabled ([#8725](https://github.com/mapbox/mapbox-gl-js/issues/8725))
- Stop mouse wheel from interrupting animations when `map.scrollZoom` is disabled ([#9230](https://github.com/mapbox/mapbox-gl-js/issues/9230))
- 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))
- 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))

### 🐞 Improvements and bug fixes
* 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))
* 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))
* Avoid throwing errors when calling certain popup methods before the popup element is created ([#9433](https://github.com/mapbox/mapbox-gl-js/pull/9433))
* 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))
* 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))
* 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))
* 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))
* 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))
* 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))
* 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))
* 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))

## 1.9.1

### 🐞 Bug fixes
* 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.
* 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(..)`.
* 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`.

## 1.9.0
With this release, we're adding [a new changelog policy](https://github.com/mapbox/mapbox-gl-js/blob/master/CONTRIBUTING.md#changelog-conventions) to our contribution guidelines.

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).

### ✨ Features
* 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)).
- 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.
- An example of the `within` expression:<br>
`"icon-opacity": ["case", ["==", ["within", "some-polygon"], true], 1,
["==", ["within", "some-polygon"], false], 0]`
* 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))

### 🍏 Improvements
* Results from `queryRenderedFeatures` now have evaluated property values rather than raw expressions ([#9198](https://github.com/mapbox/mapbox-gl-js/pull/9198))
* 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))
* Slightly improve GPU memory footprint ([#9377](https://github.com/mapbox/mapbox-gl-js/pull/9377))
* `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))
* Reduce bundle size and improve visual quality of `showTileBoundaries` debug text ([#9267](https://github.com/mapbox/mapbox-gl-js/pull/9267))

### 🐞 Bug fixes
* 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))
* Allow needle argument to `in` expression to be false ([#9295](https://github.com/mapbox/mapbox-gl-js/pull/9295))
* 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))
* Fix a bug where maps were not displaying inside elements with `dir=rtl` ([#9332](https://github.com/mapbox/mapbox-gl-js/pull/9332))
* 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))
* Prevent exception resulting from `line-dash-array` of empty length ([#9385](https://github.com/mapbox/mapbox-gl-js/pull/9385))
* 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))
* 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))

## 1.8.1

* 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))

## 1.8.0

### ✨ Features and improvements
5 changes: 1 addition & 4 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, Mapbox
Copyright (c) 2020, Mapbox

All rights reserved.

@@ -26,9 +26,6 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-------------------------------------------------------------------------------

Contains Hershey Simplex Font: http://paulbourke.net/dataformats/hershey/

-------------------------------------------------------------------------------

2 changes: 1 addition & 1 deletion bench/benchmarks/paint.js
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ export default class Paint extends Benchmark {
for (const map of this.maps) {
map._styleDirty = true;
map._sourcesDirty = true;
map._render();
map._render(Date.now());
}
}

2 changes: 2 additions & 0 deletions build/generate-struct-arrays.js
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@ const {
collisionBoxLayout,
collisionCircleLayout,
collisionVertexAttributes,
quadTriangle,
placement,
symbolInstance,
glyphOffset,
@@ -164,6 +165,7 @@ createStructArrayType('collision_box', collisionBox, true);
createStructArrayType(`collision_box_layout`, collisionBoxLayout);
createStructArrayType(`collision_circle_layout`, collisionCircleLayout);
createStructArrayType(`collision_vertex`, collisionVertexAttributes);
createStructArrayType(`quad_triangle`, quadTriangle);
createStructArrayType('placed_symbol', placement, true);
createStructArrayType('symbol_instance', symbolInstance, true);
createStructArrayType('glyph_offset', glyphOffset, true);
1 change: 1 addition & 0 deletions build/test/build-tape.js
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ const fs = require('fs');
module.exports = function() {
return new Promise((resolve, reject) => {
browserify(require.resolve('../../test/util/tape_config.js'), { standalone: 'tape' })
.transform("babelify", {presets: ["@babel/preset-env"], global: true})
.bundle((err, buff) => {
if (err) { throw err; }

16 changes: 12 additions & 4 deletions debug/rtl.html
Original file line number Diff line number Diff line change
@@ -30,7 +30,9 @@
<script src='/dist/mapbox-gl-dev.js'></script>
<script src='/debug/access_token_generated.js'></script>
<script>
var pluginURL = 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js';
// badPluginURL allows us to simulate a NetworkError that we can recover from by retrying plugin loading
var badPluginURL = 'http://localhost:9966/debug/2762.html';
var goodPluginURL = 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js';
var map = window.map = new mapboxgl.Map({
container: 'map',
zoom: 16.5,
@@ -40,13 +42,19 @@
});

document.getElementById('loadSync').onclick = function() {
mapboxgl.setRTLTextPlugin(pluginURL);
mapboxgl.setRTLTextPlugin(goodPluginURL);
};

document.getElementById('loadAsync').onclick = function() {
mapboxgl.setRTLTextPlugin(pluginURL, function(err) {
mapboxgl.setRTLTextPlugin(badPluginURL, function(err) {
if (err) {
throw err;
mapboxgl.setRTLTextPlugin(goodPluginURL, function (err) {
if (err) {
throw err;
} else {
console.log('rtl-text-plugin retry loaded successfully');
}
});
} else {
console.log('rtl-text-plugin loaded successfully');
}
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mapbox-gl",
"description": "A WebGL interactive maps library",
"version": "1.9.0-dev",
"version": "1.10.0",
"main": "dist/mapbox-gl.js",
"style": "dist/mapbox-gl.css",
"license": "SEE LICENSE IN LICENSE.txt",
@@ -13,31 +13,32 @@
"node": ">=6.4.0"
},
"dependencies": {
"@mapbox/geojson-rewind": "^0.4.0",
"@mapbox/geojson-rewind": "^0.5.0",
"@mapbox/geojson-types": "^1.0.2",
"@mapbox/jsonlint-lines-primitives": "^2.0.2",
"@mapbox/mapbox-gl-supported": "^1.4.0",
"@mapbox/mapbox-gl-supported": "^1.5.0",
"@mapbox/point-geometry": "^0.1.0",
"@mapbox/tiny-sdf": "^1.1.0",
"@mapbox/tiny-sdf": "^1.1.1",
"@mapbox/unitbezier": "^0.0.0",
"@mapbox/vector-tile": "^1.3.1",
"@mapbox/whoots-js": "^3.1.0",
"csscolorparser": "~1.0.2",
"csscolorparser": "~1.0.3",
"earcut": "^2.2.2",
"geojson-vt": "^3.2.1",
"gl-matrix": "^3.0.0",
"gl-matrix": "^3.2.1",
"grid-index": "^1.1.0",
"minimist": "0.0.8",
"minimist": "^1.2.5",
"murmurhash-js": "^1.0.0",
"pbf": "^3.2.1",
"potpack": "^1.0.1",
"quickselect": "^2.0.0",
"rw": "^1.3.3",
"supercluster": "^7.0.0",
"tinyqueue": "^2.0.0",
"tinyqueue": "^2.0.3",
"vt-pbf": "^3.1.1"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@mapbox/flow-remove-types": "^1.3.0-await.upstream.2",
"@mapbox/gazetteer": "^4.0.4",
"@mapbox/mapbox-gl-rtl-text": "^0.2.1",
@@ -46,8 +47,9 @@
"@rollup/plugin-strip": "^1.3.1",
"address": "^1.1.2",
"babel-eslint": "^10.0.1",
"babelify": "^10.0.0",
"benchmark": "^2.1.4",
"browserify": "^16.2.3",
"browserify": "^16.5.0",
"canvas": "^2.6.1",
"chalk": "^3.0.0",
"chokidar": "^3.0.2",
@@ -105,10 +107,10 @@
"stylelint": "^9.10.1",
"stylelint-config-standard": "^18.2.0",
"tap": "~12.4.1",
"tap-parser": "^9.3.3",
"tape": "^4.11.0",
"tap-parser": "^10.0.1",
"tape": "^4.13.2",
"tape-filter": "^1.0.4",
"testem": "^2.17.0"
"testem": "^3.0.0"
},
"browser": {
"./src/shaders/index.js": "./src/shaders/shaders.js",
Loading