-1
http://kailun92wcf.cloudapp.net/Service1.svc에서 wcf 서비스를 얻을 수 있었지만 사용하려면 xCoord와 yCoord를 가져와야합니다. 나는 이름을 얻는 것을 처리하고 그러나 wcf 서비스에서 xCoord와 yCoord를 불러내는에 붙어있다.좌표를 wcf 서비스에서 가져옵니다
private void polyc_Checked(object sender, RoutedEventArgs e)
{
var service = new Service1Client();
service.getRecommendPlaceAsync(new getRecommendPlaceRequest { activityId = 2 });
service.getRecommendPlaceCompleted += new EventHandler<MyCloudService.getRecommendPlaceCompletedEventArgs>(RecommendedPlaceRequestComplete);
}
void RecommendedPlaceRequestComplete(object sender, MyCloudService.getRecommendPlaceCompletedEventArgs e)
{
if (e.Error == null)
{
var result = String.Join(",", (from place in e.Result.getRecommendPlaceResult select place.Name).ToArray());
MessageBox.Show(result);
}
else
{
MessageBox.Show("An error occured: " + e.Error.Message);
}
GraphicsLayer graphicsLayer = map.Layers["polyCoords"] as GraphicsLayer;
foreach (Classes.Places location in data)
{
MapPoint point = new MapPoint(Convert.ToDouble(location.XCoord), Convert.ToDouble(location.YCoord));
mcp.Add(location);
ESRI.ArcGIS.Client.Graphic graphic = new ESRI.ArcGIS.Client.Graphic() { Geometry = point, Symbol = PolyMarkerSymbol };
graphicsLayer.Graphics.Add(graphic);
}
}
진심으로 감사 목록의 요소에서 모든 속성을 얻을 수있는 장소의 목록을 가진 단지 더 나은 =) – NoobieNeedHelp