public IPoi PoiDetail(UInt64 id, int geotableId) { //百度地图LBS云存储APIv3.0接口说明文档.doc //geotable_id 表主键 int32 必须 page 33 ? string paraUrlCoded = "ak=" + _ak + "&geotable_id=" + geotableId + "&id=" + id; if (!string.IsNullOrEmpty(_sn)) { paraUrlCoded += ("&sn=" + _sn); } string getData = "?" + paraUrlCoded; HttpWebResponse response = GetResponse( method: LBSYunNetSDKMethods.GET.ToString(), entity: LBSYunNetSDKEntitys.poi.ToString(), operation: LBSYunNetSDKOperations.detail.ToString(), getData: getData ); Stream s = response.GetResponseStream(); StreamReader sr = new StreamReader(s); string json = sr.ReadToEnd(); JavaScriptSerializer jss = new JavaScriptSerializer(); IPoi re = jss.Deserialize <IPoi>(json); return(re); }
public IPoi PoiList(string geotableId, UInt32 pageIndex = 0, UInt32 pageSize = 10, Hashtable indexKeyValue = null, string title = null, string bounds = null, string tags = null) { string paraUrlCoded = "ak=" + _ak + "&geotable_id=" + geotableId + "&page_index=" + pageIndex + "&page_size=" + pageSize; if (!string.IsNullOrEmpty(title)) { paraUrlCoded += ("&title=" + title); } if (!string.IsNullOrEmpty(bounds)) { paraUrlCoded += ("&bounds=" + bounds); } if (!string.IsNullOrEmpty(tags)) { paraUrlCoded += ("&tags=" + tags); } if (!string.IsNullOrEmpty(_sn)) { paraUrlCoded += ("&sn=" + _sn); } if (indexKeyValue != null) { foreach (DictionaryEntry kv in indexKeyValue) { paraUrlCoded += ("&" + kv.Key + "=" + kv.Value); } } string getData = "?" + paraUrlCoded; HttpWebResponse response = GetResponse( method: LBSYunNetSDKMethods.GET.ToString(), entity: LBSYunNetSDKEntitys.poi.ToString(), operation: LBSYunNetSDKOperations.list.ToString(), getData: getData ); Stream s = response.GetResponseStream(); StreamReader sr = new StreamReader(s); string json = sr.ReadToEnd(); //return json; JavaScriptSerializer jss = new JavaScriptSerializer(); IPoi re = jss.Deserialize <IPoi>(json); return(re); }
public void DeletePoi(IPoi poi) { m_PoiRepository.Delete(poi as Poi); }
public IPoi UpdatePoi(IPoi poi) { poi.ModifiedDate = DateTime.Now; return(m_PoiRepository.Update(poi as Poi)); }
public IPoi CreatePoi(IPoi poi) { poi.AddedDate = DateTime.Now; poi.ModifiedDate = DateTime.Now; return(m_PoiRepository.Add(poi as Poi)); }