File tree Expand file tree Collapse file tree 6 files changed +33
-6
lines changed
ios/SampleApp/Images.xcassets Expand file tree Collapse file tree 6 files changed +33
-6
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ react {
6565 // hermesFlags = ["-O", "-output-source-map"]
6666
6767 /* This example app uses typescript index file, so we need to specify the entry file */
68- entryFile = file(" index.ts" )
68+ entryFile = file(" ../../ index.ts" )
6969
7070 /* Autolinking */
7171 autolinkLibrariesWithApp()
Original file line number Diff line number Diff line change 11{
22 "info" : {
3- "version " : 1 ,
4- "author " : " xcode "
3+ "author " : " xcode " ,
4+ "version " : 1
55 }
66}
Original file line number Diff line number Diff line change 1+ {
2+ "images" : [
3+ {
4+ "filename" : " circle.png" ,
5+ "idiom" : " universal" ,
6+ "scale" : " 1x"
7+ },
8+ {
9+ "idiom" : " universal" ,
10+ "scale" : " 2x"
11+ },
12+ {
13+ "idiom" : " universal" ,
14+ "scale" : " 3x"
15+ }
16+ ],
17+ "info" : {
18+ "author" : " xcode" ,
19+ "version" : 1
20+ }
21+ }
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ const MapsControls: React.FC<MapControlsProps> = ({ mapViewController }) => {
106106 console . log ( result ) ;
107107 } ;
108108
109- const addMarker = async ( ) => {
109+ const addMarker = async ( imgPath ?: string ) => {
110110 const cameraPosition = await mapViewController . getCameraPosition ( ) ;
111111
112112 const marker : Marker = await mapViewController . addMarker ( {
@@ -115,14 +115,19 @@ const MapsControls: React.FC<MapControlsProps> = ({ mapViewController }) => {
115115 title : 'Marker test' ,
116116 snippet : 'Marker test' ,
117117 alpha : 0.8 ,
118- rotation : 20 ,
118+ rotation : 0 ,
119119 flat : false ,
120120 draggable : true ,
121+ imgPath : imgPath ,
121122 } ) ;
122123
123124 console . log ( marker ) ;
124125 } ;
125126
127+ const addCustomMarker = async ( ) => {
128+ addMarker ( 'circle.png' ) ;
129+ } ;
130+
126131 const addCircle = async ( ) => {
127132 const cameraPosition = await mapViewController . getCameraPosition ( ) ;
128133
@@ -221,7 +226,8 @@ const MapsControls: React.FC<MapControlsProps> = ({ mapViewController }) => {
221226 setZoom ( ( zoom ?? defaultZoom ) - 1 ) ;
222227 } }
223228 />
224- < Button title = "Add marker" onPress = { addMarker } />
229+ < Button title = "Add marker" onPress = { ( ) => addMarker ( ) } />
230+ < Button title = "Add custom marker" onPress = { ( ) => addCustomMarker ( ) } />
225231 < Button title = "Add circle" onPress = { addCircle } />
226232 < Button title = "Add polyline" onPress = { addPolyline } />
227233 < Button title = "Add polygon" onPress = { addPolygon } />
You can’t perform that action at this time.
0 commit comments