1
1
import { Color , ImageSource , Utils } from '@nativescript/core' ;
2
+ import { Coordinate , GoogleMap , ITileProvider , MarkerOptions } from '@nativescript/google-maps' ;
3
+ import { hueFromColor } from '@nativescript/google-maps/utils' ;
2
4
import { GeoJSON } from 'geojson' ;
3
- import { Coordinate , GoogleMap , ITileProvider , MarkerOptions , hueFromColor } from '@nativescript/google-maps' ;
4
5
import { HeatmapOptions , IClusterManager , IFeature , IGeoJsonLayer , IGeometry , IGeometryStyle , IGradient , IHeatmapTileProvider } from '.' ;
5
- import { applyMixins } from './utils/common' ;
6
6
import { intoNativeClusterManager , intoNativeColor , intoNativeHeatmapGradient , intoNativeHeatmapProvider } from './utils' ;
7
+ import { applyMixins } from './utils/common' ;
7
8
8
9
// export * from './experimental/datalayer';
9
10
// export * from './experimental/iconfactory';
@@ -123,7 +124,7 @@ export class ClusterItem extends com.google.maps.android.clustering.ClusterItem
123
124
constructor ( public options : MarkerOptions ) {
124
125
super ( {
125
126
getPosition : ( ) : com . google . android . gms . maps . model . LatLng => {
126
- return new com . google . android . gms . maps . model . LatLng ( options ?. position ?. lat ?? 0 , options ?. position ?. lng ?? 0 ) ;
127
+ return new com . google . android . gms . maps . model . LatLng ( this . options ?. position ?. lat ?? 0 , this . options ?. position ?. lng ?? 0 ) ;
127
128
} ,
128
129
getSnippet : ( ) : string => {
129
130
return this . options ?. snippet ?? '' ;
@@ -138,9 +139,10 @@ export class ClusterItem extends com.google.maps.android.clustering.ClusterItem
138
139
}
139
140
}
140
141
142
+ @NativeClass
141
143
export class ClusterRenderer extends com . google . maps . android . clustering . view . DefaultClusterRenderer < any > {
142
144
constructor ( map : GoogleMap , clusterManager : ClusterManager ) {
143
- super ( Utils . ad . getApplicationContext ( ) , map . native , clusterManager . native ) ;
145
+ super ( Utils . android . getApplicationContext ( ) , map . native , clusterManager . native ) ;
144
146
}
145
147
146
148
override onBeforeClusterItemRendered ( item : ClusterItem , opts : com . google . android . gms . maps . model . MarkerOptions ) : void {
0 commit comments