Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/mb-pages'
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis committed Nov 28, 2018
2 parents 9aa1a49 + 11a031d commit 16a0c1d
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 26 deletions.
59 changes: 59 additions & 0 deletions docs/pages/example/animate-camera-around-point.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<div id='map'></div>
<script>
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v9',
center: [-87.62712, 41.89033],
zoom: 15.5,
pitch: 45
});

function rotateCamera(timestamp) {
// clamp the rotation between 0 -360 degrees
// Divide timestamp by 100 to slow rotation to ~10 degrees / sec
map.rotateTo((timestamp / 100) % 360, {duration: 0});
// Request the next frame of the animation.
requestAnimationFrame(rotateCamera);
}


map.on('load', function () {
// Start the animation.
rotateCamera(0);

// Add 3d buildings and remove label layers to enhance the map
var layers = map.getStyle().layers;
for (var i = 0; i < layers.length; i++) {
if (layers[i].type === 'symbol' && layers[i].layout['text-field']) {
// remove text labels
map.removeLayer(layers[i].id);
}
}

map.addLayer({
'id': '3d-buildings',
'source': 'composite',
'source-layer': 'building',
'filter': ['==', 'extrude', 'true'],
'type': 'fill-extrusion',
'minzoom': 15,
'paint': {
'fill-extrusion-color': '#aaa',

// use an 'interpolate' expression to add a smooth transition effect to the
// buildings as the user zooms in
'fill-extrusion-height': [
"interpolate", ["linear"], ["zoom"],
15, 0,
15.05, ["get", "height"]
],
'fill-extrusion-base': [
"interpolate", ["linear"], ["zoom"],
15, 0,
15.05, ["get", "min_height"]
],
'fill-extrusion-opacity': .6
}
});
});
</script>
10 changes: 10 additions & 0 deletions docs/pages/example/animate-camera-around-point.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*---
title: Animate map camera around a point
description: Animate map camera around a point
tags:
- camera
pathname: /mapbox-gl-js/example/animate-camera-around-point
---*/
import Example from '../../components/example';
import html from './animate-camera-around-point.html';
export default Example(html);
4 changes: 4 additions & 0 deletions docs/pages/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ const plugins = {
"description": "adds a Geocoder control to Mapbox GL JS",
"example": "mapbox-gl-geocoder"
},
"mapbox-gl-infobox": {
"website": "https://github.com/el/infobox-control",
"description": "adds a control to display an infobox or a gradient"
},
"mapbox-gl-style-switcher": {
"website": "https://github.com/el/style-switcher",
"description": "adds a control to switch between styles"
Expand Down
31 changes: 26 additions & 5 deletions src/style-spec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
## 13.4.0

### ✨ Features and improvements
* **Tighten style validation**
* Disallow expressions as stop values ([#7396](https://github.com/mapbox/mapbox-gl-js/pull/7396))
* Disallow `feature-state` expressions in filters ([#7366](https://github.com/mapbox/mapbox-gl-js/pull/7366))

## 13.3.0

### 🐛 Bug fixes
* **Expressions**
* 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))
* 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))
* Allow calling `to-color` on values that are already of type `Color` ([#7260](https://github.com/mapbox/mapbox-gl-js/pull/7260))
* Fix `to-array` for empty arrays (([#7261](https://github.com/mapbox/mapbox-gl-js/pull/7261)))
* Fix identity functions for `text-field` when using formatted text ([#7351](https://github.com/mapbox/mapbox-gl-js/pull/7351))
* 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))

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

## 13.2.0

## 🐛 Bug fixes
### 🐛 Bug fixes
* 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))

## ✨ Features and improvements
### ✨ Features and improvements
* Add `symbol-z-order` symbol layout property to style spec ([#7219](https://github.com/mapbox/mapbox-gl-js/pull/7219))
* Implement data-driven styling support for `*-pattern properties` ([#6289](https://github.com/mapbox/mapbox-gl-js/pull/6289))

## 13.1.1

## 🐛 Bug fixes
### 🐛 Bug fixes
* Fix broken module import in mapboxgl-style-spec (v13.0.1) ([#6984](https://github.com/mapbox/mapbox-gl-js/issues/6984), fixed by [#6997](https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/6997))

## ✨ Features and improvements
### ✨ Features and improvements
* Improve formatting for style output ([#7029](https://github.com/mapbox/mapbox-gl-js/pull/7029))

## 13.1.0

## ✨ Features and improvements
### ✨ Features and improvements
* Add `raster-resampling` raster paint property ([#6411](https://github.com/mapbox/mapbox-gl-js/pull/6411)) (h/t [andrewharvey](https://github.com/andrewharvey))
* Add `symbol-placement: line-center` ([#6821](https://github.com/mapbox/mapbox-gl-js/pull/6821))

Expand Down
2 changes: 1 addition & 1 deletion src/style-spec/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mapbox/mapbox-gl-style-spec",
"description": "a specification for mapbox gl styles",
"version": "13.3.0",
"version": "13.4.0",
"author": "Mapbox",
"keywords": [
"mapbox",
Expand Down
4 changes: 3 additions & 1 deletion src/style-spec/reference/v8.json
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,9 @@
"sdk-support": {
"basic functionality": {
"js": "0.49.0",
"ios": "4.5.0"
"android": "6.6.0",
"ios": "4.5.0",
"macos": "0.12.0"
},
"data-driven styling": {}
},
Expand Down
2 changes: 1 addition & 1 deletion vendor/dotcom-page-shell/page-shell-script.js

Large diffs are not rendered by default.

42 changes: 24 additions & 18 deletions vendor/dotcom-page-shell/react-page-shell.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
'use strict';

function _interopDefault(ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var React = require('react');
var React__default = _interopDefault(React);
Expand Down Expand Up @@ -461,8 +461,8 @@ var PopupMenu = function (_React$Component) {
key: 'renderName',
value: function renderName() {
var _props = this.props,
name = _props.name,
shortName = _props.shortName;
name = _props.name,
shortName = _props.shortName;

if (shortName) {
return React__default.createElement(
Expand Down Expand Up @@ -490,8 +490,8 @@ var PopupMenu = function (_React$Component) {
menuNameClasses += this.props.darkText ? ' shell-navigation-menu-button shell-transition shell-color-gray-dark shell-color-blue-on-hover' : ' shell-navigation-menu-button shell-link shell-link--white';

var _props2 = this.props,
name = _props2.name,
children = _props2.children;
name = _props2.name,
children = _props2.children;


return React__default.createElement(
Expand Down Expand Up @@ -904,6 +904,9 @@ var navigationMenuData = {
}, {
name: 'Careers',
to: '/jobs/'
}, {
name: 'Diversity & Inclusion',
to: '/diversity-inclusion/'
}]
}
},
Expand Down Expand Up @@ -984,6 +987,9 @@ var navigationMenuData = {
}, {
name: 'Careers',
to: '/careers/'
}, {
name: 'Diversity & Inclusion',
to: '/diversity-inclusion/'
}, {
name: 'Team',
to: '/about/team/'
Expand Down Expand Up @@ -1051,7 +1057,7 @@ var CompanyMenu = function (_React$Component) {
_extends({}, this.props, { name: 'Company' }),
React__default.createElement(
'div',
{ className: 'shell-w180-mm shell-py30 shell-px30' },
{ className: 'shell-py30 shell-px30' },
React__default.createElement(
'ul',
null,
Expand Down Expand Up @@ -2725,18 +2731,18 @@ var MetaTagger = function (_React$PureComponent) {
'data-type': 'string',
content: props.title
}, {
class: 'swiftype',
name: 'excerpt',
'data-type': 'string',
content: props.description
}, { name: 'twitter:image:alt', content: props.imageAlt }, { property: 'og:image', content: props.imageUrl }, {
class: 'swiftype',
name: 'image',
'data-type': 'enum',
content: props.imageUrl
},
// https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
{ name: 'theme-color', content: '#4264fb' });
class: 'swiftype',
name: 'excerpt',
'data-type': 'string',
content: props.description
}, { name: 'twitter:image:alt', content: props.imageAlt }, { property: 'og:image', content: props.imageUrl }, {
class: 'swiftype',
name: 'image',
'data-type': 'enum',
content: props.imageUrl
},
// https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
{ name: 'theme-color', content: '#4264fb' });

if (props.largeImage) {
metaItems.push({ name: 'twitter:card', content: 'summary_large_image' }, { name: 'twitter:image', content: props.imageUrl });
Expand Down

0 comments on commit 16a0c1d

Please sign in to comment.