blue arrow in gmsmapview won't update whichever way i am facing - ios

I am using google map SDK 1.9.1. And i have to display blue arrow at direction which ever direction i am facing. but In new SDK i am not find any property to enable it. In old SDK it display that arrow but in new SDK it don't display that arrow
#pragma mark
#pragma mark - setup the google map
-(void) setupMap
{
GMSMapView *mapView = [[GMSMapView alloc] init];
mapView.delegate = self;
[mapView setMyLocationEnabled:YES];
[mapView.settings setCompassButton:YES];
[mapView.settings setMyLocationButton:YES];
[[self getGoogleMapView] addSubview:mapView];
}
Edited
hi after some research i found that direction is not display in ipod only but if you used google map in iphone it display direction arrow.

The reason being that was a part of sensor parameter in the Direction API which is now Deprecated in all Google Maps Display.
Read the official Google Documentation. Scroll Down to the bottom of page and you will see that.

Related

Custom myLocationButton Google maps iOS SKD

Is there one way to customize myLocationButton GoogleMaps ? I want to add my own button with a background image which make the same function as the original Google button
First your Application needs to get current location using CLLocation Manager. If you don't know how, refer to my answer here : For google maps iOS sdk, current location occasionally gets plotted at 0,0
Now for button press action, do this
- (void)locationButtonPressed
{
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:self.mapView.myLocation.coordinate.latitude
longitude:self.mapView.myLocation.coordinate.longitude
zoom:self.mapView.camera.zoom];
[self.gMapView animateToCameraPosition:camera];
}
Hope that helps.

MapBox iOS SDK - First steps

I'm having problems taking the first few steps with MapBox iOS SDK (1.4.1).
I've started with the suggested code over here: https://www.mapbox.com/mapbox-ios-sdk/examples/
- (void)viewDidLoad {
[super viewDidLoad];
self.mapBoxView.tileSource = [[RMMapboxSource alloc] initWithMapID:#"my_map_id" enablingDataOnMapView:_mapBoxView];
self.mapBoxView.userTrackingMode = RMUserTrackingModeNone;
CLLocationCoordinate2D centerLocation;
centerLocation.latitude = NRMapStartLatitude;
centerLocation.longitude = NRMapStartLongitude;
[self.mapBoxView setCenterCoordinate:centerLocation];
[self.mapBoxView setZoom:7 animated:YES];
}
No matter what I do the map starts at a location in Washington D.C. but I've set the center coordinate to be somewhere in Europe.
The same with the zoom. No matter what value I try it has no effect on the map.
There's something with the NSLog output that confuses me. At startup it says:
Using watermarked example map ID examples.map-z2effxa8. Please go to
https://mapbox.com and create your own map style.
I was assuming that this is something that I already did by registering for a free account there and starting with my first project.
Added the tilesource 'My First Map' to the container
Origin is calculated at: 120.786199, -85.000000 Map initialised. tileSource:RMMapboxSource:
Mapbox iOS Example, zooms 0-19, no interactivity, minZoom:2.000000, maxZoom:18.000000,
zoom:18.000000 at {-77.032458,38.913175}
Apparently the sample project in the iOS SDK is loaded and ignoring everything else I try to configure.
So, how do I configure the map so I can interact with the API. What am I missing?
Any kind of help is highly appreciated. Thank you!
OK, whoever is struggling with that. The trick is to set the zoom BEFORE you set the center coordinate..
..for whatever reason.

Mapbox polygons not displayed in ios 7 app

I have designed my required map on https://www.mapbox.com/editor/ with several polygons, however when I load the same map using the id on my ios 7 test app the map is displayed ok but the polygons are not visible/added in the ios app.
Here is the code I am using which is the sample code given on the mapbox site...
RMMapboxSource *tileSource = [[RMMapboxSource alloc] initWithMapID:#"ID_OF_MAPBOX_MAP"];
RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:tileSource];
[self.view addSubview:mapView];
Have tried many different changes but at this point I am trying to figure out if this is actually supported.
The API you want for this is -[RMMapboxSource initWithTileJSON:enablingDataOnMapView:]. However, only points are automatically supported right now. The relevant code is here if you are interested in submitting a patch, however.

How to display a MKMapView without street names?

I need to display a map without street names. is it possible using MKMapView ? if not, is there a different map API for iOs that supports this?
thanks,
Nimrod
What you need to do, is to set the maptype to Satellite.
Here's how to do this:
[mapView setMapType:MKMapTypeSatellite];
EDIT:
Not sure if it's satellite, but try one of these:
[mapView setMapType:MKMapTypeStandard];
[mapView setMapType:MKMapTypeHybrid];
[mapView setMapType:MKMapTypeSatellite];
Nimrod, you can't show the map view hiding the street name, only showing the Satellite view. However, check the Google Maps SDK - they just launched it and they provide a lot of thinks that the default MKMapView don't provide.
The MapBox iOS SDK will allow you to customize your map completely, including removing street names, but with MapKit-like functionality.
If you prefer, you can use the Google Maps SDK and make a custom map in this link:
http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html?utm_medium=twitter
And then use the atributes generated in this to custom your map in the app.

How to apply animations to GMSMarker

I’m changing my app by migrating iOS maps to google maps using Google Maps SDK for iOS V1.1.0 and I’m trying to animate the markers while adding/removing but I didn’t find any suggestions in the documentation related to this, Please suggest me how to perform the animations on GMSMarkers
In the GMSMarker Class Reference, it says, for the appearAnimation property:
Controls the animation used when this marker is placed on a GMSMapView (default kGMSMarkerAnimationNone, no animation).
Using the Google Maps SDK for iOS, a marker can be made like this:
GMSMarker *startMarker = [GMSMarker markerWithPosition:#"NYC"];
startMarker.appearAnimation = kGMSMarkerAnimationPop;
startMarker.title = #"Start";
startMarker.snippet = #"My address";
startMarker.map = mapView;

Resources