44 import { RasterTileLayer } from ' @nativescript-community/ui-carto/layers/raster' ;
55 import { VectorLayer } from ' @nativescript-community/ui-carto/layers/vector' ;
66 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' ;
88 import { setShowDebug , setShowError , setShowInfo , setShowWarn } from ' @nativescript-community/ui-carto/utils' ;
99 import { Line , LineEndType , LineJointType , LineStyleBuilder } from ' @nativescript-community/ui-carto/vectorelements/line' ;
1010 import { Marker , MarkerStyleBuilder } from ' @nativescript-community/ui-carto/vectorelements/marker' ;
@@ -14,8 +14,13 @@ import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
1414 let cartoMap: CartoMap ;
1515 let rasterLayer: RasterTileLayer ;
1616
17+ function logEvent(e ) {
18+ console .log (e .eventName , Object .keys (e ))
19+ }
20+
1721 function onMainMapReady(e ) {
1822 cartoMap = e .object as CartoMap ;
23+ console .log (' onMainMapReady' );
1924 const options = cartoMap .getOptions ();
2025 options .setWatermarkScale (0 );
2126 options .setRestrictedPanning (true );
@@ -112,6 +117,6 @@ import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
112117 <navigationButton text ="Go back" on:tap ={() => goBack ()} />
113118 </actionBar >
114119 <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 } />
116121 </gridLayout >
117122</page >
0 commit comments