Esempio n. 1
0
 public string CreateMapLinkUrl(GlobalLocation location)
 {
     return(CreateMapLinkUrl(location.Latitude, location.Longitude));
 }
Esempio n. 2
0
 public string CreateMapLinkUrl(GlobalLocation location)
 {
     return CreateMapLinkUrl(location.Latitude, location.Longitude);
 }
Esempio n. 3
0
        public string GetMapsUri(string url, ref string refText)
        {
            if (!AppendSettingDialog.Instance.IsPreviewFoursquare) return null;

            var urlId = Regex.Replace(url, @"https?://(4sq|foursquare)\.com/", "");

            GlobalLocation location;
            if (CheckInUrlsVenueCollection.TryGetValue(urlId, out location))
            {
                refText = location.LocateInfo;
                return MapThumb.GetDefaultInstance().CreateStaticMapUrl(location);
            }

            FourSquareDataModel.Venue curVenue = null;
            var venueId = GetVenueId(url);
            if (string.IsNullOrEmpty(venueId)) return null;

            curVenue = GetVenueInfo(venueId);
            if (curVenue == null) return null;

            var curLocation = new GlobalLocation {Latitude = curVenue.Location.Latitude, Longitude = curVenue.Location.Longitude, LocateInfo = CreateVenueInfoText(curVenue)};
            //例外発生の場合があるため
            if (!CheckInUrlsVenueCollection.ContainsKey(urlId)) CheckInUrlsVenueCollection.Add(urlId, curLocation);
            refText = curLocation.LocateInfo;
            return MapThumb.GetDefaultInstance().CreateStaticMapUrl(curLocation);
        }
Esempio n. 4
0
 public string CreateStaticMapUrl(GlobalLocation location)
 {
     return CreateStaticMapUrl(location.Latitude, location.Longitude);
 }