我正在创建一个iPhone应用程序,其中需要地图来确定兴趣点,但位置非常接近,当我使用下面的代码时,只出现一个标记
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled=YES;
self.view = mapView_;
//markers
//.......
GMSMarker *hotel = [[GMSMarker alloc]init];
hotel.position = CLLocationCoordinate2DMake(28.458788,-81.470522);
hotel.title = @"International Palms Hotel";
hotel.snippet=@"Phone number: 800-354-8332";
hotel.map =mapView_;
GMSMarker *ksc = [[GMSMarker alloc]init];
ksc.position = CLLocationCoordinate2DMake(28.458788,-80.6508);
ksc.title = @"Kennedy Space Center Visitor Complex";
ksc.snippet=@"Day 2 activity";
ksc.map =mapView_;
GMSMarker *bc = [[GMSMarker alloc]init];
bc.position = CLLocationCoordinate2DMake(28.458788,-81.470522);
bc.title = @"Cocoa Beach";
bc.snippet=@"Day 2";
bc.map =mapView_;
GMSMarker *bg = [[GMSMarker alloc]init];
bg.position = CLLocationCoordinate2DMake(28.458788,-81.470522);
bg.title = @"Busch Gardens";
bg.snippet=@"Day 3";
bg.map =mapView_;
GMSMarker *ww = [[GMSMarker alloc]init];
ww.position = CLLocationCoordinate2DMake(28.458788,-81.470523);
ww.title = @"“Wet and Wild” Water Park";
ww.snippet=@"Day 4";
ww.map =mapView_;
任何帮助都会非常有用
感谢
汤姆
答案 0 :(得分:1)
如果您反复点击标记,则应在标记循环时看到infowindow弹出窗口更改内容。
答案 1 :(得分:0)
您确定您的纬度/经度坐标是否正确?您的酒店,bc和bg标记具有完全相同的坐标,而ww标记仅偏离0.000001度经度。
请注意,0.000001的度数可以达到约11厘米或更低,所以你显示的点不太可能实际上是在一起吗?