1

我目前正在创建一个 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_;

任何帮助都会很有帮助

谢谢

汤姆

4

2 回答 2

1

如果您反复点击标记,您应该会在标记循环时看到信息窗口弹出更改内容。

于 2013-08-27T01:51:35.337 回答
0

你确定你的纬度/经度坐标是正确的吗?您的酒店、bc 和 bg 标记具有完全相同的坐标,并且 ww 标记仅偏离经度 0.000001 度。

请注意,0.000001 度的计算结果约为 11 厘米或更小,因此您显示的点实际上不太可能靠得很近?

于 2013-08-27T01:20:35.287 回答