Ortho Earth · Get started · Sandcastle examples · npm

MapLibre GL JS examples v2.4.x

A comparison of the official MapLibre GL JS examples run on Ortho Earth — not the official MapLibre site.

Each of the 139 examples runs unchanged: once on MapLibre GL JS 6.11.2, once on the Ortho Earth globe through its MapLibre-compatible API (@ortho-earth/globe/maplibre: MapLibre's own Map, style, sources, layers, expressions, markers and popups, with Ortho Earth doing the drawing), from the same recorded network data and the same camera. Each card shows MapLibre GL JS on the left and Ortho Earth on the right. Click a card for the larger pictures and the example's source in its Ortho Earth form — run it here, copy it, or download it.

Mercator is not drawn here. Ortho Earth always draws the globe and has no flat Mercator view, so where MapLibre fills the screen with a world map at low zoom, the right-hand picture shows a small globe by design; the notes say so where it matters.

MapLibre GL JS の公式の例を Ortho Earth で走らせた比較です。MapLibre の公式サイトではありません。

139 例を、手を加えずにそれぞれ二度走らせました。一度は MapLibre GL JS 6.11.2 で、一度は MapLibre 互換の API(@ortho-earth/globe/maplibre=Map・style・ソース・層・式・マーカー・ポップアップは MapLibre のまま、描くのは Ortho Earth)を通して Ortho Earth の地球儀で、同じ記録済みの通信と同じカメラから。各カードの左が MapLibre GL JS、右が Ortho Earth です。カードを押すと大きな絵と、Ortho Earth の形にした例のソースが開きます(ここで走らせる・コピー・ダウンロードができます)。

メルカトルは描きません。Ortho Earth はいつも地球儀を描き、平らなメルカトルの眺めがありません。MapLibre が低いズームで世界地図を画面いっぱいに出す所では、右の絵は小さな地球儀になります。それは設計どおりで、要る所には注記があります。

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

3D Terrain

83% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add 3D terrain from quantized-mesh tiles

81% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add 3D tiles using three.js

64%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a 3D model to globe using three.js

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a 3D model using three.js

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a 3D model with shadow using three.js

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a canvas source

note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a COG raster source

48% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a color relief layer

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a custom layer with tiles to a globe

58% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a custom style layer

94%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a default marker

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a generated icon to the map

81% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a GeoJSON line

98% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a GeoJSON polygon

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a hillshade layer

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a multidirectional hillshade layer

80%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a new layer below labels

97% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a pattern to a polygon

78%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a raster tile source

86% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a simple custom layer on a globe

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a stretchable image to the map

27% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a vector tile source

89%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a video

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add a WMS source

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add an animated icon to the map

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add an icon to the map

80% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add Contour Lines

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add custom icons with Markers

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add live realtime data

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Add multiple geometries from one GeoJSON source

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Adding 3D models using three.js on terrain

46% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate a line

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate a marker

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate a point along a route

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate a point

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate a series of images

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate an icon on the GPU

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate map camera around a point

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Animate symbol to follow the mouse

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Attach a popup to a marker instance

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Center the map on a clicked symbol

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Change a layer's color with buttons

96%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Change a map's language

87%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Change building color based on zoom level

95%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Change the case of labels

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Change the default position for attribution

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Check if WebGL is supported

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Cooperative gestures

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a draggable Marker

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a draggable point

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a gradient dashed line using an expression

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a gradient line using an expression

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a Heatmap layer on a globe with terrain elevation

48%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a heatmap layer

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a hover effect

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create a time slider

82%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create and style clusters

96%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Create deck.gl layer using REST API

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Customize camera animations

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Customize the map transform constrain

note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Disable map rotation

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Disable scroll zoom

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a globe with a fill extrusion layer

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a globe with a vector map

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a globe with an atmosphere

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a hybrid satellite map with terrain elevation

64% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a map with MLT

87%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a map

87%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a non-interactive map

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a popup on click

81% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a popup on hover

83% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a popup

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a remote SVG symbol

58% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display a satellite map

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display and style rich text labels

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display buildings in 3D

86%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display HTML clusters with custom properties

75% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display line that crosses 180th meridian

82% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display map navigation controls

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Display Performance Metrics

87% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Draw a Circle

96%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Draw GeoJSON points

85%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Draw geometries with terra-draw

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Draw polygon with mapbox-gl-draw

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Elevate symbols above the terrain

93% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Enter a 360° photosphere

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Extrude polygons for 3D indoor mapping

89%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Fill extrusion rounded corners

61%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Filter layer symbols using global state

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Filter symbols by text input

82% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Filter symbols by toggling a list

81% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Filter within a Layer

70% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Fit a map to a bounding box

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Fit to the bounds of a LineString

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Fly to a location based on scroll position

89%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Fly to a location

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Generate and add a missing icon to the map

79% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Geocode with Nominatim

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Get coordinates of the mouse pointer

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Get features under the mouse pointer

95%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Hash routing

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Jump to a series of locations

94% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Level of Detail Control

55% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Locale switching

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Locate the user

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Measure distances

86%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Navigate the map with game-like controls

75% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Offset the vanishing point using padding

61%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

PMTiles source and protocol

90% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Render world copies

89% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Restrict map panning to an area

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Select features with boxZoomEnd callback

95%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Set center point above ground

91% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Set pitch and bearing

96%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Show polygon information on click

98%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Sky, Fog, Terrain

62% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Slowly fly to a location

91%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Style labels with font faces

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Style labels with local fonts

100%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Style labels with Web fonts

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Style lines with a data-driven property

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Sync movement of multiple maps

87% note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Toggle interactions

90%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Update a feature in realtime

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Update GeoJSON polygons

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Use a fallback image

93%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Use addProtocol to Transform Feature Properties

99%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Use locally generated ideographs

94%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Variable label placement with offset

78%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Variable label placement

80%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

View a fullscreen map

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

View local GeoJSON (experimental)

96%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

View local GeoJSON

96%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Visualize population density

97%

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Walk around a map in first person

note

MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Zoom and planet size relation on globe

92%

Reference picture not shown

MapLibre GL JS
Ortho Earth
Ortho Earth

Add a 3D model with babylon.js

n/a note

Reference picture not shown

MapLibre GL JS
Ortho Earth
Ortho Earth

Toggle deck.gl layer

n/a note

Open on maplibre.org
MapLibre GL JS
MapLibre GL JS
Ortho Earth
Ortho Earth

Run it yourself. This is the example's HTML with only two paths changed: the MapLibre module import is now @ortho-earth/globe/maplibre, and the CSS comes from unpkg. Save it as index.html in a Vite project that has @ortho-earth/globe installed (Get started, Route A), then npm run dev. The engine's workers must come from your own origin, so a bare CDN import does not work. Run above plays this very source right here.

自分で動かす:例の HTML のうち 2 つの道だけを替えたものです(MapLibre の import → @ortho-earth/globe/maplibre・CSS は unpkg の本物)。@ortho-earth/globe を入れた Vite の企画に index.html として置き、npm run dev。エンジンの worker は自分の origin から配る必要があるので、CDN からの直 import では動きません。上の Run はこの本文そのものをこの場で動かします。