4
4
import { RasterTileLayer } from ' @nativescript-community/ui-carto/layers/raster' ;
5
5
import { VectorLayer } from ' @nativescript-community/ui-carto/layers/vector' ;
6
6
import { CartoMap } from ' @nativescript-community/ui-carto/ui' ;
7
- import { PanningMode } from ' @nativescript-community/ui-carto/ui/index.android ' ;
7
+ import { PanningMode } from ' @nativescript-community/ui-carto/ui' ;
8
8
import { setShowDebug , setShowError , setShowInfo , setShowWarn } from ' @nativescript-community/ui-carto/utils' ;
9
9
import { Line , LineEndType , LineJointType , LineStyleBuilder } from ' @nativescript-community/ui-carto/vectorelements/line' ;
10
10
import { Marker , MarkerStyleBuilder } from ' @nativescript-community/ui-carto/vectorelements/marker' ;
@@ -14,8 +14,13 @@ import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
14
14
let cartoMap: CartoMap ;
15
15
let rasterLayer: RasterTileLayer ;
16
16
17
+ function logEvent(e ) {
18
+ console .log (e .eventName , Object .keys (e ))
19
+ }
20
+
17
21
function onMainMapReady(e ) {
18
22
cartoMap = e .object as CartoMap ;
23
+ console .log (' onMainMapReady' );
19
24
const options = cartoMap .getOptions ();
20
25
options .setWatermarkScale (0 );
21
26
options .setRestrictedPanning (true );
@@ -112,6 +117,6 @@ import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
112
117
<navigationButton text ="Go back" on:tap ={() => goBack ()} />
113
118
</actionBar >
114
119
<gridLayout class =" page" >
115
- <cartomap zoom ="10" on:mapReady ={onMainMapReady } />
120
+ <cartomap zoom ="10" on:mapReady ={onMainMapReady } on:mapMove ={ logEvent } on:mapStable ={ logEvent } on:mapIdle ={ logEvent } on:mapClicked ={ logEvent } on:mapInteraction ={ logEvent } />
116
121
</gridLayout >
117
122
</page >
0 commit comments