I have implemented google map.now I have plotted some markers on map.what I want to do is, make markers visible only after a specific zoom(suppose 12 or 16).markers would be invisible from zoom 0-12 or 0-16
Asked
Active
Viewed 85 times
1 Answers
0
Implement this delegate and write marker hidden code in this method. It gets called on zooming.
position.zoom will give you zoom level; after comparing you can show marker.
- (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position;

Glorfindel
- 21,988
- 13
- 81
- 109

johny kumar
- 1,270
- 2
- 14
- 24
-
How can i compare the zoom level – Sandeep Nag Aug 26 '15 at 05:01
-
position.zoom is float value just compare it with 16 if you want zoom level 16 – johny kumar Aug 26 '15 at 05:41
-
I got what i wanted so far :) – Sandeep Nag Aug 28 '15 at 07:44
-
yes...Can you suggest me how can i drag my current location marker.because that marker comes by default.I have checked everywhere.I did not called any such marker to show current location. ****camera = [GMSCameraPosition cameraWithLatitude:latfloat longitude:longfloat zoom:17 bearing:30 viewingAngle:0];**** self.mapvw = [GMSMapView mapWithFrame:self.subView.bounds camera:camera]; [self.subView addSubview:self.mapvw]; self.mapvw.settings.myLocationButton = YES; self.mapvw.settings.indoorPicker = NO; self.mapvw.settings.compassButton=YES; self.mapvw.myLocationEnabled=YES; – Sandeep Nag Sep 02 '15 at 08:41
-
i did not get your point what you want.you just want to drag marker to particular location? – johny kumar Sep 02 '15 at 08:51
-
try this i hope you have not got what you wanted till now. http://stackoverflow.com/questions/15045687/draggable-marker-with-google-maps-sdk-for-ios – johny kumar Sep 03 '15 at 10:00
-
I have not mentioned any marker to show my current location.I jusy have zoomed my location with camera position.But by Default ,agoogle marker is placed. – Sandeep Nag Sep 05 '15 at 08:07
-
maybe you have enabled to show your current location.that will not be a marker – johny kumar Sep 05 '15 at 08:51
-
GMSPlacesClient --cannot be found. i get this error.I saw that i have this missing in my framework – Sandeep Nag Sep 07 '15 at 13:14
-
try to check path for your library and add path in linker header path in build settings – johny kumar Sep 09 '15 at 08:58
-
I found alternative way...no need of cocoapods or anything.Just called the webservice.But still a bug...like when i backspace and no text left,it crashes – Sandeep Nag Sep 09 '15 at 15:34