একটি মানচিত্রে একটি 3D মডেল যোগ করুন, একটি মানচিত্রে একটি 3D মডেল যোগ করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।

নিম্নলিখিত কোড নমুনা প্রদর্শন করে কিভাবে একটি 3D মডেল যোগ করতে হয় এবং addModel
পদ্ধতিতে কল করে এটিকে 3D স্পেসে অবস্থান করতে হয়। এই কোড নমুনাটি ব্যবহার করতে, সেটআপে নির্দেশাবলী অনুসরণ করুন এবং একটি মৌলিক 3D মানচিত্রের সাথে আপনার Android স্টুডিও প্রকল্প সেট আপ করতে আপনার অ্যাপে একটি 3D মানচিত্র যোগ করুন । তারপর, MainActivity.kt
ফাইলে নিম্নলিখিত কোড যোগ করুন:
// Add imports and define constants
import com.google.android.gms.maps3d.model.latLngAltitude
val PLANE_URL = "https://storage.googleapis.com/gmp-maps-demos/p3d-map/assets/Airplane.glb"
val PLANE_SCALE = 0.05
// Add to the onMap3DViewReady method, after the googleMap3D object has been initialized
googleMap3D.setCamera(
camera {
center = latLngAltitude {
latitude = 47.133971
longitude = 11.333161
altitude = 2200.0
}
heading = 221.0
tilt = 65.0
range = 1_200.0
}
)
googleMap3D.addModel(
modelOptions {
id = "plane_model"
position = latLngAltitude {
latitude = 47.133971
longitude = 11.333161
altitude = 2200.0
}
altitudeMode = AltitudeMode.ABSOLUTE
orientation = orientation {
heading = 41.5
tilt = -90.0
roll = 0.0
}
url = PLANE_URL
scale = vector3D {
x = PLANE_SCALE
y = PLANE_SCALE
z = PLANE_SCALE
}
}
)
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Add a 3D model to a map\n\nSelect platform: [Android](/maps/documentation/maps-3d/android-sdk/add-3d-models \"View this page for the Android platform docs.\") [iOS](/maps/documentation/maps-3d/ios-sdk/add-3d-models \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/3d/models \"View this page for the JavaScript platform docs.\")\n\n\u003cbr /\u003e\n\n| This product or feature is Experimental (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the [Google\n| Maps Platform Service Specific Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms). For more information, see the [launch stage descriptions](/maps/launch-stages).\n\n\nThe following code sample\ndemonstrates how to add a 3D model and position it in 3D space by calling the\n[`addModel`](/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addModel(com.google.android.gms.maps3d.model.ModelOptions))\nmethod. To use this code sample, follow the instructions in\n[Setup](/maps/documentation/maps-3d/android-sdk/setup) and\n[Add a 3D map to your app](/maps/documentation/maps-3d/android-sdk/add-a-3d-map) to set\nup your Android Studio project with a basic 3D map. Then, add the following code to the\n**`MainActivity.kt`** file:\n\n```kotlin\n// Add imports and define constants\nimport com.google.android.gms.maps3d.model.latLngAltitude\nval PLANE_URL = \"https://storage.googleapis.com/gmp-maps-demos/p3d-map/assets/Airplane.glb\"\nval PLANE_SCALE = 0.05\n\n// Add to the onMap3DViewReady method, after the googleMap3D object has been initialized\ngoogleMap3D.setCamera(\n camera {\n center = latLngAltitude {\n latitude = 47.133971\n longitude = 11.333161\n altitude = 2200.0\n }\n heading = 221.0\n tilt = 65.0\n range = 1_200.0\n }\n)\n\ngoogleMap3D.addModel(\n modelOptions {\n id = \"plane_model\"\n position = latLngAltitude {\n latitude = 47.133971\n longitude = 11.333161\n altitude = 2200.0\n }\n altitudeMode = AltitudeMode.ABSOLUTE\n orientation = orientation {\n heading = 41.5\n tilt = -90.0\n roll = 0.0\n }\n url = PLANE_URL\n scale = vector3D {\n x = PLANE_SCALE\n y = PLANE_SCALE\n z = PLANE_SCALE\n }\n }\n)\n```"]]