Skip to content

Commit

Permalink
feat(map): 支持 onStyleLoad、onStyleImportLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingkang committed Jan 18, 2024
1 parent 75a9fcd commit 28057e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/map/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const MapEventMap: EventMapping = {
onTileDataLoading: 'tiledataloading',
onSourceDataLoading: 'sourcedataloading',
onStyleDataLoading: 'styledataloading',
onStyleLoad: 'style.load',
onStyleImportLoad: 'style.import.load',
onSourceData: 'sourcedata',
onStyleData: 'styledata',

Expand Down
4 changes: 4 additions & 0 deletions src/map/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export type MapEvents = {
onTileDataLoading: (e: MapEventType['tiledataloading']) => void;
onSourceDataLoading: (e: MapEventType['sourcedataloading']) => void;
onStyleDataLoading: (e: MapEventType['styledataloading']) => void;
onStyleLoad: (e: Omit<MapEventType['styledata'], 'dataType'> & { type: 'style.load' }) => void;
onStyleImportLoad: (
e: Omit<MapEventType['styledata'], 'dataType'> & { type: 'style.import.load' },
) => void;
onSourceData: (e: MapEventType['sourcedata']) => void;
onStyleData: (e: MapEventType['styledata']) => void;

Expand Down

0 comments on commit 28057e7

Please sign in to comment.