Skip to content

Commit edd0c17

Browse files
authored
Merge pull request #5 from nativescript-community/types/carto-bitmap
chore: Small type improvements
2 parents 80417a7 + 25016a9 commit edd0c17

File tree

7 files changed

+20
-19
lines changed

7 files changed

+20
-19
lines changed

.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
</natures>
2323
<filteredResources>
2424
<filter>
25-
<id>1603897336119</id>
25+
<id>1734097060941</id>
2626
<name></name>
2727
<type>30</type>
2828
<matcher>
2929
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
30+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
3131
</matcher>
3232
</filter>
3333
</filteredResources>

src-native/android/cartoadditions/.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
</natures>
2323
<filteredResources>
2424
<filter>
25-
<id>1599142976819</id>
25+
<id>1734097060939</id>
2626
<name></name>
2727
<type>30</type>
2828
<matcher>
2929
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
30+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
3131
</matcher>
3232
</filter>
3333
</filteredResources>

src/ui-carto/vectorelements/balloonpopup.android.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Color } from '@nativescript/core';
1+
import { Color, ImageAsset, ImageSource } from '@nativescript/core';
22
import { BasePointVectorElement, BillboardStyleBuilder } from '.';
33
import { nativeCartoImageProperty, nativeColorProperty, nativeProperty } from '..';
44
import { BalloonPopupOptions, BalloonPopupStyleBuilderOptions } from './balloonpopup';
@@ -14,9 +14,9 @@ export class BalloonPopupStyleBuilder extends BillboardStyleBuilder<com.carto.st
1414
@nativeProperty descriptionFontSize: number;
1515
@nativeProperty descriptionWrap: boolean;
1616
@nativeColorProperty leftColor: string | Color;
17-
@nativeCartoImageProperty leftImage: string;
17+
@nativeCartoImageProperty leftImage: string | ImageSource | ImageAsset;
1818
@nativeColorProperty rightColor: string | Color;
19-
@nativeCartoImageProperty rightImage: string;
19+
@nativeCartoImageProperty rightImage: string | ImageSource | ImageAsset;
2020
@nativeColorProperty strokeColor: string | Color;
2121
@nativeProperty strokeWidth: number;
2222
@nativeColorProperty titleColor: string | Color;

src/ui-carto/vectorelements/balloonpopup.d.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Color } from '@nativescript/core';
1+
import { Color, ImageAsset, ImageSource } from '@nativescript/core';
22
import { BasePointVectorElement, BillboardStyleBuilderOptions, PointVectorElementOptions } from '.';
33
import { DefaultLatLonKeys } from '../core';
44
import { BillboardStyleBuilder } from './index.ios';
@@ -12,9 +12,9 @@ export class BalloonPopupStyleBuilderOptions extends BillboardStyleBuilderOption
1212
descriptionFontSize?: number;
1313
descriptionWrap?: boolean;
1414
leftColor?: string | Color;
15-
leftImage?: string;
15+
leftImage?: string | ImageSource | ImageAsset;
1616
rightColor?: string | Color;
17-
rightImage?: string;
17+
rightImage?: string | ImageSource | ImageAsset;
1818
strokeColor?: string | Color;
1919
strokeWidth?: number;
2020
titleColor?: string | Color;
@@ -28,6 +28,7 @@ export class BalloonPopupStyleBuilder<T, U extends BalloonPopupStyleBuilderOptio
2828
constructor(options: U);
2929
size?: number;
3030
color?: string | Color;
31+
buildStyle();
3132
}
3233

3334
export class BalloonPopupOptions<T = DefaultLatLonKeys> extends PointVectorElementOptions<T> {
@@ -47,9 +48,9 @@ export class BalloonPopup<T = DefaultLatLonKeys> extends BasePointVectorElement<
4748
description?: string;
4849
descriptionWrap?: boolean;
4950
leftColor?: string | Color;
50-
leftImage?: string;
51+
leftImage?: string | ImageSource | ImageAsset;
5152
rightColor?: string | Color;
52-
rightImage?: string;
53+
rightImage?: string | ImageSource | ImageAsset;
5354
strokeColor?: string | Color;
5455
strokeWidth?: number;
5556
titleColor?: string | Color;

src/ui-carto/vectorelements/balloonpopup.ios.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Color } from '@nativescript/core';
1+
import { Color, ImageAsset, ImageSource } from '@nativescript/core';
22
import { nativeCartoImageProperty, nativeColorProperty, nativeProperty } from '..';
33
import { BalloonPopupOptions, BalloonPopupStyleBuilderOptions } from './balloonpopup';
44
import { BasePointVectorElement, BillboardStyleBuilder } from './index.ios';
@@ -14,9 +14,9 @@ export class BalloonPopupStyleBuilder extends BillboardStyleBuilder<NTBalloonPop
1414
@nativeProperty descriptionFontSize: number;
1515
@nativeProperty descriptionWrap: boolean;
1616
@nativeColorProperty leftColor: string | Color;
17-
@nativeCartoImageProperty leftImage: string;
17+
@nativeCartoImageProperty leftImage: string | ImageSource | ImageAsset;
1818
@nativeColorProperty rightColor: string | Color;
19-
@nativeCartoImageProperty rightImage: string;
19+
@nativeCartoImageProperty rightImage: string | ImageSource | ImageAsset;
2020
@nativeColorProperty strokeColor: string | Color;
2121
@nativeProperty strokeWidth: number;
2222
@nativeColorProperty titleColor: string | Color;

src/ui-carto/vectorelements/marker.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Color } from '@nativescript/core';
1+
import { Color, ImageAsset, ImageSource } from '@nativescript/core';
22
import { BillboardOrientation, BillboardScaling } from '.';
33
import { geometryFromArgs, nativeAndroidEnumProperty, nativeCartoImageProperty, nativeColorProperty, nativeProperty } from '..';
44
import { Geometry } from '../geometry';
@@ -13,7 +13,7 @@ export class MarkerStyleBuilder extends BillboardStyleBuilder<com.carto.styles.M
1313
@nativeProperty width: number;
1414
@nativeProperty size: number;
1515
@nativeColorProperty color: Color | string;
16-
@nativeCartoImageProperty bitmap: string;
16+
@nativeCartoImageProperty bitmap: string | ImageSource | ImageAsset;
1717
@nativeProperty anchorPointX: number;
1818
@nativeProperty anchorPointY: number;
1919
@nativeProperty clickSize: number;

src/ui-carto/vectorelements/marker.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Color } from '@nativescript/core';
1+
import { Color, ImageAsset, ImageSource } from '@nativescript/core';
22
import { BillboardOrientation, BillboardScaling, BillboardStyleBuilder } from '.';
33
import { geometryFromArgs, nativeCartoImageProperty, nativeColorProperty, nativeProperty } from '..';
44
import { Geometry } from '../geometry';
@@ -13,7 +13,7 @@ export class MarkerStyleBuilder extends BillboardStyleBuilder<NTMarkerStyleBuild
1313
@nativeProperty width: number;
1414
@nativeProperty size: number;
1515
@nativeColorProperty color: Color | string;
16-
@nativeCartoImageProperty bitmap: string;
16+
@nativeCartoImageProperty bitmap: string | ImageSource | ImageAsset;
1717
@nativeProperty clickSize: number;
1818
@nativeProperty scalingMode: BillboardScaling;
1919
@nativeProperty orientationMode: BillboardOrientation;

0 commit comments

Comments
 (0)