سيتوفّر تصميم الخريطة الجديد قريبًا على "منصة خرائط Google". يتضمن هذا التحديث على تصميم الخريطة لوحة ألوان تلقائية جديدة وتحسينات على تجارب الخرائط وسهولة الاستخدام. سيتم تعديل جميع أنماط الخرائط تلقائيًا في آذار (مارس) 2025. للمزيد من المعلومات عن مدى التوفّر وكيفية تفعيل الميزة في وقت سابق، يُرجى الاطّلاع على
نمط الخريطة الجديد في "منصة خرائط Google" .
إرسال ملاحظات
أحداث طبقة الميزات
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
اختيار النظام الأساسي:
نظام التشغيل
Android
iOS
JavaScript
يعرض هذا المثال حدود الخرائط
GMSFeatureTypeLocality
، وتنفيذ
دالة التفويض التي تحدد ما تم النقر عليه
المضلّع. تعرض النتيجة نافذة تنبيه معلومات تحتوي على بيانات الحدث.
ملاحظة مهمة: لا تؤدي الميزات غير المرئية إلى تشغيل أحداث النقر. يجب أن تحتوي المضلّعات على
الحد الأدنى لقيمة ألفا لجعلها قابلة للنقر.
Swift
class SampleViewController : UIViewController {
private lazy var mapView : GMSMapView = GMSMapView ( frame : . zero , mapID : GMSMapID ( identifier : "YOUR_MAP_ID" ), camera : GMSCameraPosition ( latitude : 40 , longitude : - 80 , zoom : 12 ))
override func loadView () {
view = mapView
let style = FeatureStyle ( fill : . orange . withAlphaComponent ( 0.5 ), stroke : . orange , strokeWidth : 2 )
mapView . featureLayer ( of : . locality ) . style = { _ in style }
mapView . delegate = self
}
}
extension SampleViewController : GMSMapViewDelegate {
func mapView ( _ mapView : GMSMapView , didTap features : [Feature ], in featureLayer : FeatureLayer<Feature> , atLocation : CLLocationCoordinate2D ) {
let toast = UIAlertController ( title : "Clicked places" , message : ( features . compactMap { ( $ 0 as ? PlaceFeature ) ? . placeID }) . joined ( separator : ", " ), preferredStyle : . alert )
present ( toast , animated : true , completion : nil )
}
}
Objective-C
@interface SampleViewController : UIViewController <GMSMapViewDelegate >
@end
@implementation SampleViewController
- ( void ) loadView {
GMSMapView * mapView = [ GMSMapView mapWithFrame : CGRectZero mapID : [ GMSMapID mapIDWithIdentifier : @"YOUR_MAP_ID" ] camera : [ GMSCameraPosition cameraWithLatitude : 40 longitude : -80 zoom : 12 ]];
mapView . delegete = self ;
GMSFeatureStyle * style = [ GMSFeatureStyle styleWithFillColor : [[ UIColor orangeColor ] colorWithAlphaComponent : 0.5 ] strokeColor : [ UIColor orangeColor ] strokeWidth : 2.0 ];
[ mapView featureLayerOfFeatureType : GMSFeatureTypeLocality ]. style = ^ ( GMSPlaceFeature * feature ) { return style ; };
self . view = mapView ;
}
- ( void ) mapView: ( GMSMapView * ) mapView didTapFeatures: ( NSArray<id<GMSFeature> > * ) features inFeatureLayer: ( GMSFeatureLayer * ) featureLayer atLocation: ( CLLocationCoordinate2D ) location {
NSMutableArray<NSString *> * places = [ NSMutableArray array ];
for ( id<GMSFeature> feature in features ) {
if ( ! [ feature isKindOfClass : [ GMSPlaceFeature class ]]) { continue ; }
NSString * placeID = (( GMSPlaceFeature * ) feature ). placeID ;
[ places addObject : placeID ];
}
UIAlertController * toast = [ UIAlertController alertControllerWithTitle : @"Clicked places" message : [ places componentsJoinedByString : @", " ] preferredStyle : UIAlertControllerStyleAlert ];
[ self presentViewController : toast animated : YES completion : nil ];
}
إرسال ملاحظات
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0 . للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers . إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"لا يحتوي على المعلومات التي أحتاج إليها."
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"الخطوات معقدة للغاية / كثيرة جدًا."
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"المحتوى قديم."
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"ثمة مشكلة في الترجمة."
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشكلة في العيّنات / التعليمات البرمجية"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غير ذلك"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"يسهُل فهم المحتوى."
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"ساعَدني المحتوى في حلّ مشكلتي."
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غير ذلك"
}]
هل تريد مشاركة ملاحظاتك معنا؟
{"lastModified": "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u0623\u062e\u064a\u0631: 2024-08-21 (\u062d\u0633\u0628 \u0627\u0644\u062a\u0648\u0642\u064a\u062a \u0627\u0644\u0639\u0627\u0644\u0645\u064a \u0627\u0644\u0645\u062a\u0641\u0651\u064e\u0642 \u0639\u0644\u064a\u0647)"}
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"]]