簡體   English   中英

設置當前位置標題和字幕-Google Maps SDK IOS

[英]Set Current Location Title And Subtitle - Google Maps SDK IOS

我一直在互聯網上瀏覽,並查看了google提供的有關嘗試查找有關此內容的文檔的信息。 設置當前位置標題和字幕?

我要尋找的是為當前位置“點”設置標題和副標題。 因此,當用戶點擊點/當前位置時,標題和副標題出現。

它與GMSMarker的工作方式應該非常相似。 我已經能夠在當前位置點的頂部設置一個GMSMarker,但結果並不完全相同。 如果有興趣,這是我的代碼:

//為當前位置創建標記//

 GMSMarker *CurrentLocationMarker = [[GMSMarker alloc] init];

    CLLocation *CurrentLocationNote = GoogleMaps.myLocation;

CurrentLocationMarker.position = CLLocationCoordinate2DMake(CurrentLocationNote.coordinate.latitude, CurrentLocationNote.coordinate.longitude);
CurrentLocationMarker.title = @"Current Location";
CurrentLocationMarker.snippet = CurrentLocation;
CurrentLocationMarker.map = GoogleMaps;

只是一個示例應用程序,因此一團糟

您能做您當前正在做的事情,但是將標記的圖標設置為透明圖像嗎?

目前,您可以在當前位置添加標記。 現在,在顯示完整地址的第二部分中,您可以利用google maps ios sdk中提供的reversegeocode服務, 從響應的firstresult中獲取addressline1和addressline2字段並將其附加到此標記的代碼段中

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM