Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.
/ mapbox2harp Public archive

[UNMAINTAINED] Style converter: Mapbox-Style to harp.gl-Theme

Notifications You must be signed in to change notification settings

Kanahiro/mapbox2harp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mapbox2harp

This project is UNMAINTAINED because harpgl have been stopped maintaining.

Concept

Convert Mapbox-Style to harp.gl-Theme.

Usage

import mapbox2harp from '../../../src';

import { mapstyle } from './style'; //mapbox-style.json

const theme = {
    styles: {
        osm: mapbox2harp(mapstyle as mapboxgl.Style),
    },
    textStyles: [
        {
            name: 'smallSign',
            color: '#000000',
            fontCatalogName: 'fira',
        },
        {
            name: 'smallSignLight',
            color: '#FFFFFF',
            fontCatalogName: 'fira',
        },
        {
            name: 'placeMarker',
            color: '#60FF60',
            fontCatalogName: 'fira',
        },
    ],
    fontCatalogs: [
        {
            name: 'fira',
            url:
                'https://heremaps.github.io/harp-map-editor/fonts/Default_FontCatalog.json',
        },
    ],
};

const dataSource = new OmvDataSource({
    baseUrl: 'https://tile.openstreetmap.jp/data/japan',
    apiFormat: APIFormat.TomtomV1,
    styleSetName: 'osm',
});
map.addDataSource(dataSource);

About

[UNMAINTAINED] Style converter: Mapbox-Style to harp.gl-Theme

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published