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

Update example links #131

Merged
merged 4 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Features and improvements

- *...Add new stuff here...*
- Update example links to https://maplibre.org/maplibre-gl-js-docs/ (#131)
- Improve performance of layers with constant `*-sort-key` (#78)

### 🐞 Bug fixes
Expand Down
7 changes: 3 additions & 4 deletions src/geo/lng_lat.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ export const earthRadius = 6371008.8;
* @example
* var ll = new mapboxgl.LngLat(-123.9749, 40.7736);
* ll.lng; // = -123.9749
* @see [Get coordinates of the mouse pointer](https://www.mapbox.com/mapbox-gl-js/example/mouse-position/)
* @see [Display a popup](https://www.mapbox.com/mapbox-gl-js/example/popup/)
* @see [Highlight features within a bounding box](https://www.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/)
* @see [Create a timeline animation](https://www.mapbox.com/mapbox-gl-js/example/timeline-animation/)
* @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/mouse-position/)
* @see [Display a popup](https://maplibre.org/maplibre-gl-js-docs/example/popup/)
* @see [Create a timeline animation](https://maplibre.org/maplibre-gl-js-docs/example/timeline-animation/)
*/
class LngLat {
lng: number;
Expand Down
2 changes: 1 addition & 1 deletion src/geo/mercator_coordinate.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function mercatorScale(lat: number) {
* @example
* var nullIsland = new mapboxgl.MercatorCoordinate(0.5, 0.5, 0);
*
* @see [Add a custom style layer](https://www.mapbox.com/mapbox-gl-js/example/custom-style-layer/)
* @see [Add a custom style layer](https://maplibre.org/maplibre-gl-js-docs/example/custom-style-layer/)
*/
class MercatorCoordinate {
x: number;
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const exported = {
* @returns {string} The currently set access token.
* @example
* mapboxgl.accessToken = myAccessToken;
* @see [Display a map](https://www.mapbox.com/mapbox-gl-js/examples/)
* @see [Display a map](https://maplibre.org/maplibre-gl-js-docs/examples/)
*/
get accessToken(): ?string {
return config.ACCESS_TOKEN;
Expand Down Expand Up @@ -197,7 +197,7 @@ Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPer
* if (!mapboxgl.supported()) {
* alert('Your browser does not support Mapbox GL');
* }
* @see [Check for browser support](https://www.mapbox.com/mapbox-gl-js/example/check-for-support/)
* @see [Check for browser support](https://maplibre.org/maplibre-gl-js-docs/example/check-for-support/)
*/

/**
Expand All @@ -211,7 +211,7 @@ Debug.extend(exported, {isSafari, getPerformanceMetrics: PerformanceUtils.getPer
* rtl text will then be rendered only after the plugin finishes loading.
* @example
* mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js');
* @see [Add support for right-to-left scripts](https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/)
* @see [Add support for right-to-left scripts](https://maplibre.org/maplibre-gl-js-docs/example/mapbox-gl-rtl-text/)
*/

/**
Expand Down
8 changes: 4 additions & 4 deletions src/source/geojson_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ import type {GeoJSONSourceSpecification, PromoteIdSpecification} from '../style-
* }
* }]
* });
* @see [Draw GeoJSON points](https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/)
* @see [Add a GeoJSON line](https://www.mapbox.com/mapbox-gl-js/example/geojson-line/)
* @see [Create a heatmap from points](https://www.mapbox.com/mapbox-gl-js/example/heatmap/)
* @see [Create and style clusters](https://www.mapbox.com/mapbox-gl-js/example/cluster/)
* @see [Draw GeoJSON points](https://maplibre.org/maplibre-gl-js-docs/example/geojson-markers/)
* @see [Add a GeoJSON line](https://maplibre.org/maplibre-gl-js-docs/example/geojson-line/)
* @see [Create a heatmap from points](https://maplibre.org/maplibre-gl-js-docs/example/heatmap/)
* @see [Create and style clusters](https://maplibre.org/maplibre-gl-js-docs/example/cluster/)
*/
class GeoJSONSource extends Evented implements Source {
type: 'geojson';
Expand Down
1 change: 0 additions & 1 deletion src/source/image_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ type Coordinates = [[number, number], [number, number], [number, number], [numbe
* })
*
* map.removeSource('some id'); // remove
* @see [Add an image](https://www.mapbox.com/mapbox-gl-js/example/image-on-a-map/)
*/
class ImageSource extends Evented implements Source {
type: string;
Expand Down
4 changes: 2 additions & 2 deletions src/source/vector_tile_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import type {VectorSourceSpecification, PromoteIdSpecification} from '../style-s
*
* @example
* map.getSource('some id').setTiles(['https://d25uarhxywzl1j.cloudfront.net/v0.1/{z}/{x}/{y}.mvt']);
* @see [Add a vector tile source](https://docs.mapbox.com/mapbox-gl-js/example/vector-source/)
* @see [Add a third party vector tile source](https://docs.mapbox.com/mapbox-gl-js/example/third-party/)
* @see [Add a vector tile source](https://maplibre.org/maplibre-gl-js-docs/example/vector-source/)
* @see [Add a third party vector tile source](https://maplibre.org/maplibre-gl-js-docs/example/third-party/)
*/
class VectorTileSource extends Evented implements Source {
type: 'vector';
Expand Down
2 changes: 1 addition & 1 deletion src/source/video_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import type {VideoSourceSpecification} from '../style-spec/types';
* ]);
*
* map.removeSource('some id'); // remove
* @see [Add a video](https://www.mapbox.com/mapbox-gl-js/example/video-on-a-map/)
* @see [Add a video](https://maplibre.org/maplibre-gl-js-docs/example/video-on-a-map/)
*/
class VideoSource extends ImageSource {
options: VideoSourceSpecification;
Expand Down
2 changes: 1 addition & 1 deletion src/style/style_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function renderStyleImage(image: StyleImage) {
* @property {number} height
* @property {Uint8Array | Uint8ClampedArray} data
*
* @see [Add an animated icon to the map.](https://docs.mapbox.com/mapbox-gl-js/example/add-image-animated/)
* @see [Add an animated icon to the map.](https://maplibre.org/maplibre-gl-js-docs/example/add-image-animated/)
*
* @example
* var flashingSquare = {
Expand Down
32 changes: 16 additions & 16 deletions src/ui/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ import type {PaddingOptions} from '../geo/edge_insets';
* bearing: -60,
* zoom: 10
* });
* @see [Set pitch and bearing](https://docs.mapbox.com/mapbox-gl-js/example/set-perspective/)
* @see [Jump to a series of locations](https://docs.mapbox.com/mapbox-gl-js/example/jump-to/)
* @see [Fly to a location](https://docs.mapbox.com/mapbox-gl-js/example/flyto/)
* @see [Display buildings in 3D](https://docs.mapbox.com/mapbox-gl-js/example/3d-buildings/)
* @see [Set pitch and bearing](https://maplibre.org/maplibre-gl-js-docs/example/set-perspective/)
* @see [Jump to a series of locations](https://maplibre.org/maplibre-gl-js-docs/example/jump-to/)
* @see [Fly to a location](https://maplibre.org/maplibre-gl-js-docs/example/flyto/)
* @see [Display buildings in 3D](https://maplibre.org/maplibre-gl-js-docs/example/3d-buildings/)
*/
export type CameraOptions = {
center?: LngLatLike,
Expand Down Expand Up @@ -108,8 +108,8 @@ export type AnimationOptions = {
* map.fitBounds(bbox, {
* padding: 20
* });
* @see [Fit to the bounds of a LineString](https://docs.mapbox.com/mapbox-gl-js/example/zoomto-linestring/)
* @see [Fit a map to a bounding box](https://docs.mapbox.com/mapbox-gl-js/example/fitbounds/)
* @see [Fit to the bounds of a LineString](https://maplibre.org/maplibre-gl-js-docs/example/zoomto-linestring/)
* @see [Fit a map to a bounding box](https://maplibre.org/maplibre-gl-js-docs/example/fitbounds/)
*/

class Camera extends Evented {
Expand Down Expand Up @@ -184,7 +184,7 @@ class Camera extends Evented {
* @fires movestart
* @fires moveend
* @returns {Map} `this`
* @see [Navigate the map with game-like controls](https://www.mapbox.com/mapbox-gl-js/example/game-controls/)
* @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js-docs/example/game-controls/)
*/
panBy(offset: PointLike, options?: AnimationOptions, eventData?: Object) {
offset = Point.convert(offset).mult(-1);
Expand All @@ -206,7 +206,7 @@ class Camera extends Evented {
* @example
* // Specify that the panTo animation should last 5000 milliseconds.
* map.panTo([-74, 38], {duration: 5000});
* @see [Update a feature in realtime](https://docs.mapbox.com/mapbox-gl-js/example/live-update-feature/)
* @see [Update a feature in realtime](https://maplibre.org/maplibre-gl-js-docs/example/live-update-feature/)
*/
panTo(lnglat: LngLatLike, options?: AnimationOptions, eventData?: Object) {
return this.easeTo(extend({
Expand Down Expand Up @@ -325,7 +325,7 @@ class Camera extends Evented {
*
* @memberof Map#
* @returns The map's current bearing.
* @see [Navigate the map with game-like controls](https://www.mapbox.com/mapbox-gl-js/example/game-controls/)
* @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js-docs/example/game-controls/)
*/
getBearing(): number { return this.transform.bearing; }

Expand Down Expand Up @@ -612,7 +612,7 @@ class Camera extends Evented {
* map.fitBounds(bbox, {
* padding: {top: 10, bottom:25, left: 15, right: 5}
* });
* @see [Fit a map to a bounding box](https://www.mapbox.com/mapbox-gl-js/example/fitbounds/)
* @see [Fit a map to a bounding box](https://maplibre.org/maplibre-gl-js-docs/example/fitbounds/)
*/
fitBounds(bounds: LngLatBoundsLike, options?: AnimationOptions & CameraOptions, eventData?: Object) {
return this._fitInternal(
Expand Down Expand Up @@ -703,8 +703,8 @@ class Camera extends Evented {
* pitch: 45,
* bearing: 90
* });
* @see [Jump to a series of locations](https://docs.mapbox.com/mapbox-gl-js/example/jump-to/)
* @see [Update a feature in realtime](https://docs.mapbox.com/mapbox-gl-js/example/live-update-feature/)
* @see [Jump to a series of locations](https://maplibre.org/maplibre-gl-js-docs/example/jump-to/)
* @see [Update a feature in realtime](https://maplibre.org/maplibre-gl-js-docs/example/live-update-feature/)
*/
jumpTo(options: CameraOptions, eventData?: Object) {
this.stop();
Expand Down Expand Up @@ -785,7 +785,7 @@ class Camera extends Evented {
* @fires zoomend
* @fires pitchend
* @returns {Map} `this`
* @see [Navigate the map with game-like controls](https://www.mapbox.com/mapbox-gl-js/example/game-controls/)
* @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js-docs/example/game-controls/)
*/
easeTo(options: CameraOptions & AnimationOptions & {easeId?: string}, eventData?: Object) {
this._stop(false, options.easeId);
Expand Down Expand Up @@ -993,9 +993,9 @@ class Camera extends Evented {
* return t;
* }
* });
* @see [Fly to a location](https://www.mapbox.com/mapbox-gl-js/example/flyto/)
* @see [Slowly fly to a location](https://www.mapbox.com/mapbox-gl-js/example/flyto-options/)
* @see [Fly to a location based on scroll position](https://www.mapbox.com/mapbox-gl-js/example/scroll-fly-to/)
* @see [Fly to a location](https://maplibre.org/maplibre-gl-js-docs/example/flyto/)
* @see [Slowly fly to a location](https://maplibre.org/maplibre-gl-js-docs/example/flyto-options/)
* @see [Fly to a location based on scroll position](https://maplibre.org/maplibre-gl-js-docs/example/scroll-fly-to/)
*/
flyTo(options: Object, eventData?: Object) {
// Fall through to jumpTo if user has set prefers-reduced-motion
Expand Down
2 changes: 1 addition & 1 deletion src/ui/control/fullscreen_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Options = {
*
* @example
* map.addControl(new mapboxgl.FullscreenControl({container: document.querySelector('body')}));
* @see [View a fullscreen map](https://www.mapbox.com/mapbox-gl-js/example/fullscreen/)
* @see [View a fullscreen map](https://maplibre.org/maplibre-gl-js-docs/example/fullscreen/)
*/

class FullscreenControl {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/control/geolocate_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ let noTimeout = false;
* },
* trackUserLocation: true
* }));
* @see [Locate the user](https://www.mapbox.com/mapbox-gl-js/example/locate-user/)
* @see [Locate the user](https://maplibre.org/maplibre-gl-js-docs/example/locate-user/)
*/
class GeolocateControl extends Evented {
_map: Map;
Expand Down
4 changes: 2 additions & 2 deletions src/ui/control/navigation_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const defaultOptions: Options = {
* @example
* var nav = new mapboxgl.NavigationControl();
* map.addControl(nav, 'top-left');
* @see [Display map navigation controls](https://www.mapbox.com/mapbox-gl-js/example/navigation/)
* @see [Add a third party vector tile source](https://www.mapbox.com/mapbox-gl-js/example/third-party/)
* @see [Display map navigation controls](https://maplibre.org/maplibre-gl-js-docs/example/navigation/)
* @see [Add a third party vector tile source](https://maplibre.org/maplibre-gl-js-docs/example/third-party/)
*/
class NavigationControl {
_map: Map;
Expand Down
Loading