Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'publisher-production' #8305

Merged
merged 29 commits into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3a871e7
Set default thumbnail for examples page for development (#8025)
katydecorah Mar 21, 2019
d0649cb
v0.54.0-beta.1 (#8084)
mourner Mar 26, 2019
9dd9f00
CP removeFeatureState fix (#8090)
Mar 29, 2019
1f38321
v0.54.0 (#8115)
mourner Apr 3, 2019
797527a
Example for `fill-pattern` (#8022)
hormesiel Apr 8, 2019
0438e5e
move docs dependencies to dev (#8121) (#8129)
mourner Apr 9, 2019
6e6a005
Mapbox-gl-geocoder v4 examples (#8053)
Apr 9, 2019
2b195dc
Studio does support rtl plugin (#8135)
samanpwbb Apr 9, 2019
b32d2ce
Update comment for setRTLTextPlugin (#8143)
HeyStenson Apr 12, 2019
8af8aca
update one more frame after canvas source paused (#8130) (#8163)
mourner Apr 17, 2019
2d9001e
Bugfix - removeFeatureState fails with target.id === 0 (#8150) (#8164)
mourner Apr 17, 2019
428480a
v0.54.0-beta.2 (#8166)
mourner Apr 18, 2019
2aaab27
[docs] meta updates for search (#8142)
katydecorah Apr 22, 2019
c6e1be7
[docs] token refactor in docs-page-shell (#8174)
katydecorah Apr 23, 2019
38e555e
[docs] token refactor in docs-page-shell (#8174) (#8181)
mourner Apr 24, 2019
c3f20b3
Fix disappearing controls in Safari 12+ (#8193) (#8194)
mourner Apr 25, 2019
48dce18
v0.54.0 (take two) (#8184)
mourner Apr 25, 2019
353dc34
Merge branch 'release-liquid' into publisher-production
mourner Apr 25, 2019
b26fcc5
fix imagery endpoint on WMS example (#8203)
Apr 26, 2019
9781993
[email protected] (#8212)
May 1, 2019
1493081
[docs] add trailing slash to `pathname` so resolved URL matches the c…
May 8, 2019
229b71d
Update documentation.yml (#8230)
erictheise May 8, 2019
845433b
update mapbox-gl-geocoder to v4.3.0 (#8231)
May 17, 2019
2dbd0dd
@mapbox/mapbox gl style [email protected] (#8264)
tristen May 20, 2019
0b99b23
Add sku token to Mapbox API tile requests (#14) (#8276)
ryanhamley May 22, 2019
9fcf20e
v1.0.0 (#8277)
May 22, 2019
2b4713d
Merge branch 'release-mojito' into publisher-production
May 22, 2019
b5441bc
[docs] update docs-page-shell (#8254)
May 28, 2019
509fe2a
Merge branch 'publisher-production'
May 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ For further information on the pricing changes, you can read our [blog post](htt
- 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)
- Added tile size info when `map.showTileBoundaries` is turned on. [#7963](https://github.com/mapbox/mapbox-gl-js/pull/7963)
- Significantly improved load times of the benchmark suite. [#8066](https://github.com/mapbox/mapbox-gl-js/pull/8066)
- 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)

### Bug fixes

- 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)
- Fixed a memory leak when calling `source.setData(url)` many times. [#8035](https://github.com/mapbox/mapbox-gl-js/pull/8035)
- Fixed a bug where marker lost focus when dragging. [#7799](https://github.com/mapbox/mapbox-gl-js/pull/7799)
- 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)
- Fixed a bug where default HTML marker positioning was slightly off. [#8074](https://github.com/mapbox/mapbox-gl-js/pull/8074)
- 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)
- Fixed intermittent Flow failures on CI. [#8061](https://github.com/mapbox/mapbox-gl-js/pull/8061)
- 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)
- 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)

## 0.53.1

Expand Down
2 changes: 1 addition & 1 deletion debug/wms.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
map.on('load', function() {
map.addSource('wms-test', {
"type": "raster",
"tiles": ['https://geodata.state.nj.us/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015'
"tiles": ['https://img.nj.gov/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015'
],
"tileSize": 256
});
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In the `.html` file, write the HTML and JavaScript constituting the example.
* Do **not** use custom styles from your personal account. Use only the default `mapbox` account styles.
* When embedding literal JSON (GeoJSON or Mapbox style snippets) into script code, double-quote property names and string values. Elsewhere, use single-quoted strings.

Every example **must** have an accompanying image:
Every example **must** have an accompanying image. To get an image, run the site locally and take a screenshot of the rendered map in the example:

1. Run `npm run create-image <example-file-name> <mapbox-access-token>`. The script will take a screenshot of the map in the example and save it to `docs/img/src/`. Commit the image.
2. Run `npm run start-docs` to verify that your example image is loading as expected.
Expand Down
1 change: 0 additions & 1 deletion docs/components/application-wrapper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';

if (typeof window !== 'undefined') {
window.MapboxPageShellProduction = true;
import(/* webpackChunkName: "assembly-js" */ '@mapbox/mbx-assembly/dist/assembly.js');
}

Expand Down
2 changes: 2 additions & 0 deletions docs/components/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ ${html}

render() {
const {frontMatter} = this.props;
frontMatter.language = ['JavaScript'];
frontMatter.contentType = 'example';
return (
<PageShell meta={frontMatter}>
<div className='relative prose'>
Expand Down
3 changes: 3 additions & 0 deletions docs/components/markdown-page-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class MarkdownPageshell extends React.Component {
if (!meta.pathname) {
meta.pathname = location.pathname;
}
if (frontMatter.contentType) meta.contentType = frontMatter.contentType;
if (frontMatter.language) meta.language = frontMatter.language;
if (frontMatter.level) meta.level = frontMatter.level;
return (
<PageShell meta={meta} {...this.props}>
<div className="prose">
Expand Down
2 changes: 1 addition & 1 deletion docs/components/page_shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class PageShell extends React.Component {
};

return (
<ReactPageShell darkHeaderText={true} includeFooter={false} {...this.props}>
<ReactPageShell site="Mapbox GL JS" darkHeaderText={true} includeFooter={false} {...this.props}>
<Helmet>
<link
rel="canonical"
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ toc:
- CustomLayerInterface
- name: Geography & Geometry
description: |
`LngLat` and `LngLatBounds` represent points and rectanges in geographic
`LngLat` and `LngLatBounds` represent points and rectangles in geographic
coordinates. `Point` represents points in screen coordinates.
- LngLat
- LngLatLike
Expand Down
Binary file added docs/img/src/fill-pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/img/src/mapbox-gl-geocoder-proximity-bias.png
Binary file not shown.
Binary file added docs/img/src/mapbox-gl-geocoder-with-flyto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/src/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs/pages/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import LinkerStack from 'documentation/src/output/util/linker_stack';
import ApiItem from '../components/api-item';

const meta = {
title: 'Mapbox GL JS API',
title: 'API Reference',
description: 'The Mapbox GL JS API documentation to render interactive maps from vector tiles and Mapbox styles.',
pathname: '/mapbox-gl-js/api'
pathname: '/mapbox-gl-js/api/',
contentType: 'API',
lanaguage: ['JavaScript']
};

const linkerStack = new LinkerStack({})
Expand Down
49 changes: 49 additions & 0 deletions docs/pages/example/fill-pattern.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<div id='map'></div>

<script>
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v9',
zoom: 1
});

map.on('load', function() {
// Add GeoJSON data
map.addSource('source', {
"type": "geojson",
"data": {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-30, -25],
[-30, 35],
[30, 35],
[30, -25],
[-30, -25]
]]
}
}
});

// Load an image to use as the pattern
map.loadImage('https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/64px-Cat_silhouette.svg.png', function(err, image) {
// Throw an error if something went wrong
if (err) throw err;

// Declare the image
map.addImage('pattern', image);

// Use it
map.addLayer({
"id": "pattern-layer",
"type": "fill",
"source": "source",
"paint": {
"fill-pattern": "pattern"
}
});
});
});
</script>
10 changes: 10 additions & 0 deletions docs/pages/example/fill-pattern.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*---
title: Add a pattern to a polygon
description: Use [fill-pattern](https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-fill-fill-pattern) to draw a polygon from a repeating image pattern.
tags:
- layers
pathname: /mapbox-gl-js/example/fill-pattern/
---*/
import Example from '../../components/example';
import html from './fill-pattern.html';
export default Example(html);
7 changes: 4 additions & 3 deletions docs/pages/example/forward-geocode-custom-data.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.css' type='text/css' />
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.css' type='text/css' />
<div id='map'></div>

<script>
Expand Down Expand Up @@ -163,6 +163,7 @@
accessToken: mapboxgl.accessToken,
localGeocoder: forwardGeocoder,
zoom: 14,
placeholder: "Enter search e.g. Lincoln Park"
placeholder: "Enter search e.g. Lincoln Park",
mapboxgl: mapboxgl
}));
</script>
1 change: 0 additions & 1 deletion docs/pages/example/jump-to.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
]
};

mapboxgl.accessToken = 'pk.eyJ1IjoibWFsLXdvb2QiLCJhIjoiY2oyZ2t2em50MDAyMzJ3cnltMDFhb2NzdiJ9.X-D4Wvo5E5QxeP7K_I3O8w';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
Expand Down
9 changes: 5 additions & 4 deletions docs/pages/example/mapbox-gl-geocoder-accept-coordinates.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.css' type='text/css' />
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.css' type='text/css' />
<div id='map'></div>

<script>
Expand Down Expand Up @@ -28,7 +28,7 @@
type: "Point",
coordinates: [lng, lat]
},
place_name: 'Lat: ' + lat + ', Lng: ' + lng, // eslint-disable-line camelcase
place_name: 'Lat: ' + lat + ' Lng: ' + lng, // eslint-disable-line camelcase
place_type: ['coordinate'], // eslint-disable-line camelcase
properties: {},
type: 'Feature'
Expand Down Expand Up @@ -62,6 +62,7 @@
accessToken: mapboxgl.accessToken,
localGeocoder: coordinatesGeocoder,
zoom: 4,
placeholder: "Try: -40, 170"
placeholder: "Try: -40, 170",
mapboxgl: mapboxgl
}));
</script>
39 changes: 39 additions & 0 deletions docs/pages/example/mapbox-gl-geocoder-custom-render.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.css' type='text/css' />
<style>
.geocoder-dropdown-item{
padding: 5px
}
.geocoder-dropdown-icon{
margin-right: 10px;
}
.geocoder-dropdown-text{
color: #5a3fc0;
font-family: Arial, Helvetica, sans-serif;
font-size: larger;
}
</style>
<div id='map'></div>

<script>
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v9',
center: [-79.4512, 43.6568],
zoom: 13
});

var geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
types: 'poi',
// see https://docs.mapbox.com/api/search/#geocoding-response-object for information about the schema of each response feature
render: function(item) {
// extract the item's maki icon or use a default
var maki = item.properties.maki || 'marker';
return "<div class='geocoder-dropdown-item'><img class='geocoder-dropdown-icon' src='https://unpkg.com/@mapbox/[email protected]/icons/" + maki + "-15.svg'><span class='geocoder-dropdown-text'>" + item.text + "</span></div>";
},
mapboxgl: mapboxgl
});
map.addControl(geocoder);

</script>
12 changes: 12 additions & 0 deletions docs/pages/example/mapbox-gl-geocoder-custom-render.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*---
title: Use a custom render function with a geocoder
description: >-
Use a custom html rendering function with the [mapbox-gl-geocoder](https://github.com/mapbox/mapbox-gl-geocoder)
to customize how the dropdown menu is displayed.
tags:
- geocoder
pathname: /mapbox-gl-js/example/mapbox-gl-geocoder-custom-render/
---*/
import Example from '../../components/example';
import html from './mapbox-gl-geocoder-custom-render.html';
export default Example(html);
7 changes: 4 additions & 3 deletions docs/pages/example/mapbox-gl-geocoder-limit-region.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.css' type='text/css' />
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.css' type='text/css' />
<div id='map'></div>

<script>
Expand Down Expand Up @@ -31,6 +31,7 @@
}).reduce(function (acc, cur) {
return acc || cur;
});
}
},
mapboxgl: mapboxgl
}));
</script>
7 changes: 4 additions & 3 deletions docs/pages/example/mapbox-gl-geocoder-outside-the-map.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v3.1.6/mapbox-gl-geocoder.css' type='text/css' />
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.css' type='text/css' />
<style>
.geocoder {
position:absolute;
Expand All @@ -23,7 +23,8 @@
});

var geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl
});

document.getElementById('geocoder').appendChild(geocoder.onAdd(map));
Expand Down
31 changes: 0 additions & 31 deletions docs/pages/example/mapbox-gl-geocoder-proximity-bias.html

This file was deleted.

13 changes: 0 additions & 13 deletions docs/pages/example/mapbox-gl-geocoder-proximity-bias.js

This file was deleted.

30 changes: 30 additions & 0 deletions docs/pages/example/mapbox-gl-geocoder-with-flyto.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v4.3.0/mapbox-gl-geocoder.css' type='text/css' />
<div id='map'></div>

<script>
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v9',
center: [-79.4512, 43.6568],
zoom: 13
});

var geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
flyTo: {
bearing: 0,
// These options control the flight curve, making it move
// slowly and zoom out almost completely before starting
// to pan.
speed: 0.2, // make the flying slow
curve: 1, // change the speed at which it zooms out
// This can be any easing function: it takes a number between
// 0 and 1 and returns another number between 0 and 1.
easing: function (t) { return t; }
},
mapboxgl: mapboxgl
});
map.addControl(geocoder);

</script>
12 changes: 12 additions & 0 deletions docs/pages/example/mapbox-gl-geocoder-with-flyto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*---
title: Use a custom camera animation with a geocoder
description: >-
Use camera animation options with the [mapbox-gl-geocoder](https://github.com/mapbox/mapbox-gl-geocoder)
to create a custom animation when a result is selected.
tags:
- geocoder
pathname: /mapbox-gl-js/example/mapbox-gl-geocoder-with-flyto/
---*/
import Example from '../../components/example';
import html from './mapbox-gl-geocoder-with-flyto.html';
export default Example(html);
Loading