Maps

মানচিত্র ক্লাস

google.maps . Map ক্লাস

এই ক্লাস MVCObject প্রসারিত.

const {Map} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

Map
Map(mapDiv[, opts])
পরামিতি:
  • mapDiv : HTMLElement মানচিত্রটি এই উপাদানটি পূরণ করতে রেন্ডার করবে।
  • opts : MapOptions optional বিকল্প
প্রদত্ত HTML কন্টেইনারের ভিতরে একটি নতুন মানচিত্র তৈরি করে, যা সাধারণত একটি DIV উপাদান।
controls
প্রকার: Array < MVCArray < HTMLElement >>
মানচিত্রে সংযুক্ত করার জন্য অতিরিক্ত নিয়ন্ত্রণ। মানচিত্রে একটি নিয়ন্ত্রণ যোগ করতে, নিয়ন্ত্রণের <div> যোগ করুন MVCArrayControlPosition যেখানে এটি রেন্ডার করা উচিত।
data
প্রকার: Data
Data একটি উদাহরণ, মানচিত্রে আবদ্ধ। এই ম্যাপে সুবিধাজনকভাবে প্রদর্শন করতে এই Data অবজেক্টে বৈশিষ্ট্য যোগ করুন।
mapTypes
প্রকার: MapTypeRegistry
স্ট্রিং আইডি দ্বারা MapType দৃষ্টান্তগুলির একটি রেজিস্ট্রি।
overlayMapTypes
প্রকার: MVCArray < MapType optional >
ওভারলে করার জন্য অতিরিক্ত মানচিত্র প্রকার। ওভারলে মানচিত্রের ধরনগুলি তারা সংযুক্ত বেস মানচিত্রের উপরে প্রদর্শিত হবে, যে ক্রমে তারা overlayMapTypes অ্যারেতে প্রদর্শিত হবে (উচ্চ সূচক মান সহ ওভারলেগুলি নিম্ন সূচক মান সহ ওভারলেগুলির সামনে প্রদর্শিত হয়)।
fitBounds
fitBounds(bounds[, padding])
পরামিতি:
  • bounds : LatLngBounds | LatLngBoundsLiteral Bounds দেখানোর জন্য।
  • padding : number| Padding optional পিক্সেলে number| Padding optional প্যাডিং। প্যাডিং অপসারণের পরে যে অংশটি অবশিষ্ট থাকে সেখানে সীমানাগুলি মানানসই হবে৷ একটি সংখ্যার মান 4টি দিকে একই প্যাডিং দেবে। getBounds-এর ফলাফলে একটি fitBounds idempotent করতে এখানে 0 সরবরাহ করুন।
রিটার্ন মান: কোনটিই নয়
প্রদত্ত সীমা ধারণ করতে ভিউপোর্ট সেট করে।
দ্রষ্টব্য: যখন মানচিত্রটি display: none , fitBounds ফাংশন মানচিত্রের আকার 0x0 হিসাবে পড়ে, এবং তাই কিছু করে না। মানচিত্রটি লুকানো অবস্থায় ভিউপোর্ট পরিবর্তন করতে, মানচিত্রটিকে visibility: hidden , এর ফলে মানচিত্র div-এর একটি প্রকৃত আকার আছে তা নিশ্চিত করুন৷ ভেক্টর মানচিত্রের জন্য, এই পদ্ধতিটি মানচিত্রের টিল্ট সেট করে এবং তাদের ডিফল্ট শূন্য মানগুলিতে চলে যায়। এই পদ্ধতিতে কল করার ফলে মানচিত্র প্যান এবং জুমগুলি সীমার সাথে মানানসই একটি মসৃণ অ্যানিমেশন হতে পারে৷ এই পদ্ধতিটি অ্যানিমেট হয় কি না তা নির্ভর করে অভ্যন্তরীণ হিউরিস্টিকের উপর।
getBounds
getBounds()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: LatLngBounds |undefined বর্তমান ভিউপোর্টের lat/lng সীমানা।
বর্তমান ভিউপোর্টের lat/lng সীমানা প্রদান করে। যদি বিশ্বের একাধিক অনুলিপি দৃশ্যমান হয়, সীমা দ্রাঘিমাংশে -180 থেকে 180 ডিগ্রী সহ। যদি মানচিত্রটি এখনও আরম্ভ না করা হয় বা কেন্দ্র এবং জুম সেট করা না থাকে তবে ফলাফলটি undefined । নন-জিরো টিল্ট বা শিরোনাম সহ ভেক্টর মানচিত্রের জন্য, প্রত্যাবর্তিত ল্যাট/এলএনজি বাউন্ডগুলি সবচেয়ে ছোট বাউন্ডিং বাক্সের প্রতিনিধিত্ব করে যা মানচিত্রের ভিউপোর্টের দৃশ্যমান অঞ্চলকে অন্তর্ভুক্ত করে। মানচিত্রের ভিউপোর্টের সঠিক দৃশ্যমান অঞ্চল পাওয়ার জন্য MapCanvasProjection.getVisibleRegion দেখুন।
getCenter
getCenter()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: LatLng |undefined
মানচিত্রের কেন্দ্রে প্রদর্শিত অবস্থান ফিরিয়ে দেয়। মনে রাখবেন যে এই LatLng বস্তুটি মোড়ানো নেই । আরও তথ্যের জন্য LatLng দেখুন। যদি কেন্দ্র বা সীমা নির্ধারণ করা না থাকে তবে ফলাফলটি undefined
getClickableIcons
getClickableIcons()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: boolean|undefined
মানচিত্রের আইকনগুলির ক্লিকযোগ্যতা প্রদান করে। একটি মানচিত্র আইকন আগ্রহের একটি বিন্দু প্রতিনিধিত্ব করে, এটি একটি POI নামেও পরিচিত৷ যদি প্রত্যাবর্তিত মান true হয়, তাহলে আইকনগুলি মানচিত্রে ক্লিকযোগ্য।
Beta getDatasetFeatureLayer
getDatasetFeatureLayer(datasetId)
পরামিতি:
  • datasetId : string
রিটার্ন ভ্যালু: FeatureLayer
নির্দিষ্ট datasetId জন্য FeatureLayer ফেরত দেয়। ডেটাসেট আইডিগুলি অবশ্যই Google ক্লাউড কনসোলে কনফিগার করতে হবে৷ যদি ডেটাসেট আইডি মানচিত্রের মানচিত্র শৈলীর সাথে যুক্ত না হয়, বা যদি ডেটা-চালিত স্টাইলিং উপলব্ধ না হয় (কোনও মানচিত্র আইডি, কোনও ভেক্টর টাইলস, কোনও ডেটা-চালিত স্টাইলিং বৈশিষ্ট্য স্তর বা মানচিত্র শৈলীতে কনফিগার করা ডেটাসেট না থাকে), এটি একটি লগ লগ করে ত্রুটি, এবং এর ফলে FeatureLayer.isAvailable মিথ্যা হবে।
getDiv
getDiv()
পরামিতি: কোনোটিই নয়
রিটার্ন ভ্যালু: HTMLElement ম্যাপের ম্যাপডিভি।
getFeatureLayer
getFeatureLayer(featureType)
পরামিতি:
রিটার্ন ভ্যালু: FeatureLayer
নির্দিষ্ট FeatureType FeatureLayer প্রদান করে। Google ক্লাউড কনসোলে একটি FeatureLayer অবশ্যই সক্রিয় করা উচিত। যদি নির্দিষ্ট FeatureType একটি FeatureLayer এই মানচিত্রে বিদ্যমান না থাকে, বা যদি ডেটা-চালিত স্টাইলিং উপলব্ধ না থাকে (কোনও মানচিত্র আইডি, কোনও ভেক্টর টাইলস, এবং মানচিত্র শৈলীতে কোনও FeatureLayer সক্ষম করা নেই), এটি একটি ত্রুটি লগ করে এবং ফলস্বরূপ FeatureLayer.isAvailable মিথ্যা হবে।
getHeading
getHeading()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: number|undefined
মানচিত্রের কম্পাস শিরোনাম প্রদান করে। শিরোনামের মানটি উত্তরের মূল দিক থেকে ডিগ্রী (ঘড়ির কাঁটার দিকে) পরিমাপ করা হয়। যদি মানচিত্রটি এখনও শুরু না হয় তবে ফলাফলটি undefined
getMapCapabilities
getMapCapabilities()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: MapCapabilities
যে মানচিত্র ID প্রদান করা হয়েছিল তার উপর ভিত্তি করে মানচিত্রে উপলব্ধ বর্তমান ক্ষমতা সম্পর্কে কলকারীকে অবহিত করে।
getMapTypeId
getMapTypeId()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: MapTypeId |string|undefined
getProjection
getProjection()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: Projection |undefined
বর্তমান Projection প্রদান করে। যদি মানচিত্রটি এখনও শুরু না হয় তবে ফলাফলটি undefinedprojection_changed ইভেন্টটি শুনুন এবং এটি undefined নয় তা নিশ্চিত করতে এর মান পরীক্ষা করুন।
getRenderingType
getRenderingType()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: RenderingType
মানচিত্রের বর্তমান রেন্ডারিং টাইপ প্রদান করে।
getStreetView
getStreetView()
পরামিতি: কোনোটিই নয়
প্রত্যাবর্তন মান: StreetViewPanorama মানচিত্রের সাথে আবদ্ধ প্যানোরামা৷
মানচিত্রে আবদ্ধ ডিফল্ট StreetViewPanorama ফেরত দেয়, যা মানচিত্রের মধ্যে এম্বেড করা একটি ডিফল্ট প্যানোরামা বা setStreetView() ব্যবহার করে প্যানোরামা সেট হতে পারে। মানচিত্রের streetViewControl পরিবর্তনগুলি এই ধরনের আবদ্ধ প্যানোরামার প্রদর্শনে প্রতিফলিত হবে।
getTilt
getTilt()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: number|undefined
ভিউপোর্ট সমতল থেকে মানচিত্র সমতলে ডিগ্রীতে, মানচিত্রের বর্তমান ঘটনার কোণ প্রদান করে। রাস্টার মানচিত্রের জন্য, সরাসরি ওভারহেড তোলা ছবির জন্য ফলাফল হবে 0 বা 45° চিত্রের জন্য 45 । এই পদ্ধতি setTilt দ্বারা সেট করা মান ফেরত দেয় না। বিস্তারিত জানার জন্য setTilt দেখুন।
getZoom
getZoom()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: number|undefined
মানচিত্রের জুম ফেরত দেয়। জুম সেট করা না থাকলে ফলাফলটি undefined
moveCamera
moveCamera(cameraOptions)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
অ্যানিমেশন ছাড়াই অবিলম্বে মানচিত্রের ক্যামেরাকে লক্ষ্য ক্যামেরা বিকল্পগুলিতে সেট করে।
panBy
panBy(x, y)
পরামিতি:
  • x : number মানচিত্রটিকে x দিকে সরানোর জন্য পিক্সেলের সংখ্যা।
  • y : number মানচিত্রটিকে y দিকে সরানোর জন্য পিক্সেলের সংখ্যা।
রিটার্ন মান: কোনটিই নয়
পিক্সেলে প্রদত্ত দূরত্ব দ্বারা মানচিত্রের কেন্দ্র পরিবর্তন করে। যদি দূরত্ব মানচিত্রের প্রস্থ এবং উচ্চতা উভয়ের চেয়ে কম হয়, তাহলে রূপান্তরটি মসৃণভাবে অ্যানিমেটেড হবে। উল্লেখ্য যে মানচিত্র সমন্বয় ব্যবস্থা পশ্চিম থেকে পূর্বে (x মানের জন্য) এবং উত্তর থেকে দক্ষিণে (y মানের জন্য) বৃদ্ধি পায়।
panTo
panTo(latLng)
পরামিতি:
  • latLng : LatLng | LatLngLiteral মানচিত্রের নতুন কেন্দ্র অক্ষাংশ/দ্রাঘিমাংশ।
রিটার্ন মান: কোনটিই নয়
প্রদত্ত LatLng এ মানচিত্রের কেন্দ্র পরিবর্তন করে। যদি পরিবর্তনটি মানচিত্রের প্রস্থ এবং উচ্চতা উভয়ের চেয়ে কম হয়, তাহলে রূপান্তরটি মসৃণভাবে অ্যানিমেটেড হবে।
panToBounds
panToBounds(latLngBounds[, padding])
পরামিতি:
  • latLngBounds : LatLngBounds | LatLngBoundsLiteral মানচিত্রটি প্যান করতে সীমাবদ্ধতা।
  • padding : number| Padding optional পিক্সেলে number| Padding optional প্যাডিং। একটি সংখ্যার মান 4টি দিকে একই প্যাডিং দেবে। ডিফল্ট মান 0।
রিটার্ন মান: কোনটিই নয়
প্রদত্ত LatLngBounds ধারণ করার জন্য প্রয়োজনীয় ন্যূনতম পরিমাণ দ্বারা মানচিত্রটি প্যান করুন৷ মানচিত্রের সীমাগুলি কোথায় থাকবে তার কোনও গ্যারান্টি দেয় না, শুধুমাত্র {currentMapSizeInPx} - {padding} এর ভিতরে যতটা সম্ভব সীমানা দেখানোর জন্য মানচিত্রটি প্যান করা হবে। রাস্টার এবং ভেক্টর উভয় মানচিত্রের জন্য, মানচিত্রের জুম, টিল্ট এবং শিরোনাম পরিবর্তন করা হবে না।
setCenter
setCenter(latlng)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
setClickableIcons
setClickableIcons(value)
পরামিতি:
  • value : boolean
রিটার্ন মান: কোনটিই নয়
মানচিত্র আইকন ক্লিকযোগ্য কিনা তা নিয়ন্ত্রণ করে। একটি মানচিত্র আইকন আগ্রহের একটি বিন্দু প্রতিনিধিত্ব করে, এটি একটি POI নামেও পরিচিত৷ মানচিত্রের আইকনগুলির ক্লিকযোগ্যতা নিষ্ক্রিয় করতে, এই পদ্ধতিতে false মান দিন।
setHeading
setHeading(heading)
পরামিতি:
  • heading : number
রিটার্ন মান: কোনটিই নয়
মূল দিক উত্তর থেকে ডিগ্রীতে পরিমাপ করা মানচিত্রের জন্য কম্পাস শিরোনাম সেট করে। রাস্টার মানচিত্রের জন্য, এই পদ্ধতিটি শুধুমাত্র বায়বীয় চিত্রের ক্ষেত্রে প্রযোজ্য।
setMapTypeId
setMapTypeId(mapTypeId)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
setOptions
setOptions(options)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
setStreetView
setStreetView(panorama)
পরামিতি:
  • panorama : StreetViewPanorama optional প্যানোরামা মানচিত্রে আবদ্ধ হতে হবে।
রিটার্ন মান: কোনটিই নয়
মানচিত্রের সাথে একটি StreetViewPanorama আবদ্ধ করে। এই প্যানোরামাটি ডিফল্ট StreetViewPanorama ওভাররাইড করে, যা মানচিত্রটিকে মানচিত্রের বাইরে একটি বাহ্যিক প্যানোরামাতে আবদ্ধ করার অনুমতি দেয়৷ প্যানোরামাটিকে null সেট করা ডিফল্ট এমবেড করা প্যানোরামাকে মানচিত্রে ফিরিয়ে দেয়।
setTilt
setTilt(tilt)
পরামিতি:
  • tilt : number
রিটার্ন মান: কোনটিই নয়
ভেক্টর মানচিত্রের জন্য, মানচিত্রের ঘটনার কোণ সেট করে। মানচিত্রের জুম স্তরের উপর নির্ভর করে অনুমোদিত মানগুলি সীমাবদ্ধ। রাস্টার মানচিত্রের জন্য, মানচিত্রের ঘটনার কোণের জন্য স্বয়ংক্রিয় স্যুইচিং আচরণ নিয়ন্ত্রণ করে। শুধুমাত্র অনুমোদিত মান হল 0 এবং 45setTilt(0) জুম স্তর এবং ভিউপোর্ট নির্বিশেষে মানচিত্রটিকে সর্বদা 0° ওভারহেড ভিউ ব্যবহার করে। setTilt(45) বর্তমান জুম স্তর এবং ভিউপোর্টের জন্য যখনই 45° চিত্র পাওয়া যায় তখনই টিল্ট কোণটি স্বয়ংক্রিয়ভাবে 45-এ স্যুইচ করে এবং যখনই 45° চিত্র উপলব্ধ না হয় তখন 0-এ ফিরে যান (এটি ডিফল্ট আচরণ)। 45° চিত্র শুধুমাত্র satellite এবং hybrid মানচিত্র প্রকারের জন্য উপলব্ধ, কিছু অবস্থানের মধ্যে এবং কিছু জুম স্তরে৷ দ্রষ্টব্য: getTilt বর্তমান টিল্ট কোণ প্রদান করে, setTilt দ্বারা সেট করা মান নয়। যেহেতু getTilt এবং setTilt বিভিন্ন জিনিসকে নির্দেশ করে, তাই tilt বৈশিষ্ট্যকে bind() করবেন না; এটি করার ফলে অপ্রত্যাশিত প্রভাব হতে পারে।
setZoom
setZoom(zoom)
পরামিতি:
  • zoom : number বড় জুম মান উচ্চ রেজোলিউশনের সাথে মিলে যায়।
রিটার্ন মান: কোনটিই নয়
মানচিত্রের জুম সেট করে।
উত্তরাধিকারসূত্রে পাওয়া: addListener , bindTo , get , notify , set , setValues ​​, unbind , unbindAll
DEMO_MAP_ID মানচিত্র আইডি যা কোড নমুনার জন্য ব্যবহার করা যেতে পারে যার জন্য একটি মানচিত্র আইডি প্রয়োজন। এই মানচিত্র আইডি উৎপাদন অ্যাপ্লিকেশনে ব্যবহারের উদ্দেশ্যে নয় এবং ক্লাউড কনফিগারেশনের (যেমন ক্লাউড স্টাইলিং) প্রয়োজন এমন বৈশিষ্ট্যগুলির জন্য ব্যবহার করা যাবে না৷
bounds_changed
function()
যুক্তি: কোনটিই না
ভিউপোর্টের সীমানা পরিবর্তিত হলে এই ইভেন্টটি চালু করা হয়।
center_changed
function()
যুক্তি: কোনটিই না
মানচিত্র কেন্দ্র সম্পত্তি পরিবর্তন হলে এই ইভেন্টটি বহিস্কার করা হয়।
click
function(event)
যুক্তি:
ব্যবহারকারী মানচিত্রে ক্লিক করলে এই ইভেন্টটি বরখাস্ত হয়। ক্লিক করা অবস্থানের বৈশিষ্ট্য সহ একটি MapMouseEvent ফেরত দেওয়া হয় যদি না একটি স্থান আইকনে ক্লিক করা হয়, এই ক্ষেত্রে একটি স্থান আইডি সহ একটি IconMouseEvent ফেরত দেওয়া হয়। IconMouseEvent এবং MapMouseEvent অভিন্ন, তবে IconMouseEvent-এ স্থান আইডি ক্ষেত্র রয়েছে৷ ইভেন্টটিকে সর্বদা একটি MapMouseEvent হিসাবে বিবেচনা করা যেতে পারে যখন স্থান আইডি গুরুত্বপূর্ণ না হয়৷ একটি মার্কার বা তথ্য উইন্ডোতে ক্লিক করা হলে ক্লিক ইভেন্টটি চালু করা হয় না।
contextmenu
function(event)
যুক্তি:
DOM কনটেক্সটমেনু ইভেন্টটি মানচিত্র কন্টেইনারে ফায়ার করা হলে এই ইভেন্টটি চালু করা হয়।
dblclick
function(event)
যুক্তি:
ব্যবহারকারী মানচিত্রে ডাবল ক্লিক করলে এই ইভেন্টটি বরখাস্ত হয়। লক্ষ্য করুন যে ক্লিক ইভেন্টটি কখনও কখনও একবার এবং কখনও কখনও দুবার ফায়ার হবে, এটির ঠিক আগে।
drag
function()
যুক্তি: কোনটিই না
ব্যবহারকারী মানচিত্রটি টেনে নিয়ে যাওয়ার সময় এই ইভেন্টটি বারবার বহিস্কার করা হয়।
dragend
function()
যুক্তি: কোনটিই না
ব্যবহারকারী মানচিত্রটি টেনে আনা বন্ধ করলে এই ইভেন্টটি চালু করা হয়।
dragstart
function()
যুক্তি: কোনটিই না
ব্যবহারকারী মানচিত্রটি টেনে আনতে শুরু করলে এই ইভেন্টটি বরখাস্ত হয়৷
heading_changed
function()
যুক্তি: কোনটিই না
মানচিত্রের শিরোনাম সম্পত্তি পরিবর্তন হলে এই ইভেন্টটি চালু করা হয়।
idle
function()
যুক্তি: কোনটিই না
প্যানিং বা জুম করার পরে মানচিত্রটি নিষ্ক্রিয় হয়ে গেলে এই ইভেন্টটি চালু হয়৷
isfractionalzoomenabled_changed
function()
যুক্তি: কোনটিই না
isFractionalZoomEnabled প্রপার্টি পরিবর্তিত হলে এই ইভেন্টটি বরখাস্ত করা হয়।
mapcapabilities_changed
function()
যুক্তি: কোনটিই না
মানচিত্রের ক্ষমতা পরিবর্তন হলে এই ইভেন্টটি চালু করা হয়।
maptypeid_changed
function()
যুক্তি: কোনটিই না
MapTypeId প্রপার্টি পরিবর্তন হলে এই ইভেন্টটি চালু করা হয়।
mousemove
function(event)
যুক্তি:
যখনই ব্যবহারকারীর মাউস মানচিত্রের কন্টেইনারের উপর চলে যায় তখন এই ইভেন্টটি গুলি করা হয়৷
mouseout
function(event)
যুক্তি:
ব্যবহারকারীর মাউস মানচিত্রের ধারক থেকে প্রস্থান করলে এই ইভেন্টটি গুলি করা হয়৷
mouseover
function(event)
যুক্তি:
ব্যবহারকারীর মাউস মানচিত্রের কন্টেইনারে প্রবেশ করলে এই ইভেন্টটি গুলি করা হয়।
projection_changed
function()
যুক্তি: কোনটিই না
অভিক্ষেপ পরিবর্তিত হলে এই ইভেন্টটি গুলি করা হয়।
renderingtype_changed
function()
যুক্তি: কোনটিই না
রেন্ডারিং টাইপ পরিবর্তিত হলে এই ইভেন্টটি বরখাস্ত করা হয়।
tilesloaded
function()
যুক্তি: কোনটিই না
দৃশ্যমান টাইলস লোড করা শেষ হলে এই ইভেন্টটি চালু করা হয়।
tilt_changed
function()
যুক্তি: কোনটিই না
ম্যাপ টিল্ট প্রপার্টি পরিবর্তন হলে এই ইভেন্টটি চালু করা হয়।
zoom_changed
function()
যুক্তি: কোনটিই না
মানচিত্র জুম সম্পত্তি পরিবর্তন হলে এই ইভেন্টটি চালু করা হয়।
rightclick
function(event)
যুক্তি:
ব্যবহারকারী মানচিত্রে ডান-ক্লিক করলে এই ইভেন্টটি বরখাস্ত হয়।

MapOptions ইন্টারফেস

google.maps . MapOptions ইন্টারফেস

MapOptions অবজেক্ট একটি মানচিত্রে সেট করা যেতে পারে এমন বৈশিষ্ট্যগুলিকে সংজ্ঞায়িত করতে ব্যবহৃত হয়।

backgroundColor optional
প্রকার: string optional
মানচিত্র বিভাগের পটভূমির জন্য ব্যবহৃত রঙ। ব্যবহারকারী প্যান হিসাবে টাইলগুলি এখনও লোড না হলে এই রঙটি দৃশ্যমান হবে৷ এই বিকল্পটি শুধুমাত্র তখনই সেট করা যেতে পারে যখন মানচিত্রটি আরম্ভ করা হয়।
center optional
প্রকার: LatLng | LatLngLiteral optional
প্রাথমিক মানচিত্র কেন্দ্র।
clickableIcons optional
প্রকার: boolean optional
ডিফল্ট: true
false হলে, মানচিত্রের আইকনগুলি ক্লিকযোগ্য নয়৷ একটি মানচিত্র আইকন আগ্রহের একটি বিন্দু প্রতিনিধিত্ব করে, এটি একটি POI নামেও পরিচিত৷
controlSize optional
প্রকার: number optional
ম্যাপে প্রদর্শিত কন্ট্রোলের পিক্সেলের আকার। মানচিত্র তৈরি করার সময় এই মানটি সরাসরি সরবরাহ করতে হবে, পরে এই মানটি আপডেট করলে নিয়ন্ত্রণগুলি একটি undefined অবস্থায় আনতে পারে। শুধুমাত্র মানচিত্র API দ্বারা তৈরি নিয়ন্ত্রণগুলি পরিচালনা করে৷ ডেভেলপার তৈরি কাস্টম নিয়ন্ত্রণ স্কেল না.
disableDefaultUI optional
প্রকার: boolean optional
সমস্ত ডিফল্ট UI বোতাম সক্রিয়/অক্ষম করে। পৃথকভাবে ওভাররাইড করা হতে পারে. কীবোর্ড নিয়ন্ত্রণ নিষ্ক্রিয় করে না, যা MapOptions.keyboardShortcuts বিকল্প দ্বারা পৃথকভাবে নিয়ন্ত্রিত হয়। অঙ্গভঙ্গি নিয়ন্ত্রণ অক্ষম করে না, যা MapOptions.gestureHandling বিকল্প দ্বারা পৃথকভাবে নিয়ন্ত্রিত হয়।
disableDoubleClickZoom optional
প্রকার: boolean optional
ডবল ক্লিকে জুম এবং কেন্দ্র সক্রিয়/অক্ষম করে। ডিফল্টরূপে সক্রিয়.

দ্রষ্টব্য : এই সম্পত্তি সুপারিশ করা হয় না . ডাবল ক্লিকে জুমিং নিষ্ক্রিয় করতে, আপনি gestureHandling বৈশিষ্ট্যটি ব্যবহার করতে পারেন এবং এটিকে "none" এ সেট করতে পারেন।

draggable optional
প্রকার: boolean optional
false হলে, মানচিত্রটিকে টেনে আনা থেকে বাধা দেয়। টেনে আনা ডিফল্টরূপে সক্রিয় করা হয়।
draggableCursor optional
প্রকার: string optional
একটি টেনে আনা যায় এমন মানচিত্রের উপর মাউসিং করার সময় প্রদর্শিত কার্সারের নাম বা url। এই বৈশিষ্ট্যটি আইকন পরিবর্তন করতে CSS cursor বৈশিষ্ট্য ব্যবহার করে। CSS প্রপার্টির মত, আপনাকে অবশ্যই অন্তত একটি ফলব্যাক কার্সার নির্দিষ্ট করতে হবে যা URL নয়। যেমন: draggableCursor: 'url( http://www.example.com/icon.png ), auto;' .
draggingCursor optional
প্রকার: string optional
যখন মানচিত্রটি টেনে আনা হচ্ছে তখন প্রদর্শনের জন্য কার্সারের নাম বা url। এই বৈশিষ্ট্যটি আইকন পরিবর্তন করতে CSS cursor বৈশিষ্ট্য ব্যবহার করে। CSS প্রপার্টির মত, আপনাকে অবশ্যই অন্তত একটি ফলব্যাক কার্সার নির্দিষ্ট করতে হবে যা URL নয়। যেমন: draggingCursor: 'url( http://www.example.com/icon.png ), auto;' .
fullscreenControl optional
প্রকার: boolean optional
পূর্ণস্ক্রীন নিয়ন্ত্রণের সক্ষম/অক্ষম অবস্থা।
fullscreenControlOptions optional
প্রকার: FullscreenControlOptions optional
ফুলস্ক্রিন নিয়ন্ত্রণের জন্য প্রদর্শনের বিকল্প।
gestureHandling optional
প্রকার: string optional
এই সেটিং নিয়ন্ত্রণ করে কিভাবে API ম্যাপে অঙ্গভঙ্গি পরিচালনা করে। অনুমোদিত মান:
  • "cooperative" : স্ক্রোল ইভেন্ট এবং এক আঙুলের স্পর্শ অঙ্গভঙ্গি পৃষ্ঠাটি স্ক্রোল করুন এবং মানচিত্রটিকে জুম বা প্যান করবেন না। দুই আঙুলের স্পর্শ অঙ্গভঙ্গি প্যান এবং মানচিত্র জুম. একটি ctrl কী বা ⌘ কী চেপে ম্যাপ জুম করে ইভেন্টগুলি স্ক্রোল করুন৷
    এই মোডে মানচিত্র পৃষ্ঠার সাথে সহযোগিতা করে
  • "greedy" : সমস্ত স্পর্শ অঙ্গভঙ্গি এবং স্ক্রোল ইভেন্টগুলি মানচিত্রটিকে প্যান বা জুম করে৷
  • "none" : ব্যবহারকারীর অঙ্গভঙ্গি দ্বারা মানচিত্রটিকে প্যান করা বা জুম করা যাবে না৷
  • "auto" : (ডিফল্ট) অঙ্গভঙ্গি হ্যান্ডলিং হয় সহযোগিতামূলক বা লোভী, পৃষ্ঠাটি স্ক্রোলযোগ্য বা একটি আইফ্রেমের উপর নির্ভর করে।
heading optional
প্রকার: number optional
মূল দিক উত্তর থেকে ঘড়ির কাঁটার দিকে পরিমাপ ডিগ্রিতে বায়বীয় চিত্রের শিরোনাম। শিরোনামগুলি নিকটতম উপলব্ধ কোণে স্ন্যাপ করা হয় যার জন্য চিত্র পাওয়া যায়৷
isFractionalZoomEnabled optional
প্রকার: boolean optional
ডিফল্ট: ভেক্টর মানচিত্রের জন্য true এবং রাস্টার মানচিত্রের জন্য false
মানচিত্রটি ভগ্নাংশ জুম স্তরের অনুমতি দেবে কিনা। ডিফল্ট কখন সেট করা হয়েছে তা জানতে isfractionalzoomenabled_changed শুনুন।
keyboardShortcuts optional
প্রকার: boolean optional
false হলে, মানচিত্রটিকে কীবোর্ড দ্বারা নিয়ন্ত্রিত হতে বাধা দেয়। কীবোর্ড শর্টকাটগুলি ডিফল্টরূপে সক্রিয় থাকে৷
mapId optional
প্রকার: string optional
ম্যাপের ম্যাপ আইডি । একটি মানচিত্র তাত্ক্ষণিক হওয়ার পরে এই প্যারামিটার সেট বা পরিবর্তন করা যাবে না।
mapTypeControl optional
প্রকার: boolean optional
মানচিত্র প্রকার নিয়ন্ত্রণের প্রাথমিক সক্ষম/অক্ষম অবস্থা।
mapTypeControlOptions optional
প্রকার: MapTypeControlOptions optional
মানচিত্র প্রকার নিয়ন্ত্রণের জন্য প্রাথমিক প্রদর্শনের বিকল্প।
mapTypeId optional
প্রকার: MapTypeId |string optional
প্রাথমিক মানচিত্র mapTypeId. ROADMAP এ ডিফল্ট।
maxZoom optional
প্রকার: number optional
সর্বোচ্চ জুম স্তর যা মানচিত্রে প্রদর্শিত হবে৷ যদি বাদ দেওয়া হয়, বা null এ সেট করা হয়, তাহলে বর্তমান মানচিত্র প্রকার থেকে সর্বোচ্চ জুম ব্যবহার করা হয়। বৈধ জুম মান হল শূন্য থেকে সমর্থিত সর্বোচ্চ জুম স্তর পর্যন্ত সংখ্যা।
minZoom optional
প্রকার: number optional
ন্যূনতম জুম স্তর যা মানচিত্রে প্রদর্শিত হবে৷ যদি বাদ দেওয়া হয়, বা null সেট করা হয়, তাহলে বর্তমান মানচিত্র প্রকার থেকে ন্যূনতম জুম ব্যবহার করা হয়। বৈধ জুম মান হল শূন্য থেকে সমর্থিত সর্বোচ্চ জুম স্তর পর্যন্ত সংখ্যা।
noClear optional
প্রকার: boolean optional
true হলে, মানচিত্র বিভাগের বিষয়বস্তু পরিষ্কার করবেন না।
panControl optional
প্রকার: boolean optional
প্যান নিয়ন্ত্রণের সক্রিয়/অক্ষম অবস্থা।

দ্রষ্টব্য: Google Maps JavaScript API-এর v3.22-এ প্রবর্তিত নিয়ন্ত্রণের নতুন সেটে প্যান নিয়ন্ত্রণ উপলব্ধ নয়। v3.22 এবং v3.23 ব্যবহার করার সময়, আপনি নতুন নিয়ন্ত্রণের পরিবর্তে আগের নিয়ন্ত্রণের সেটগুলি ব্যবহার করতে বেছে নিতে পারেন, এইভাবে প্যান নিয়ন্ত্রণকে পুরানো নিয়ন্ত্রণ সেটের অংশ হিসাবে উপলব্ধ করে। দেখুন v3.22 ম্যাপ কন্ট্রোলে নতুন কি আছে

panControlOptions optional
প্রকার: PanControlOptions optional
প্যান নিয়ন্ত্রণের জন্য প্রদর্শনের বিকল্প।

দ্রষ্টব্য: Google Maps JavaScript API-এর v3.22-এ প্রবর্তিত নিয়ন্ত্রণের নতুন সেটে প্যান নিয়ন্ত্রণ উপলব্ধ নয়। v3.22 এবং v3.23 ব্যবহার করার সময়, আপনি নতুন নিয়ন্ত্রণের পরিবর্তে আগের নিয়ন্ত্রণের সেটগুলি ব্যবহার করতে বেছে নিতে পারেন, এইভাবে প্যান নিয়ন্ত্রণকে পুরানো নিয়ন্ত্রণ সেটের অংশ হিসাবে উপলব্ধ করে। দেখুন v3.22 ম্যাপ কন্ট্রোলে নতুন কি আছে

restriction optional
প্রকার: MapRestriction optional
একটি সীমানা সংজ্ঞায়িত করে যা ব্যবহারকারীদের অ্যাক্সেসযোগ্য মানচিত্রের এলাকাকে সীমাবদ্ধ করে। সেট করা হলে, একজন ব্যবহারকারী শুধুমাত্র প্যান এবং জুম করতে পারে যখন ক্যামেরা ভিউ সীমানার মধ্যে থাকে।
rotateControl optional
প্রকার: boolean optional
ঘোরান নিয়ন্ত্রণের সক্রিয়/অক্ষম অবস্থা।
rotateControlOptions optional
প্রকার: RotateControlOptions optional
ঘোরান নিয়ন্ত্রণের জন্য প্রদর্শনের বিকল্প।
scaleControl optional
প্রকার: boolean optional
স্কেল নিয়ন্ত্রণের প্রাথমিক সক্রিয়/অক্ষম অবস্থা।
scaleControlOptions optional
প্রকার: ScaleControlOptions optional
স্কেল নিয়ন্ত্রণের জন্য প্রাথমিক প্রদর্শন বিকল্প।
scrollwheel optional
প্রকার: boolean optional
false হলে, মাউস স্ক্রোল হুইল ব্যবহার করে মানচিত্রে জুম করা অক্ষম করে। স্ক্রোলহুইলটি ডিফল্টরূপে সক্রিয় থাকে।

দ্রষ্টব্য : এই সম্পত্তি সুপারিশ করা হয় না . স্ক্রোলহুইল ব্যবহার করে জুমিং নিষ্ক্রিয় করতে, আপনি gestureHandling বৈশিষ্ট্যটি ব্যবহার করতে পারেন এবং এটিকে হয় "cooperative" বা "none" সেট করতে পারেন।

streetView optional
প্রকার: StreetViewPanorama optional
যখন স্ট্রিট ভিউ পেগম্যান মানচিত্রে বাদ দেওয়া হয় তখন দেখানোর জন্য একটি StreetViewPanorama ৷ যদি কোনো প্যানোরামা নির্দিষ্ট করা না থাকে, পেগম্যান বাদ দিলে একটি ডিফল্ট StreetViewPanorama মানচিত্রের div -এ প্রদর্শিত হবে।
streetViewControl optional
প্রকার: boolean optional
রাস্তার দৃশ্য পেগম্যান নিয়ন্ত্রণের প্রাথমিক সক্ষম/অক্ষম অবস্থা। এই নিয়ন্ত্রণটি ডিফল্ট UI এর অংশ, এবং একটি মানচিত্রের ধরন প্রদর্শন করার সময় এটি false সেট করা উচিত যেখানে রাস্তার দৃশ্যের রাস্তার ওভারলে প্রদর্শিত হবে না (যেমন একটি নন-আর্থ ম্যাপ টাইপ)।
streetViewControlOptions optional
প্রকার: StreetViewControlOptions optional
রাস্তার দৃশ্য পেগম্যান নিয়ন্ত্রণের জন্য প্রাথমিক প্রদর্শনের বিকল্প।
styles optional
প্রকার: Array < MapTypeStyle > optional
প্রতিটি ডিফল্ট মানচিত্র প্রকারে প্রয়োগ করার শৈলী। দ্রষ্টব্য যে satellite / hybrid এবং terrain মোডগুলির জন্য, এই শৈলীগুলি শুধুমাত্র লেবেল এবং জ্যামিতিতে প্রযোজ্য হবে৷
tilt optional
প্রকার: number optional
ভেক্টর মানচিত্রের জন্য, মানচিত্রের ঘটনার কোণ সেট করে। মানচিত্রের জুম স্তরের উপর নির্ভর করে অনুমোদিত মানগুলি সীমাবদ্ধ। রাস্টার মানচিত্রের জন্য, মানচিত্রের ঘটনার কোণের জন্য স্বয়ংক্রিয় স্যুইচিং আচরণ নিয়ন্ত্রণ করে। শুধুমাত্র অনুমোদিত মান হল 0 এবং 45 । মান 0 এর কারণে মানচিত্রটি জুম স্তর এবং ভিউপোর্ট নির্বিশেষে সর্বদা 0° ওভারহেড ভিউ ব্যবহার করে। বর্তমান জুম স্তর এবং ভিউপোর্টের জন্য যখনই 45° চিত্র পাওয়া যায় তখন মান 45 এর কারণে টিল্ট কোণটি স্বয়ংক্রিয়ভাবে 45-এ স্যুইচ করে এবং যখনই 45° চিত্র উপলব্ধ না হয় তখন 0-এ ফিরে যান (এটি ডিফল্ট আচরণ)। 45° চিত্র শুধুমাত্র satellite এবং hybrid মানচিত্র প্রকারের জন্য উপলব্ধ, কিছু অবস্থানের মধ্যে এবং কিছু জুম স্তরে৷ দ্রষ্টব্য: getTilt বর্তমান টিল্ট কোণ প্রদান করে, এই বিকল্প দ্বারা নির্দিষ্ট করা মান নয়। যেহেতু getTilt এবং এই বিকল্পটি বিভিন্ন জিনিসকে নির্দেশ করে, tilt বৈশিষ্ট্যকে bind() করবেন না; এটি করার ফলে অপ্রত্যাশিত প্রভাব হতে পারে।
zoom optional
প্রকার: number optional
প্রাথমিক মানচিত্র জুম স্তর. বৈধ জুম মান হল শূন্য থেকে সমর্থিত সর্বোচ্চ জুম স্তর পর্যন্ত সংখ্যা। বৃহত্তর জুম মান একটি উচ্চ রেজোলিউশন অনুরূপ.
zoomControl optional
প্রকার: boolean optional
জুম নিয়ন্ত্রণের সক্ষম/অক্ষম অবস্থা।
zoomControlOptions optional
প্রকার: ZoomControlOptions optional
জুম নিয়ন্ত্রণের জন্য প্রদর্শনের বিকল্পগুলি।

MapElement ক্লাস

google.maps . MapElement ক্লাস

MapElement হল মানচিত্র রেন্ডার করার জন্য একটি HTMLElement সাবক্লাস। maps লাইব্রেরি লোড করার পরে, HTML এ একটি মানচিত্র তৈরি করা যেতে পারে। উদাহরণ স্বরূপ:
<gmp-map center="37.4220656,-122.0840897" zoom="10" map-id="DEMO_MAP_ID"></gmp-map>

অভ্যন্তরীণভাবে, এটি Map ব্যবহার করে, যা innerMap সম্পত্তির সাথে অ্যাক্সেস করা যেতে পারে।

কাস্টম উপাদান:
<gmp-map center="lat,lng" map-id="string" zoom="number"></gmp-map>

এই ক্লাসটি HTMLElement প্রসারিত করে।

এই ক্লাসটি MapElementOptions প্রয়োগ করে।

const {MapElement} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

center
প্রকার: LatLng | LatLngLiteral optional
মানচিত্রের কেন্দ্র অক্ষাংশ/দ্রাঘিমাংশ।
এইচটিএমএল বৈশিষ্ট্য:
  • <gmp-map center="lat,lng"></gmp-map>
innerMap
প্রকার: Map
Map একটি রেফারেন্স যা MapElement অভ্যন্তরীণভাবে ব্যবহার করে।
mapId
প্রকার: string optional
ম্যাপের ম্যাপ আইডি। আরও তথ্যের জন্য মানচিত্র আইডি ডকুমেন্টেশন দেখুন।
এইচটিএমএল বৈশিষ্ট্য:
  • <gmp-map map-id="string"></gmp-map>
zoom
প্রকার: number optional
মানচিত্রের জুম স্তর।
এইচটিএমএল বৈশিষ্ট্য:
  • <gmp-map zoom="number"></gmp-map>
Beta addEventListener
addEventListener(type, listener[, options])
পরামিতি:
  • type : string একটি কেস-সংবেদনশীল স্ট্রিং যা শোনার জন্য ইভেন্টের ধরণকে উপস্থাপন করে।
  • listener : EventListener | EventListenerObject যে বস্তুটি একটি বিজ্ঞপ্তি পায়। এটি অবশ্যই একটি ফাংশন বা হ্যান্ডেল ইভেন্ট পদ্ধতি সহ একটি বস্তু হতে হবে
  • options : boolean| AddEventListenerOptions optional বিকল্পগুলি দেখুন। কাস্টম ইভেন্টগুলি শুধুমাত্র capture এবং passive সমর্থন করে৷
রিটার্ন মান: void
একটি ফাংশন সেট আপ করে যা যখনই নির্দিষ্ট ইভেন্ট টার্গেটে বিতরণ করা হয় তখন কল করা হবে। AddEventListener দেখুন
Beta removeEventListener
removeEventListener(type, listener[, options])
পরামিতি:
  • type : string একটি স্ট্রিং যা ইভেন্টের ধরন নির্দিষ্ট করে যার জন্য একটি ইভেন্ট শ্রোতাকে সরাতে হবে।
  • listener : EventListener | EventListenerObject ইভেন্ট টার্গেট থেকে সরাতে ইভেন্ট হ্যান্ডলারের ইভেন্ট লিসেনার।
  • options : boolean| EventListenerOptions optional বিকল্প দেখুন
রিটার্ন মান: void
লক্ষ্য থেকে addEventListener এর সাথে পূর্বে নিবন্ধিত একটি ইভেন্ট শ্রোতাকে সরিয়ে দেয়। রিমুভ ইভেন্টলিস্টেনার দেখুন

MapElementOptions ইন্টারফেস

google.maps . MapElementOptions ইন্টারফেস

MapElementOptions অবজেক্ট একটি MapElement এ সেট করা যেতে পারে এমন বৈশিষ্ট্যগুলিকে সংজ্ঞায়িত করতে ব্যবহৃত হয়।

center optional
প্রকার: LatLng | LatLngLiteral optional
প্রাথমিক মানচিত্র কেন্দ্র।
mapId optional
প্রকার: string optional
ম্যাপের ম্যাপ আইডি । একটি মানচিত্র তাত্ক্ষণিক হওয়ার পরে এই প্যারামিটার সেট বা পরিবর্তন করা যাবে না।
zoom optional
প্রকার: number optional
প্রাথমিক মানচিত্র জুম স্তর. বৈধ জুম মান হল শূন্য থেকে সমর্থিত সর্বোচ্চ জুম স্তর পর্যন্ত সংখ্যা। বৃহত্তর জুম মান একটি উচ্চ রেজোলিউশন অনুরূপ.

MapTypeStyle ইন্টারফেস

google.maps . MapTypeStyle ইন্টারফেস

MapTypeStyle হল নির্বাচক এবং স্টাইলারের একটি সংগ্রহ যা মানচিত্রটিকে কীভাবে স্টাইল করা উচিত তা নির্ধারণ করে। নির্বাচকরা মানচিত্রের বৈশিষ্ট্যগুলি এবং/অথবা উপাদানগুলিকে নির্দিষ্ট করে যেগুলিকে প্রভাবিত করা উচিত এবং স্টাইলাররা নির্দিষ্ট করে যে কীভাবে সেই বৈশিষ্ট্যগুলি এবং উপাদানগুলিকে সংশোধন করা উচিত৷ বিস্তারিত জানার জন্য, শৈলী রেফারেন্স দেখুন।

stylers
প্রকার: Array < Object >
নির্বাচিত মানচিত্রের বৈশিষ্ট্য এবং উপাদানগুলিতে প্রয়োগ করার শৈলী নিয়ম৷ নিয়মগুলি আপনি এই অ্যারেতে যে ক্রমে উল্লেখ করেছেন সেই ক্রমে প্রয়োগ করা হয়। ব্যবহারের নির্দেশিকা এবং অনুমোদিত মানগুলির জন্য, স্টাইল রেফারেন্স দেখুন।
elementType optional
প্রকার: string optional
যে উপাদানটিতে একটি স্টাইলার প্রয়োগ করা উচিত। একটি উপাদান মানচিত্রের একটি বৈশিষ্ট্যের একটি চাক্ষুষ দিক। উদাহরণ: একটি লেবেল, একটি আইকন, জ্যামিতিতে প্রয়োগ করা স্ট্রোক বা ফিল এবং আরও অনেক কিছু। ঐচ্ছিক। যদি elementType নির্দিষ্ট করা না থাকে, তাহলে মানটিকে 'all' বলে ধরে নেওয়া হয়। ব্যবহার এবং অনুমোদিত মানগুলির বিশদ বিবরণের জন্য, স্টাইল রেফারেন্স দেখুন।
featureType optional
প্রকার: string optional
বৈশিষ্ট্য, বা বৈশিষ্ট্যের গ্রুপ, যেখানে একটি স্টাইলার প্রয়োগ করা উচিত। ঐচ্ছিক। featureType নির্দিষ্ট করা না থাকলে, মানটিকে 'all' বলে ধরে নেওয়া হয়। ব্যবহার এবং অনুমোদিত মানগুলির বিশদ বিবরণের জন্য, স্টাইল রেফারেন্স দেখুন।

MapMouseEvent ইন্টারফেস

google.maps . MapMouseEvent ইন্টারফেস

এই বস্তুটি মানচিত্র এবং ওভারলেতে বিভিন্ন মাউস ইভেন্ট থেকে প্রত্যাবর্তন করা হয়েছে এবং নীচে দেখানো সমস্ত ক্ষেত্র রয়েছে৷

domEvent
সংশ্লিষ্ট নেটিভ DOM ইভেন্ট। ডেভেলপারদের target , currentTarget , relatedTarget এবং path বৈশিষ্ট্য সংজ্ঞায়িত এবং সামঞ্জস্যপূর্ণ হওয়ার উপর নির্ভর করা উচিত নয়। ডেভেলপারদের মানচিত্র API-এর অভ্যন্তরীণ বাস্তবায়নের DOM কাঠামোর উপরও নির্ভর করা উচিত নয়। অভ্যন্তরীণ ইভেন্ট ম্যাপিংয়ের কারণে, domEvent MapMouseEvent থেকে ভিন্ন শব্দার্থ থাকতে পারে (যেমন একটি MapMouseEvent "ক্লিক"-এ KeyboardEvent টাইপের একটি domEvent থাকতে পারে)।
latLng optional
প্রকার: LatLng optional
ঘটনাটি ঘটার সময় কার্সারের নিচে যে অক্ষাংশ/দ্রাঘিমাংশ ছিল।
stop
stop()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: void
এই ঘটনাকে আরও প্রচার করতে বাধা দেয়।

আইকনমাউস ইভেন্ট ইন্টারফেস

google.maps . IconMouseEvent ইন্টারফেস

এই বস্তুটি একটি ইভেন্টে পাঠানো হয় যখন একজন ব্যবহারকারী মানচিত্রের একটি আইকনে ক্লিক করেন। এই জায়গার আইডিটি প্লেসআইডি সদস্যে সংরক্ষণ করা হয়। ডিফল্ট তথ্য উইন্ডোটি প্রদর্শিত হওয়া থেকে রোধ করতে, এটি প্রচার করা প্রতিরোধ করতে এই ইভেন্টে স্টপ() পদ্ধতিতে কল করুন। Places API ডেভেলপার গাইডে স্থান আইডি সম্পর্কে আরও জানুন।

এই ইন্টারফেস MapMouseEvent প্রসারিত করে।

placeId optional
প্রকার: string optional
যে জায়গার আইডিতে ক্লিক করা হয়েছে। এই স্থান আইডিটি ক্লিক করা বৈশিষ্ট্য সম্পর্কে আরও তথ্য অনুসন্ধান করতে ব্যবহার করা যেতে পারে৷

Places API ডেভেলপার গাইডে স্থান আইডি সম্পর্কে আরও জানুন।

উত্তরাধিকারসূত্রে পাওয়া: domEvent , latLng
উত্তরাধিকারসূত্রে প্রাপ্ত: stop

MapTypeId ধ্রুবক

google.maps . MapTypeId ধ্রুবক

সাধারণ MapTypes-এর জন্য শনাক্তকারী। মান দ্বারা, বা ধ্রুবকের নাম ব্যবহার করে এইগুলি নির্দিষ্ট করুন। উদাহরণস্বরূপ, 'satellite' বা google.maps.MapTypeId.SATELLITE

const {MapTypeId} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

HYBRID এই মানচিত্র প্রকারটি স্যাটেলাইট চিত্রগুলিতে প্রধান রাস্তাগুলির একটি স্বচ্ছ স্তর প্রদর্শন করে৷
ROADMAP এই মানচিত্র প্রকার একটি সাধারণ রাস্তার মানচিত্র প্রদর্শন করে।
SATELLITE এই মানচিত্র প্রকার উপগ্রহ ছবি প্রদর্শন করে।
TERRAIN এই মানচিত্রের ধরন ভূখণ্ড এবং গাছপালাগুলির মতো শারীরিক বৈশিষ্ট্য সহ মানচিত্র প্রদর্শন করে।

MapTypeRegistry ক্লাস

google.maps . MapTypeRegistry ক্লাস

MapType দৃষ্টান্তগুলির জন্য একটি রেজিস্ট্রি, MapType id দ্বারা কীড।

এই ক্লাস MVCObject প্রসারিত.

const {MapTypeRegistry} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

MapTypeRegistry
MapTypeRegistry()
পরামিতি: কোনোটিই নয়
MapTypeRegistry এর ব্যবহারের জন্য মানচিত্রে উপলব্ধ কাস্টম মানচিত্র প্রকারের সংগ্রহ ধারণ করে। নিয়ন্ত্রণের মধ্যে উপলব্ধ মানচিত্র প্রকারের তালিকা প্রদান করার সময় API এই রেজিস্ট্রির সাথে পরামর্শ করে, উদাহরণস্বরূপ।
set
set(id, mapType)
পরামিতি:
  • id : রেজিস্ট্রিতে যোগ করার জন্য MapType-এর string আইডেন্টিফায়ার।
  • mapType : MapType |* MapType অবজেক্ট রেজিস্ট্রিতে যোগ করতে।
রিটার্ন মান: কোনটিই নয়
পাস করা স্ট্রিং শনাক্তকারীকে পাস করা MapType-এর সাথে সংযুক্ত করতে রেজিস্ট্রি সেট করে।
উত্তরাধিকারসূত্রে পাওয়া: addListener , bindTo , get , notify , setValues ​​, unbind , unbindAll

MapRestriction ইন্টারফেস

google.maps . MapRestriction ইন্টারফেস

একটি সীমাবদ্ধতা যা মানচিত্রে প্রয়োগ করা যেতে পারে। মানচিত্রের ভিউপোর্ট এই সীমাবদ্ধতা অতিক্রম করবে না।

latLngBounds
প্রকার: LatLngBounds | LatLngBoundsLiteral
সেট করা হলে, একজন ব্যবহারকারী শুধুমাত্র প্রদত্ত সীমানার মধ্যে প্যান এবং জুম করতে পারে। সীমানা দ্রাঘিমাংশ এবং অক্ষাংশ উভয় সীমাবদ্ধ করতে পারে, অথবা শুধুমাত্র অক্ষাংশ সীমাবদ্ধ করতে পারে। শুধুমাত্র অক্ষাংশের সীমার জন্য যথাক্রমে -180 এবং 180 এর পশ্চিম এবং পূর্ব দ্রাঘিমাংশ ব্যবহার করুন, উদাহরণস্বরূপ, latLngBounds: {north: northLat, south: southLat, west: -180, east: 180}
strictBounds optional
প্রকার: boolean optional
strictBounds পতাকা true সেট করে সীমা আরো সীমাবদ্ধ করা যেতে পারে। এটি একটি ব্যবহারকারী কতদূর জুম আউট করতে পারে তা হ্রাস করে, এটি নিশ্চিত করে যে সীমাবদ্ধ সীমার বাইরের সমস্ত কিছু লুকানো থাকে৷ ডিফল্ট false , যার অর্থ হল একটি ব্যবহারকারী যতক্ষণ না পুরো আবদ্ধ এলাকাটি দৃশ্যমান হয় ততক্ষণ পর্যন্ত জুম আউট করতে পারে, সম্ভবত আবদ্ধ এলাকার বাইরের এলাকাগুলি সহ।

ট্রাফিক লেয়ার ক্লাস

google.maps . TrafficLayer ক্লাস

একটি ট্র্যাফিক স্তর।

এই ক্লাস MVCObject প্রসারিত.

const {TrafficLayer} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

TrafficLayer
TrafficLayer([opts])
পরামিতি:
একটি স্তর যা বর্তমান সড়ক ট্রাফিক প্রদর্শন করে।
getMap
getMap()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: Map
যে মানচিত্রটিতে এই স্তরটি প্রদর্শিত হবে তা প্রদান করে।
setMap
setMap(map)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
নির্দিষ্ট মানচিত্রে স্তর রেন্ডার করে। মানচিত্র null এ সেট করা থাকলে, স্তরটি সরানো হবে।
setOptions
setOptions(options)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
উত্তরাধিকারসূত্রে পাওয়া: addListener , bindTo , get , notify , set , setValues ​​, unbind , unbindAll

TrafficLayerOptions ইন্টারফেস

google.maps . TrafficLayerOptions ইন্টারফেস

TrafficLayerOptions অবজেক্ট ট্রাফিক লেয়ারে সেট করা যায় এমন বৈশিষ্ট্যগুলিকে সংজ্ঞায়িত করতে ব্যবহৃত হয়।

autoRefresh optional
প্রকার: boolean optional
ডিফল্ট: true
ট্রাফিক স্তর স্বয়ংক্রিয়ভাবে আপডেট করা তথ্যের সাথে রিফ্রেশ হয় কিনা।
map optional
প্রকার: Map optional
যে মানচিত্রে ট্র্যাফিক স্তর প্রদর্শন করতে হবে৷

ট্রানজিট লেয়ার ক্লাস

google.maps . TransitLayer ক্লাস

একটি ট্রানজিট স্তর।

এই ক্লাস MVCObject প্রসারিত.

const {TransitLayer} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

TransitLayer
TransitLayer()
পরামিতি: কোনোটিই নয়
একটি স্তর যা ট্রানজিট লাইন প্রদর্শন করে।
getMap
getMap()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: Map
যে মানচিত্রটিতে এই স্তরটি প্রদর্শিত হবে তা প্রদান করে।
setMap
setMap(map)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
নির্দিষ্ট মানচিত্রে স্তর রেন্ডার করে। মানচিত্র null এ সেট করা থাকলে, স্তরটি সরানো হবে।
উত্তরাধিকারসূত্রে পাওয়া: addListener , bindTo , get , notify , set , setValues ​​, unbind , unbindAll

সাইকেল চালানো লেয়ার ক্লাস

google.maps . BicyclingLayer ক্লাস

বাইকের লেন এবং পথ দেখানো একটি স্তর।

এই ক্লাস MVCObject প্রসারিত.

const {BicyclingLayer} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

BicyclingLayer
BicyclingLayer()
পরামিতি: কোনোটিই নয়
একটি স্তর যা বাইকের লেন এবং পথ প্রদর্শন করে এবং বড় রাস্তাগুলিকে অবনমিত করে।
getMap
getMap()
পরামিতি: কোনোটিই নয়
রিটার্ন মান: Map
যে মানচিত্রটিতে এই স্তরটি প্রদর্শিত হবে তা প্রদান করে।
setMap
setMap(map)
পরামিতি:
রিটার্ন মান: কোনটিই নয়
নির্দিষ্ট মানচিত্রে স্তর রেন্ডার করে। মানচিত্র null এ সেট করা থাকলে, স্তরটি সরানো হবে।
উত্তরাধিকারসূত্রে পাওয়া: addListener , bindTo , get , notify , set , setValues ​​, unbind , unbindAll

ক্যামেরা অপশন ইন্টারফেস

google.maps . CameraOptions ইন্টারফেস

মানচিত্রের ক্যামেরা বিকল্পগুলি সেট করার জন্য ব্যবহৃত হয়।

center optional
প্রকার: LatLngLiteral | LatLng optional
heading optional
প্রকার: number optional
tilt optional
প্রকার: number optional
zoom optional
প্রকার: number optional

দৃশ্যমান অঞ্চল ইন্টারফেস

google.maps . VisibleRegion ইন্টারফেস

চার-পার্শ্বযুক্ত বহুভুজ সংজ্ঞায়িত চারটি বিন্দু রয়েছে যা মানচিত্রের দৃশ্যমান অঞ্চল। একটি ভেক্টর মানচিত্রে এই বহুভুজটি একটি আয়তক্ষেত্রের পরিবর্তে একটি ট্র্যাপিজয়েড হতে পারে, যখন একটি ভেক্টর মানচিত্রে কাত থাকে।

farLeft
প্রকার: LatLng
farRight
প্রকার: LatLng
latLngBounds
প্রকার: LatLngBounds
সবচেয়ে ছোট বাউন্ডিং বাক্স যা দৃশ্যমান অঞ্চলকে অন্তর্ভুক্ত করে।
nearLeft
প্রকার: LatLng
nearRight
প্রকার: LatLng

রেন্ডারিং টাইপ ধ্রুবক

google.maps . RenderingType ধ্রুবক

const {RenderingType} = await google.maps.importLibrary("maps") কল করে অ্যাক্সেস করুন। Maps JavaScript API-এ লাইব্রেরিগুলি দেখুন।

RASTER নির্দেশ করে যে মানচিত্রটি একটি রাস্টার মানচিত্র।
UNINITIALIZED নির্দেশ করে যে মানচিত্রটি ভেক্টর নাকি রাস্টার তা এখনও অজানা, কারণ মানচিত্রটি এখনও শুরু করা শেষ হয়নি।
VECTOR নির্দেশ করে যে মানচিত্রটি একটি ভেক্টর মানচিত্র।

ম্যাপ ক্যাপাবিলিটি ইন্টারফেস

google.maps . MapCapabilities interface

Object containing a snapshot of what capabilities are currently available for the Map. Note that this does not necessarily mean that relevant modules are loaded or initialized, but rather that the current map has permission to use these APIs. See the properties for a list of possible capabilities.

isAdvancedMarkersAvailable optional
Type: boolean optional
If true, this map is configured properly to allow for the use of advanced markers. Note that you must still import the marker library in order to use advanced markers. See https://goo.gle/gmp-isAdvancedMarkersAvailable for more information.
isDataDrivenStylingAvailable optional
Type: boolean optional
If true, this map is configured properly to allow for the use of data-driven styling for at least one FeatureLayer. See https://goo.gle/gmp-data-driven-styling and https://goo.gle/gmp-FeatureLayerIsAvailable for more information.
,

Map class

google.maps . Map class

This class extends MVCObject .

Access by calling const {Map} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

Map
Map(mapDiv[, opts])
Parameters:
Creates a new map inside of the given HTML container, which is typically a DIV element.
controls
Type: Array < MVCArray < HTMLElement >>
Additional controls to attach to the map. To add a control to the map, add the control's <div> to the MVCArray corresponding to the ControlPosition where it should be rendered.
data
Type: Data
An instance of Data , bound to the map. Add features to this Data object to conveniently display them on this map.
mapTypes
A registry of MapType instances by string ID.
overlayMapTypes
Type: MVCArray < MapType optional >
Additional map types to overlay. Overlay map types will display on top of the base map they are attached to, in the order in which they appear in the overlayMapTypes array (overlays with higher index values are displayed in front of overlays with lower index values).
fitBounds
fitBounds(bounds[, padding])
Parameters:
  • bounds : LatLngBounds | LatLngBoundsLiteral Bounds to show.
  • padding : number| Padding optional Padding in pixels. The bounds will be fit in the part of the map that remains after padding is removed. A number value will yield the same padding on all 4 sides. Supply 0 here to make a fitBounds idempotent on the result of getBounds.
Return Value: None
Sets the viewport to contain the given bounds.
Note: When the map is set to display: none , the fitBounds function reads the map's size as 0x0, and therefore does not do anything. To change the viewport while the map is hidden, set the map to visibility: hidden , thereby ensuring the map div has an actual size. For vector maps, this method sets the map's tilt and heading to their default zero values. Calling this method may cause a smooth animation as the map pans and zooms to fit the bounds. Whether or not this method animates depends on an internal heuristic.
getBounds
getBounds()
Parameters: None
Return Value: LatLngBounds |undefined The lat/lng bounds of the current viewport.
Returns the lat/lng bounds of the current viewport. If more than one copy of the world is visible, the bounds range in longitude from -180 to 180 degrees inclusive. If the map is not yet initialized or center and zoom have not been set then the result is undefined . For vector maps with non-zero tilt or heading, the returned lat/lng bounds represents the smallest bounding box that includes the visible region of the map's viewport. See MapCanvasProjection.getVisibleRegion for getting the exact visible region of the map's viewport.
getCenter
getCenter()
Parameters: None
Return Value: LatLng |undefined
Returns the position displayed at the center of the map. Note that this LatLng object is not wrapped. See LatLng for more information. If the center or bounds have not been set then the result is undefined .
getClickableIcons
getClickableIcons()
Parameters: None
Return Value: boolean|undefined
Returns the clickability of the map icons. A map icon represents a point of interest, also known as a POI. If the returned value is true , then the icons are clickable on the map.
Beta getDatasetFeatureLayer
getDatasetFeatureLayer(datasetId)
Parameters:
  • datasetId : string
Return Value: FeatureLayer
Returns the FeatureLayer for the specified datasetId . Dataset IDs must be configured in the Google Cloud Console. If the dataset ID is not associated with the map's map style, or if Data-driven styling is not available (no map ID, no vector tiles, no Data-Driven Styling feature layers or Datasets configured in the Map Style), this logs an error, and the resulting FeatureLayer.isAvailable will be false.
getDiv
getDiv()
Parameters: None
Return Value: HTMLElement The mapDiv of the map.
getFeatureLayer
getFeatureLayer(featureType)
Parameters:
Return Value: FeatureLayer
Returns the FeatureLayer of the specific FeatureType . A FeatureLayer must be enabled in the Google Cloud Console. If a FeatureLayer of the specified FeatureType does not exist on this map, or if Data-driven styling is not available (no map ID, no vector tiles, and no FeatureLayer enabled in the map style), this logs an error, and the resulting FeatureLayer.isAvailable will be false.
getHeading
getHeading()
Parameters: None
Return Value: number|undefined
Returns the compass heading of the map. The heading value is measured in degrees (clockwise) from cardinal direction North. If the map is not yet initialized then the result is undefined .
getMapCapabilities
getMapCapabilities()
Parameters: None
Return Value: MapCapabilities
Informs the caller of the current capabilities available to the map based on the Map ID that was provided.
getMapTypeId
getMapTypeId()
Parameters: None
Return Value: MapTypeId |string|undefined
getProjection
getProjection()
Parameters: None
Return Value: Projection |undefined
Returns the current Projection . If the map is not yet initialized then the result is undefined . Listen to the projection_changed event and check its value to ensure it is not undefined .
getRenderingType
getRenderingType()
Parameters: None
Return Value: RenderingType
Returns the current RenderingType of the map.
getStreetView
getStreetView()
Parameters: None
Return Value: StreetViewPanorama The panorama bound to the map.
Returns the default StreetViewPanorama bound to the map, which may be a default panorama embedded within the map, or the panorama set using setStreetView() . Changes to the map's streetViewControl will be reflected in the display of such a bound panorama.
getTilt
getTilt()
Parameters: None
Return Value: number|undefined
Returns the current angle of incidence of the map, in degrees from the viewport plane to the map plane. For raster maps, the result will be 0 for imagery taken directly overhead or 45 for 45° imagery. This method does not return the value set by setTilt . See setTilt for details.
getZoom
getZoom()
Parameters: None
Return Value: number|undefined
Returns the zoom of the map. If the zoom has not been set then the result is undefined .
moveCamera
moveCamera(cameraOptions)
Parameters:
Return Value: None
Immediately sets the map's camera to the target camera options, without animation.
panBy
panBy(x, y)
Parameters:
  • x : number Number of pixels to move the map in the x direction.
  • y : number Number of pixels to move the map in the y direction.
Return Value: None
Changes the center of the map by the given distance in pixels. If the distance is less than both the width and height of the map, the transition will be smoothly animated. Note that the map coordinate system increases from west to east (for x values) and north to south (for y values).
panTo
panTo(latLng)
Parameters:
Return Value: None
Changes the center of the map to the given LatLng . If the change is less than both the width and height of the map, the transition will be smoothly animated.
panToBounds
panToBounds(latLngBounds[, padding])
Parameters:
  • latLngBounds : LatLngBounds | LatLngBoundsLiteral The bounds to pan the map to.
  • padding : number| Padding optional Padding in pixels. A number value will yield the same padding on all 4 sides. The default value is 0.
Return Value: None
Pans the map by the minimum amount necessary to contain the given LatLngBounds . It makes no guarantee where on the map the bounds will be, except that the map will be panned to show as much of the bounds as possible inside {currentMapSizeInPx} - {padding} . For both raster and vector maps, the map's zoom, tilt, and heading will not be changed.
setCenter
setCenter(latlng)
Parameters:
Return Value: None
setClickableIcons
setClickableIcons(value)
Parameters:
  • value : boolean
Return Value: None
Controls whether the map icons are clickable or not. A map icon represents a point of interest, also known as a POI. To disable the clickability of map icons, pass a value of false to this method.
setHeading
setHeading(heading)
Parameters:
  • heading : number
Return Value: None
Sets the compass heading for map measured in degrees from cardinal direction North. For raster maps, this method only applies to aerial imagery.
setMapTypeId
setMapTypeId(mapTypeId)
Parameters:
Return Value: None
setOptions
setOptions(options)
Parameters:
Return Value: None
setStreetView
setStreetView(panorama)
Parameters:
Return Value: None
Binds a StreetViewPanorama to the map. This panorama overrides the default StreetViewPanorama , allowing the map to bind to an external panorama outside of the map. Setting the panorama to null binds the default embedded panorama back to the map.
setTilt
setTilt(tilt)
Parameters:
  • tilt : number
Return Value: None
For vector maps, sets the angle of incidence of the map. The allowed values are restricted depending on the zoom level of the map. For raster maps, controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45 . setTilt(0) causes the map to always use a 0° overhead view regardless of the zoom level and viewport. setTilt(45) causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value set by setTilt . Because getTilt and setTilt refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects.
setZoom
setZoom(zoom)
Parameters:
  • zoom : number Larger zoom values correspond to a higher resolution.
Return Value: None
Sets the zoom of the map.
Inherited: addListener , bindTo , get , notify , set , setValues , unbind , unbindAll
DEMO_MAP_ID Map ID which can be used for code samples which require a Map ID. This Map ID is not intended for use in production applications and cannot be used for features which require cloud configuration (such as Cloud Styling).
bounds_changed
function()
Arguments: None
This event is fired when the viewport bounds have changed.
center_changed
function()
Arguments: None
This event is fired when the map center property changes.
click
function(event)
Arguments:
This event is fired when the user clicks on the map. A MapMouseEvent with properties for the clicked location is returned unless a place icon was clicked, in which case an IconMouseEvent with a place ID is returned. IconMouseEvent and MapMouseEvent are identical, except that IconMouseEvent has the place ID field. The event can always be treated as an MapMouseEvent when the place ID is not important. The click event is not fired if a marker or info window was clicked.
contextmenu
function(event)
Arguments:
This event is fired when the DOM contextmenu event is fired on the map container.
dblclick
function(event)
Arguments:
This event is fired when the user double-clicks on the map. Note that the click event will sometimes fire once and sometimes twice, right before this one.
drag
function()
Arguments: None
This event is repeatedly fired while the user drags the map.
dragend
function()
Arguments: None
This event is fired when the user stops dragging the map.
dragstart
function()
Arguments: None
This event is fired when the user starts dragging the map.
heading_changed
function()
Arguments: None
This event is fired when the map heading property changes.
idle
function()
Arguments: None
This event is fired when the map becomes idle after panning or zooming.
isfractionalzoomenabled_changed
function()
Arguments: None
This event is fired when the isFractionalZoomEnabled property has changed.
mapcapabilities_changed
function()
Arguments: None
This event is fired when the map capabilities change.
maptypeid_changed
function()
Arguments: None
This event is fired when the mapTypeId property changes.
mousemove
function(event)
Arguments:
This event is fired whenever the user's mouse moves over the map container.
mouseout
function(event)
Arguments:
This event is fired when the user's mouse exits the map container.
mouseover
function(event)
Arguments:
This event is fired when the user's mouse enters the map container.
projection_changed
function()
Arguments: None
This event is fired when the projection has changed.
renderingtype_changed
function()
Arguments: None
This event is fired when the renderingType has changed.
tilesloaded
function()
Arguments: None
This event is fired when the visible tiles have finished loading.
tilt_changed
function()
Arguments: None
This event is fired when the map tilt property changes.
zoom_changed
function()
Arguments: None
This event is fired when the map zoom property changes.
rightclick
function(event)
Arguments:
This event is fired when the user right-clicks on the map.

MapOptions interface

google.maps . MapOptions interface

MapOptions object used to define the properties that can be set on a Map.

backgroundColor optional
Type: string optional
Color used for the background of the Map div. This color will be visible when tiles have not yet loaded as the user pans. This option can only be set when the map is initialized.
center optional
Type: LatLng | LatLngLiteral optional
The initial Map center.
clickableIcons optional
Type: boolean optional
Default: true
When false , map icons are not clickable. A map icon represents a point of interest, also known as a POI.
controlSize optional
Type: number optional
Size in pixels of the controls appearing on the map. This value must be supplied directly when creating the Map, updating this value later may bring the controls into an undefined state. Only governs the controls made by the Maps API itself. Does not scale developer created custom controls.
disableDefaultUI optional
Type: boolean optional
Enables/disables all default UI buttons. May be overridden individually. Does not disable the keyboard controls, which are separately controlled by the MapOptions.keyboardShortcuts option. Does not disable gesture controls, which are separately controlled by the MapOptions.gestureHandling option.
disableDoubleClickZoom optional
Type: boolean optional
Enables/disables zoom and center on double click. Enabled by default.

Note : This property is not recommended . To disable zooming on double click, you can use the gestureHandling property, and set it to "none" .

draggable optional
Type: boolean optional
If false , prevents the map from being dragged. Dragging is enabled by default.
draggableCursor optional
Type: string optional
The name or url of the cursor to display when mousing over a draggable map. This property uses the css cursor attribute to change the icon. As with the css property, you must specify at least one fallback cursor that is not a URL. For example: draggableCursor: 'url( http://www.example.com/icon.png ), auto;' .
draggingCursor optional
Type: string optional
The name or url of the cursor to display when the map is being dragged. This property uses the css cursor attribute to change the icon. As with the css property, you must specify at least one fallback cursor that is not a URL. For example: draggingCursor: 'url( http://www.example.com/icon.png ), auto;' .
fullscreenControl optional
Type: boolean optional
The enabled/disabled state of the Fullscreen control.
fullscreenControlOptions optional
Type: FullscreenControlOptions optional
The display options for the Fullscreen control.
gestureHandling optional
Type: string optional
This setting controls how the API handles gestures on the map. Allowed values:
  • "cooperative" : Scroll events and one-finger touch gestures scroll the page, and do not zoom or pan the map. Two-finger touch gestures pan and zoom the map. Scroll events with a ctrl key or ⌘ key pressed zoom the map.
    In this mode the map cooperates with the page.
  • "greedy" : All touch gestures and scroll events pan or zoom the map.
  • "none" : The map cannot be panned or zoomed by user gestures.
  • "auto" : (default) Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or in an iframe.
heading optional
Type: number optional
The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available.
isFractionalZoomEnabled optional
Type: boolean optional
Default: true for vector maps and false for raster maps
Whether the map should allow fractional zoom levels. Listen to isfractionalzoomenabled_changed to know when the default has been set.
keyboardShortcuts optional
Type: boolean optional
If false , prevents the map from being controlled by the keyboard. Keyboard shortcuts are enabled by default.
mapId optional
Type: string optional
The Map ID of the map. This parameter cannot be set or changed after a map is instantiated.
mapTypeControl optional
Type: boolean optional
The initial enabled/disabled state of the Map type control.
mapTypeControlOptions optional
Type: MapTypeControlOptions optional
The initial display options for the Map type control.
mapTypeId optional
Type: MapTypeId |string optional
The initial Map mapTypeId. Defaults to ROADMAP .
maxZoom optional
Type: number optional
The maximum zoom level which will be displayed on the map. If omitted, or set to null , the maximum zoom from the current map type is used instead. Valid zoom values are numbers from zero up to the supported maximum zoom level .
minZoom optional
Type: number optional
The minimum zoom level which will be displayed on the map. If omitted, or set to null , the minimum zoom from the current map type is used instead. Valid zoom values are numbers from zero up to the supported maximum zoom level .
noClear optional
Type: boolean optional
If true , do not clear the contents of the Map div.
panControl optional
Type: boolean optional
The enabled/disabled state of the Pan control.

Note: The Pan control is not available in the new set of controls introduced in v3.22 of the Google Maps JavaScript API. While using v3.22 and v3.23, you can choose to use the earlier set of controls rather than the new controls, thus making the Pan control available as part of the old control set. See What's New in the v3.22 Map Controls .

panControlOptions optional
Type: PanControlOptions optional
The display options for the Pan control.

Note: The Pan control is not available in the new set of controls introduced in v3.22 of the Google Maps JavaScript API. While using v3.22 and v3.23, you can choose to use the earlier set of controls rather than the new controls, thus making the Pan control available as part of the old control set. See What's New in the v3.22 Map Controls .

restriction optional
Type: MapRestriction optional
Defines a boundary that restricts the area of the map accessible to users. When set, a user can only pan and zoom while the camera view stays inside the limits of the boundary.
rotateControl optional
Type: boolean optional
The enabled/disabled state of the Rotate control.
rotateControlOptions optional
Type: RotateControlOptions optional
The display options for the Rotate control.
scaleControl optional
Type: boolean optional
The initial enabled/disabled state of the Scale control.
scaleControlOptions optional
Type: ScaleControlOptions optional
The initial display options for the Scale control.
scrollwheel optional
Type: boolean optional
If false , disables zooming on the map using a mouse scroll wheel. The scrollwheel is enabled by default.

Note : This property is not recommended . To disable zooming using scrollwheel, you can use the gestureHandling property, and set it to either "cooperative" or "none" .

streetView optional
Type: StreetViewPanorama optional
A StreetViewPanorama to display when the Street View pegman is dropped on the map. If no panorama is specified, a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped.
streetViewControl optional
Type: boolean optional
The initial enabled/disabled state of the Street View Pegman control. This control is part of the default UI, and should be set to false when displaying a map type on which the Street View road overlay should not appear (eg a non-Earth map type).
streetViewControlOptions optional
Type: StreetViewControlOptions optional
The initial display options for the Street View Pegman control.
styles optional
Type: Array < MapTypeStyle > optional
Styles to apply to each of the default map types. Note that for satellite / hybrid and terrain modes, these styles will only apply to labels and geometry.
tilt optional
Type: number optional
For vector maps, sets the angle of incidence of the map. The allowed values are restricted depending on the zoom level of the map. For raster maps, controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45 . The value 0 causes the map to always use a 0° overhead view regardless of the zoom level and viewport. The value 45 causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value specified by this option. Because getTilt and this option refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects.
zoom optional
Type: number optional
The initial Map zoom level. Valid zoom values are numbers from zero up to the supported maximum zoom level . Larger zoom values correspond to a higher resolution.
zoomControl optional
Type: boolean optional
The enabled/disabled state of the Zoom control.
zoomControlOptions optional
Type: ZoomControlOptions optional
The display options for the Zoom control.

MapElement class

google.maps . MapElement class

MapElement is an HTMLElement subclass for rendering maps. After loading the maps library, a map can be created in HTML. উদাহরণ স্বরূপ:
<gmp-map center="37.4220656,-122.0840897" zoom="10" map-id="DEMO_MAP_ID"></gmp-map>

Internally, it uses Map , which can be accessed with the innerMap property.

Custom element:
<gmp-map center="lat,lng" map-id="string" zoom="number"></gmp-map>

This class extends HTMLElement .

This class implements MapElementOptions .

Access by calling const {MapElement} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

center
Type: LatLng | LatLngLiteral optional
The center latitude/longitude of the map.
HTML attribute:
  • <gmp-map center="lat,lng"></gmp-map>
innerMap
Type: Map
A reference to the Map that the MapElement uses internally.
mapId
Type: string optional
The Map ID of the map. See the Map ID documentation for more information.
HTML attribute:
  • <gmp-map map-id="string"></gmp-map>
zoom
Type: number optional
The zoom level of the map.
HTML attribute:
  • <gmp-map zoom="number"></gmp-map>
Beta addEventListener
addEventListener(type, listener[, options])
Parameters:
  • type : string A case-sensitive string representing the event type to listen for.
  • listener : EventListener | EventListenerObject The object that receives a notification. This must be a function or an object with the handleEvent method
  • options : boolean| AddEventListenerOptions optional See options . Custom events only support capture and passive .
Return Value: void
Sets up a function that will be called whenever the specified event is delivered to the target. See addEventListener
Beta removeEventListener
removeEventListener(type, listener[, options])
Parameters:
Return Value: void
Removes an event listener previously registered with addEventListener from the target. See removeEventListener

MapElementOptions interface

google.maps . MapElementOptions interface

MapElementOptions object used to define the properties that can be set on a MapElement.

center optional
Type: LatLng | LatLngLiteral optional
The initial Map center.
mapId optional
Type: string optional
The Map ID of the map. This parameter cannot be set or changed after a map is instantiated.
zoom optional
Type: number optional
The initial Map zoom level. Valid zoom values are numbers from zero up to the supported maximum zoom level . Larger zoom values correspond to a higher resolution.

MapTypeStyle interface

google.maps . MapTypeStyle interface

The MapTypeStyle is a collection of selectors and stylers that define how the map should be styled. Selectors specify the map features and/or elements that should be affected, and stylers specify how those features and elements should be modified. For details, see the style reference .

stylers
Type: Array < Object >
The style rules to apply to the selected map features and elements. The rules are applied in the order that you specify in this array. For guidelines on usage and allowed values, see the style reference .
elementType optional
Type: string optional
The element to which a styler should be applied. An element is a visual aspect of a feature on the map. Example: a label, an icon, the stroke or fill applied to the geometry, and more. ঐচ্ছিক। If elementType is not specified, the value is assumed to be 'all' . For details of usage and allowed values, see the style reference .
featureType optional
Type: string optional
The feature, or group of features, to which a styler should be applied. ঐচ্ছিক। If featureType is not specified, the value is assumed to be 'all' . For details of usage and allowed values, see the style reference .

MapMouseEvent interface

google.maps . MapMouseEvent interface

This object is returned from various mouse events on the map and overlays, and contains all the fields shown below.

domEvent
The corresponding native DOM event. Developers should not rely on target , currentTarget , relatedTarget and path properties being defined and consistent. Developers should not also rely on the DOM structure of the internal implementation of the Maps API. Due to internal event mapping, the domEvent may have different semantics from the MapMouseEvent (eg a MapMouseEvent "click" may have a domEvent of type KeyboardEvent ).
latLng optional
Type: LatLng optional
The latitude/longitude that was below the cursor when the event occurred.
stop
stop()
Parameters: None
Return Value: void
Prevents this event from propagating further.

IconMouseEvent interface

google.maps . IconMouseEvent interface

This object is sent in an event when a user clicks on an icon on the map. The place ID of this place is stored in the placeId member. To prevent the default info window from showing up, call the stop() method on this event to prevent it being propagated. Learn more about place IDs in the Places API developer guide.

This interface extends MapMouseEvent .

placeId optional
Type: string optional
The place ID of the place that was clicked. This place ID can be used to query more information about the feature that was clicked.

Learn more about place IDs in the Places API developer guide.

Inherited: domEvent , latLng
Inherited: stop

MapTypeId constants

google.maps . MapTypeId constants

Identifiers for common MapTypes. Specify these by value, or by using the constant's name. For example, 'satellite' or google.maps.MapTypeId.SATELLITE .

Access by calling const {MapTypeId} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

HYBRID This map type displays a transparent layer of major streets on satellite images.
ROADMAP This map type displays a normal street map.
SATELLITE This map type displays satellite images.
TERRAIN This map type displays maps with physical features such as terrain and vegetation.

MapTypeRegistry class

google.maps . MapTypeRegistry class

A registry for MapType instances, keyed by MapType id.

This class extends MVCObject .

Access by calling const {MapTypeRegistry} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

MapTypeRegistry
MapTypeRegistry()
Parameters: None
The MapTypeRegistry holds the collection of custom map types available to the map for its use. The API consults this registry when providing the list of available map types within controls, for example.
set
set(id, mapType)
Parameters:
  • id : string Identifier of the MapType to add to the registry.
  • mapType : MapType |* MapType object to add to the registry.
Return Value: None
Sets the registry to associate the passed string identifier with the passed MapType.
Inherited: addListener , bindTo , get , notify , setValues , unbind , unbindAll

MapRestriction interface

google.maps . MapRestriction interface

A restriction that can be applied to the Map. The map's viewport will not exceed these restrictions.

latLngBounds
When set, a user can only pan and zoom inside the given bounds. Bounds can restrict both longitude and latitude, or can restrict latitude only. For latitude-only bounds use west and east longitudes of -180 and 180, respectively, for example, latLngBounds: {north: northLat, south: southLat, west: -180, east: 180} .
strictBounds optional
Type: boolean optional
Bounds can be made more restrictive by setting the strictBounds flag to true . This reduces how far a user can zoom out, ensuring that everything outside of the restricted bounds stays hidden. The default is false , meaning that a user can zoom out until the entire bounded area is in view, possibly including areas outside the bounded area.

TrafficLayer class

google.maps . TrafficLayer class

A traffic layer.

This class extends MVCObject .

Access by calling const {TrafficLayer} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

TrafficLayer
TrafficLayer([opts])
Parameters:
A layer that displays current road traffic.
getMap
getMap()
Parameters: None
Return Value: Map
Returns the map on which this layer is displayed.
setMap
setMap(map)
Parameters:
Return Value: None
Renders the layer on the specified map. If map is set to null , the layer will be removed.
setOptions
setOptions(options)
Parameters:
Return Value: None
Inherited: addListener , bindTo , get , notify , set , setValues , unbind , unbindAll

TrafficLayerOptions interface

google.maps . TrafficLayerOptions interface

TrafficLayerOptions object used to define the properties that can be set on a TrafficLayer.

autoRefresh optional
Type: boolean optional
Default: true
Whether the traffic layer refreshes with updated information automatically.
map optional
Type: Map optional
Map on which to display the traffic layer.

TransitLayer class

google.maps . TransitLayer class

A transit layer.

This class extends MVCObject .

Access by calling const {TransitLayer} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

TransitLayer
TransitLayer()
Parameters: None
A layer that displays transit lines.
getMap
getMap()
Parameters: None
Return Value: Map
Returns the map on which this layer is displayed.
setMap
setMap(map)
Parameters:
Return Value: None
Renders the layer on the specified map. If map is set to null , the layer will be removed.
Inherited: addListener , bindTo , get , notify , set , setValues , unbind , unbindAll

BicyclingLayer class

google.maps . BicyclingLayer class

A layer showing bike lanes and paths.

This class extends MVCObject .

Access by calling const {BicyclingLayer} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

BicyclingLayer
BicyclingLayer()
Parameters: None
A layer that displays bike lanes and paths and demotes large roads.
getMap
getMap()
Parameters: None
Return Value: Map
Returns the map on which this layer is displayed.
setMap
setMap(map)
Parameters:
Return Value: None
Renders the layer on the specified map. If map is set to null , the layer will be removed.
Inherited: addListener , bindTo , get , notify , set , setValues , unbind , unbindAll

CameraOptions interface

google.maps . CameraOptions interface

Used for setting the map's camera options.

center optional
Type: LatLngLiteral | LatLng optional
heading optional
Type: number optional
tilt optional
Type: number optional
zoom optional
Type: number optional

VisibleRegion interface

google.maps . VisibleRegion interface

Contains the four points defining the four-sided polygon that is the visible region of the map. On a vector map this polygon can be a trapezoid instead of a rectangle, when a vector map has tilt.

farLeft
Type: LatLng
farRight
Type: LatLng
latLngBounds
The smallest bounding box that includes the visible region.
nearLeft
Type: LatLng
nearRight
Type: LatLng

RenderingType constants

google.maps . RenderingType constants

Access by calling const {RenderingType} = await google.maps.importLibrary("maps") . See Libraries in the Maps JavaScript API .

RASTER Indicates that the map is a raster map.
UNINITIALIZED Indicates that it is unknown yet whether the map is vector or raster, because the map has not finished initializing yet.
VECTOR Indicates that the map is a vector map.

MapCapabilities interface

google.maps . MapCapabilities interface

Object containing a snapshot of what capabilities are currently available for the Map. Note that this does not necessarily mean that relevant modules are loaded or initialized, but rather that the current map has permission to use these APIs. See the properties for a list of possible capabilities.

isAdvancedMarkersAvailable optional
Type: boolean optional
If true, this map is configured properly to allow for the use of advanced markers. Note that you must still import the marker library in order to use advanced markers. See https://goo.gle/gmp-isAdvancedMarkersAvailable for more information.
isDataDrivenStylingAvailable optional
Type: boolean optional
If true, this map is configured properly to allow for the use of data-driven styling for at least one FeatureLayer. See https://goo.gle/gmp-data-driven-styling and https://goo.gle/gmp-FeatureLayerIsAvailable for more information.