diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index fa0514a..99fc8a3 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -51,7 +51,7 @@ react { // bundleAssetName = "MyApplication.android.bundle" // // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' - // entryFile = file("../js/MyApplication.android.js") + entryFile = file("../../index.ts") // // A list of extra flags to pass to the 'bundle' commands. // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle diff --git a/example/android/app/src/main/assets/circle.png b/example/android/app/src/main/assets/circle.png new file mode 100644 index 0000000..e0714b1 Binary files /dev/null and b/example/android/app/src/main/assets/circle.png differ diff --git a/example/ios/SampleApp/Images.xcassets/Contents.json b/example/ios/SampleApp/Images.xcassets/Contents.json index 2d92bd5..73c0059 100644 --- a/example/ios/SampleApp/Images.xcassets/Contents.json +++ b/example/ios/SampleApp/Images.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } } diff --git a/example/ios/SampleApp/Images.xcassets/circle.imageset/Contents.json b/example/ios/SampleApp/Images.xcassets/circle.imageset/Contents.json new file mode 100644 index 0000000..8fc741b --- /dev/null +++ b/example/ios/SampleApp/Images.xcassets/circle.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "circle.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/SampleApp/Images.xcassets/circle.imageset/circle.png b/example/ios/SampleApp/Images.xcassets/circle.imageset/circle.png new file mode 100644 index 0000000..e0714b1 Binary files /dev/null and b/example/ios/SampleApp/Images.xcassets/circle.imageset/circle.png differ diff --git a/example/src/controls/mapsControls.tsx b/example/src/controls/mapsControls.tsx index 978cf0e..2f50ef1 100644 --- a/example/src/controls/mapsControls.tsx +++ b/example/src/controls/mapsControls.tsx @@ -106,7 +106,7 @@ const MapsControls: React.FC = ({ mapViewController }) => { console.log(result); }; - const addMarker = async () => { + const addMarker = async (imgPath?: string) => { const cameraPosition = await mapViewController.getCameraPosition(); const marker: Marker = await mapViewController.addMarker({ @@ -115,14 +115,19 @@ const MapsControls: React.FC = ({ mapViewController }) => { title: 'Marker test', snippet: 'Marker test', alpha: 0.8, - rotation: 20, + rotation: 0, flat: false, draggable: true, + imgPath: imgPath, }); console.log(marker); }; + const addCustomMarker = async () => { + addMarker('circle.png'); + }; + const addCircle = async () => { const cameraPosition = await mapViewController.getCameraPosition(); @@ -221,7 +226,8 @@ const MapsControls: React.FC = ({ mapViewController }) => { setZoom((zoom ?? defaultZoom) - 1); }} /> -