简体   繁体   中英

Google Maps iOS SDK, Getting Current Location of user

I have used GoogleMapKit in order to show user's current location. According to my code http://pastie.org/10908950 its working fine but currently its showing blue dot for current location. What i need now to display current location with the pink icon as shown in the image as well as the image should be static in the centre of the map while it shows current location whenever a location is chosen from the list of the search engine. Just like in image below-

[ image2 [2]

How to display that list of places in alphabetically order? And if a place is selected from that list it catches the value and the pink location is shown above that place.

图片1 .

I know the query is lengthy but i know i can use some great help from here. Thanks in advance.

By using Google Maps SDK, solution can be achieved easily:

GMSMarker *marker = [[GMSMarker alloc] init];
marker = [GMSMarker markerWithPosition:position]; 
marker.icon = [GMSMarker markerImageWithColor:[UIColor blackColor]];
marker.icon = [UIImage imageNamed:@"house"];

You can change colour and image based on your requirement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM