mirror of
https://github.com/maputnik/editor.git
synced 2026-07-25 15:27:27 +00:00
Merge branch 'globe' of github.com:wipfli/maputnik into globe
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
- Add german translation
|
- Add german translation
|
||||||
- Use same version number for web and desktop versions
|
- Use same version number for web and desktop versions
|
||||||
- Add scheme type options for vector/raster tile
|
- Add scheme type options for vector/raster tile
|
||||||
|
- Add `tileSize` field for raster and raster-dem tile sources
|
||||||
|
- Update Protomaps Light gallery style to v4
|
||||||
- _...Add new stuff here..._
|
- _...Add new stuff here..._
|
||||||
|
|
||||||
### 🐞 Bug fixes
|
### 🐞 Bug fixes
|
||||||
|
|||||||
@@ -82,6 +82,21 @@ describe("modals", () => {
|
|||||||
scheme: "tms",
|
scheme: "tms",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("add new raster source", () => {
|
||||||
|
let sourceId = "rastertest";
|
||||||
|
when.setValue("modal:sources.add.source_id", sourceId);
|
||||||
|
when.select("modal:sources.add.source_type", "tile_raster");
|
||||||
|
when.select("modal:sources.add.scheme_type", "xyz");
|
||||||
|
when.setValue("modal:sources.add.tile_size", "128");
|
||||||
|
when.click("modal:sources.add.add_source");
|
||||||
|
when.wait(200);
|
||||||
|
then(
|
||||||
|
get.styleFromLocalStorage().then((style) => style.sources[sourceId])
|
||||||
|
).shouldInclude({
|
||||||
|
tileSize: 128,
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("inspect", () => {
|
describe("inspect", () => {
|
||||||
|
|||||||
+3
-3
@@ -32,9 +32,9 @@ $(GOBIN)/rice:
|
|||||||
# Embed the current version number in the executable by writing version.go
|
# Embed the current version number in the executable by writing version.go
|
||||||
.PHONY: version.go
|
.PHONY: version.go
|
||||||
version.go:
|
version.go:
|
||||||
@echo "// DO NOT EDIT: Autogenerated by Makefile\n" > version.go
|
@printf "// DO NOT EDIT: Autogenerated by Makefile\n" > version.go
|
||||||
@echo "package main\n" >> version.go
|
@printf "package main\n" >> version.go
|
||||||
@echo "const Version = \"$(VERSION)\"" >> version.go
|
@printf "const Version = \"$(VERSION)\"\n" >> version.go
|
||||||
|
|
||||||
rice-box.go: $(GOBIN)/rice editor/pull_release
|
rice-box.go: $(GOBIN)/rice editor/pull_release
|
||||||
$(GOBIN)/rice embed-go
|
$(GOBIN)/rice embed-go
|
||||||
|
|||||||
Generated
+3
-3
@@ -3797,9 +3797,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cross-spawn": {
|
"node_modules/cross-spawn": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"path-key": "^3.1.0",
|
"path-key": "^3.1.0",
|
||||||
|
|||||||
@@ -155,10 +155,11 @@ class AddSource extends React.Component<AddSourceProps, AddSourceState> {
|
|||||||
}
|
}
|
||||||
case 'tile_raster': return {
|
case 'tile_raster': return {
|
||||||
type: 'raster',
|
type: 'raster',
|
||||||
tiles: (source as RasterSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`],
|
tiles: (source as RasterSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.png`],
|
||||||
minzoom: (source as RasterSourceSpecification).minzoom || 0,
|
minzoom: (source as RasterSourceSpecification).minzoom || 0,
|
||||||
maxzoom: (source as RasterSourceSpecification).maxzoom || 14,
|
maxzoom: (source as RasterSourceSpecification).maxzoom || 14,
|
||||||
scheme: (source as RasterSourceSpecification).scheme || 'xyz'
|
scheme: (source as RasterSourceSpecification).scheme || 'xyz',
|
||||||
|
tileSize: (source as RasterSourceSpecification).tileSize || 512,
|
||||||
}
|
}
|
||||||
case 'tilejson_raster-dem': return {
|
case 'tilejson_raster-dem': return {
|
||||||
type: 'raster-dem',
|
type: 'raster-dem',
|
||||||
@@ -166,9 +167,10 @@ class AddSource extends React.Component<AddSourceProps, AddSourceState> {
|
|||||||
}
|
}
|
||||||
case 'tilexyz_raster-dem': return {
|
case 'tilexyz_raster-dem': return {
|
||||||
type: 'raster-dem',
|
type: 'raster-dem',
|
||||||
tiles: (source as RasterDEMSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`],
|
tiles: (source as RasterDEMSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.png`],
|
||||||
minzoom: (source as RasterDEMSourceSpecification).minzoom || 0,
|
minzoom: (source as RasterDEMSourceSpecification).minzoom || 0,
|
||||||
maxzoom: (source as RasterDEMSourceSpecification).maxzoom || 14
|
maxzoom: (source as RasterDEMSourceSpecification).maxzoom || 14,
|
||||||
|
tileSize: (source as RasterDEMSourceSpecification).tileSize || 512
|
||||||
}
|
}
|
||||||
case 'image': return {
|
case 'image': return {
|
||||||
type: 'image',
|
type: 'image',
|
||||||
|
|||||||
@@ -308,9 +308,30 @@ class ModalSourcesTypeEditorInternal extends React.Component<ModalSourcesTypeEdi
|
|||||||
case 'tilejson_vector': return <TileJSONSourceEditor {...commonProps} />
|
case 'tilejson_vector': return <TileJSONSourceEditor {...commonProps} />
|
||||||
case 'tile_vector': return <TileURLSourceEditor {...commonProps} />
|
case 'tile_vector': return <TileURLSourceEditor {...commonProps} />
|
||||||
case 'tilejson_raster': return <TileJSONSourceEditor {...commonProps} />
|
case 'tilejson_raster': return <TileJSONSourceEditor {...commonProps} />
|
||||||
case 'tile_raster': return <TileURLSourceEditor {...commonProps} />
|
case 'tile_raster': return <TileURLSourceEditor {...commonProps}>
|
||||||
|
<FieldNumber
|
||||||
|
label={t("Tile Size")}
|
||||||
|
fieldSpec={latest.source_raster.tileSize}
|
||||||
|
onChange={tileSize => this.props.onChange({
|
||||||
|
...this.props.source,
|
||||||
|
tileSize: tileSize
|
||||||
|
})}
|
||||||
|
value={this.props.source.tileSize || latest.source_raster.tileSize.default}
|
||||||
|
data-wd-key="modal:sources.add.tile_size"
|
||||||
|
/>
|
||||||
|
</TileURLSourceEditor>
|
||||||
case 'tilejson_raster-dem': return <TileJSONSourceEditor {...commonProps} />
|
case 'tilejson_raster-dem': return <TileJSONSourceEditor {...commonProps} />
|
||||||
case 'tilexyz_raster-dem': return <TileURLSourceEditor {...commonProps}>
|
case 'tilexyz_raster-dem': return <TileURLSourceEditor {...commonProps}>
|
||||||
|
<FieldNumber
|
||||||
|
label={t("Tile Size")}
|
||||||
|
fieldSpec={latest.source_raster_dem.tileSize}
|
||||||
|
onChange={tileSize => this.props.onChange({
|
||||||
|
...this.props.source,
|
||||||
|
tileSize: tileSize
|
||||||
|
})}
|
||||||
|
value={this.props.source.tileSize || latest.source_raster_dem.tileSize.default}
|
||||||
|
data-wd-key="modal:sources.add.tile_size"
|
||||||
|
/>
|
||||||
<FieldSelect
|
<FieldSelect
|
||||||
label={t("Encoding")}
|
label={t("Encoding")}
|
||||||
fieldSpec={latest.source_raster_dem.encoding}
|
fieldSpec={latest.source_raster_dem.encoding}
|
||||||
|
|||||||
@@ -65,6 +65,12 @@
|
|||||||
"url": "https://maputnik.github.io/osm-liberty/style.json",
|
"url": "https://maputnik.github.io/osm-liberty/style.json",
|
||||||
"thumbnail": "https://maputnik.github.io/thumbnails/osm-liberty.png"
|
"thumbnail": "https://maputnik.github.io/thumbnails/osm-liberty.png"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "osm-openmaptiles",
|
||||||
|
"title": "OSM OpenMapTiles",
|
||||||
|
"url": "https://api.maptiler.com/maps/openstreetmap/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL",
|
||||||
|
"thumbnail": "https://openmaptiles.org/img/styles/openmaptiles.png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "positron",
|
"id": "positron",
|
||||||
"title": "Positron",
|
"title": "Positron",
|
||||||
@@ -74,7 +80,7 @@
|
|||||||
{
|
{
|
||||||
"id": "protomaps-light",
|
"id": "protomaps-light",
|
||||||
"title": "Protomaps Light",
|
"title": "Protomaps Light",
|
||||||
"url": "https://api.protomaps.com/styles/v2/light.json?key=d828297496b11844",
|
"url": "https://api.protomaps.com/styles/v4/light/en.json?key=d828297496b11844",
|
||||||
"thumbnail": "https://github.com/user-attachments/assets/911f9765-4a7d-4736-9ec0-f2d4c90ae587"
|
"thumbnail": "https://github.com/user-attachments/assets/911f9765-4a7d-4736-9ec0-f2d4c90ae587"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -163,6 +163,7 @@
|
|||||||
"Add a new source to your style. You can only choose the source type and id at creation time!": "Füge eine neue Quelle zu deinem Stil hinzu. Du kannst den Quellentyp und die ID nur bei der Erstellung auswählen!",
|
"Add a new source to your style. You can only choose the source type and id at creation time!": "Füge eine neue Quelle zu deinem Stil hinzu. Du kannst den Quellentyp und die ID nur bei der Erstellung auswählen!",
|
||||||
"TileJSON URL": "TileJSON URL",
|
"TileJSON URL": "TileJSON URL",
|
||||||
"Tile URL": "Kachel-URL",
|
"Tile URL": "Kachel-URL",
|
||||||
|
"Scheme Type": "Schema-Typ",
|
||||||
"Coord top left": "Koordinate oben links",
|
"Coord top left": "Koordinate oben links",
|
||||||
"Coord top right": "Koordinate oben rechts",
|
"Coord top right": "Koordinate oben rechts",
|
||||||
"Coord bottom right": "Koordinate unten rechts",
|
"Coord bottom right": "Koordinate unten rechts",
|
||||||
@@ -172,6 +173,7 @@
|
|||||||
"GeoJSON URL": "GeoJSON URL",
|
"GeoJSON URL": "GeoJSON URL",
|
||||||
"GeoJSON": "GeoJSON",
|
"GeoJSON": "GeoJSON",
|
||||||
"Cluster": "Cluster",
|
"Cluster": "Cluster",
|
||||||
|
"Tile Size": "Kachelgröße",
|
||||||
"Encoding": "Kodierung",
|
"Encoding": "Kodierung",
|
||||||
"Error:": "Fehler:",
|
"Error:": "Fehler:",
|
||||||
"MapTiler Access Token": "MapTiler Zugriffstoken",
|
"MapTiler Access Token": "MapTiler Zugriffstoken",
|
||||||
|
|||||||
@@ -163,6 +163,7 @@
|
|||||||
"Add a new source to your style. You can only choose the source type and id at creation time!": "Ajoutez une nouvelle source à votre style. Vous ne pouvez choisir le type et l'ID de la source qu'au moment de la création !",
|
"Add a new source to your style. You can only choose the source type and id at creation time!": "Ajoutez une nouvelle source à votre style. Vous ne pouvez choisir le type et l'ID de la source qu'au moment de la création !",
|
||||||
"TileJSON URL": "URL TileJSON",
|
"TileJSON URL": "URL TileJSON",
|
||||||
"Tile URL": "URL de la tuile",
|
"Tile URL": "URL de la tuile",
|
||||||
|
"Scheme Type": "Type de schéma",
|
||||||
"Coord top left": "Coordonnée en haut à gauche",
|
"Coord top left": "Coordonnée en haut à gauche",
|
||||||
"Coord top right": "Coordonnée en haut à droite",
|
"Coord top right": "Coordonnée en haut à droite",
|
||||||
"Coord bottom right": "Coordonnée en bas à droite",
|
"Coord bottom right": "Coordonnée en bas à droite",
|
||||||
@@ -172,6 +173,7 @@
|
|||||||
"GeoJSON URL": "URL GeoJSON",
|
"GeoJSON URL": "URL GeoJSON",
|
||||||
"GeoJSON": "GeoJSON",
|
"GeoJSON": "GeoJSON",
|
||||||
"Cluster": "Cluster",
|
"Cluster": "Cluster",
|
||||||
|
"Tile Size": "Dimension d'une tuile",
|
||||||
"Encoding": "Encodage",
|
"Encoding": "Encodage",
|
||||||
"Error:": "Erreur :",
|
"Error:": "Erreur :",
|
||||||
"MapTiler Access Token": "Jeton d'accès MapTiler",
|
"MapTiler Access Token": "Jeton d'accès MapTiler",
|
||||||
|
|||||||
@@ -162,6 +162,7 @@
|
|||||||
"Add a new source to your style. You can only choose the source type and id at creation time!": "הוספת מקור לסטייל, ביכולתכם לעשות זאת רק בזמן מסויים",
|
"Add a new source to your style. You can only choose the source type and id at creation time!": "הוספת מקור לסטייל, ביכולתכם לעשות זאת רק בזמן מסויים",
|
||||||
"TileJSON URL": "כתובת TileJSON",
|
"TileJSON URL": "כתובת TileJSON",
|
||||||
"Tile URL": "כתובת אריחים",
|
"Tile URL": "כתובת אריחים",
|
||||||
|
"Scheme Type": "סוג סכמה",
|
||||||
"Coord top left": "מיקום שמאלי עליון",
|
"Coord top left": "מיקום שמאלי עליון",
|
||||||
"Coord top right": "מיקום ימני עליון",
|
"Coord top right": "מיקום ימני עליון",
|
||||||
"Coord bottom right": "מיקום ימני תחתון",
|
"Coord bottom right": "מיקום ימני תחתון",
|
||||||
@@ -171,6 +172,7 @@
|
|||||||
"GeoJSON URL": "כתובת GeoJSON",
|
"GeoJSON URL": "כתובת GeoJSON",
|
||||||
"GeoJSON": "GeoJSON",
|
"GeoJSON": "GeoJSON",
|
||||||
"Cluster": "קיבוץ",
|
"Cluster": "קיבוץ",
|
||||||
|
"Tile Size": "גודל אריח",
|
||||||
"Encoding": "קידוד",
|
"Encoding": "קידוד",
|
||||||
"Error:": "שגיאה",
|
"Error:": "שגיאה",
|
||||||
"MapTiler Access Token": "MapTiler Access Token",
|
"MapTiler Access Token": "MapTiler Access Token",
|
||||||
|
|||||||
@@ -162,6 +162,7 @@
|
|||||||
"Add a new source to your style. You can only choose the source type and id at creation time!": "スタイルに新規ソースを追加します。注意: 作成時にソースタイプとIDのみを選択できます。",
|
"Add a new source to your style. You can only choose the source type and id at creation time!": "スタイルに新規ソースを追加します。注意: 作成時にソースタイプとIDのみを選択できます。",
|
||||||
"TileJSON URL": "TileJSON URL",
|
"TileJSON URL": "TileJSON URL",
|
||||||
"Tile URL": "タイルURL",
|
"Tile URL": "タイルURL",
|
||||||
|
"Scheme Type": "スキーマ",
|
||||||
"Coord top left": "左上座標",
|
"Coord top left": "左上座標",
|
||||||
"Coord top right": "右上座標",
|
"Coord top right": "右上座標",
|
||||||
"Coord bottom right": "右下座標",
|
"Coord bottom right": "右下座標",
|
||||||
@@ -171,6 +172,7 @@
|
|||||||
"GeoJSON URL": "GeoJSON URL",
|
"GeoJSON URL": "GeoJSON URL",
|
||||||
"GeoJSON": "GeoJSON",
|
"GeoJSON": "GeoJSON",
|
||||||
"Cluster": "クラスタ",
|
"Cluster": "クラスタ",
|
||||||
|
"Tile Size": "タイルサイズ",
|
||||||
"Encoding": "エンコーディング",
|
"Encoding": "エンコーディング",
|
||||||
"Error:": "エラー:",
|
"Error:": "エラー:",
|
||||||
"MapTiler Access Token": "MapTiler アクセストークン",
|
"MapTiler Access Token": "MapTiler アクセストークン",
|
||||||
|
|||||||
@@ -162,6 +162,7 @@
|
|||||||
"Add a new source to your style. You can only choose the source type and id at creation time!": "向您的样式添加新源。在创建时,您只能选择源类型和ID!",
|
"Add a new source to your style. You can only choose the source type and id at creation time!": "向您的样式添加新源。在创建时,您只能选择源类型和ID!",
|
||||||
"TileJSON URL": "TileJSON URL",
|
"TileJSON URL": "TileJSON URL",
|
||||||
"Tile URL": "瓦片URL",
|
"Tile URL": "瓦片URL",
|
||||||
|
"Scheme Type": "__STRING_NOT_TRANSLATED__",
|
||||||
"Coord top left": "左上角坐标",
|
"Coord top left": "左上角坐标",
|
||||||
"Coord top right": "右上角坐标",
|
"Coord top right": "右上角坐标",
|
||||||
"Coord bottom right": "右下角坐标",
|
"Coord bottom right": "右下角坐标",
|
||||||
@@ -171,6 +172,7 @@
|
|||||||
"GeoJSON URL": "GeoJSON URL",
|
"GeoJSON URL": "GeoJSON URL",
|
||||||
"GeoJSON": "GeoJSON",
|
"GeoJSON": "GeoJSON",
|
||||||
"Cluster": "聚合",
|
"Cluster": "聚合",
|
||||||
|
"Tile Size": "__STRING_NOT_TRANSLATED__",
|
||||||
"Encoding": "编码",
|
"Encoding": "编码",
|
||||||
"Error:": "错误:",
|
"Error:": "错误:",
|
||||||
"MapTiler Access Token": "MapTiler 访问令牌",
|
"MapTiler Access Token": "MapTiler 访问令牌",
|
||||||
|
|||||||
Reference in New Issue
Block a user