コード例 #1
0
        public PublishPreUploadedMapResponse PublishPreUploadedMap(PublishPreUploadedMapRequest request)
        {
            object[] results = this.Invoke("PublishPreUploadedMap", new object[] {
                request
            });

            return((PublishPreUploadedMapResponse)(results[0]));
        }
コード例 #2
0
 /// <remarks/>
 public void PublishPreUploadedMapAsync(PublishPreUploadedMapRequest request, object userState)
 {
     if ((this.PublishPreUploadedMapOperationCompleted == null))
     {
         this.PublishPreUploadedMapOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPublishPreUploadedMapOperationCompleted);
     }
     this.InvokeAsync("PublishPreUploadedMap", new object[] {
         request
     }, this.PublishPreUploadedMapOperationCompleted, userState);
 }
コード例 #3
0
 /// <remarks/>
 public void PublishPreUploadedMapAsync(PublishPreUploadedMapRequest request)
 {
     this.PublishPreUploadedMapAsync(request, null);
 }
コード例 #4
0
        private PublishResult PublishWithPreUpload(MapInfo mapInfo)
        {
            var service = new DOMAService();
              service.Url = WebServiceUrl;

              var request = new PublishPreUploadedMapRequest
              {
            Username = Username,
            Password = Password,
            MapInfo = TranslateMapInfo(mapInfo),
              };

              try
              {
            // use partial upload
            // map image
            FileUploadResult mapFileUploadResult = null;
            if (request.MapInfo.MapImageData != null) mapFileUploadResult = PartialFileUpload(request.MapInfo.MapImageData, request.MapInfo.MapImageFileExtension);
            // blank map image
            FileUploadResult blankMapFileUploadResult = null;
            if (request.MapInfo.BlankMapImageData != null) blankMapFileUploadResult = PartialFileUpload(request.MapInfo.BlankMapImageData, request.MapInfo.MapImageFileExtension);
            // thumbnail
            FileUploadResult thumbnailFileUploadResult = null;
            var thumbnailImageData = CreateThumbnailImageData(mapInfo);
            if (thumbnailImageData != null) thumbnailFileUploadResult = PartialFileUpload(thumbnailImageData, "jpg");

            if (!(mapFileUploadResult != null && !mapFileUploadResult.Success) && !(blankMapFileUploadResult != null && !blankMapFileUploadResult.Success) && !(thumbnailFileUploadResult != null && !thumbnailFileUploadResult.Success))
            {
              if (mapFileUploadResult != null) request.PreUploadedMapImageFileName = mapFileUploadResult.FileName;
              if (blankMapFileUploadResult != null) request.PreUploadedBlankMapImageFileName = blankMapFileUploadResult.FileName;
              if (thumbnailFileUploadResult != null) request.PreUploadedThumbnailImageFileName = thumbnailFileUploadResult.FileName;
            }

            // reset image data as it already has been uploaded
            request.MapInfo.MapImageData = null;
            request.MapInfo.BlankMapImageData = null;
            var response = service.PublishPreUploadedMap(request);
            return new PublishResult
            {
              Success = response.Success,
              ErrorMessage = response.ErrorMessage,
              URL = response.URL
            };
              }
              catch (Exception ex)
              {
            return new PublishResult
            {
              Success = false,
              ErrorMessage = ex.Message
            };
              }
        }
コード例 #5
0
ファイル: Reference.cs プロジェクト: romanbdev/quickroute-gps
 /// <remarks/>
 public void PublishPreUploadedMapAsync(PublishPreUploadedMapRequest request, object userState) {
     if ((this.PublishPreUploadedMapOperationCompleted == null)) {
         this.PublishPreUploadedMapOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPublishPreUploadedMapOperationCompleted);
     }
     this.InvokeAsync("PublishPreUploadedMap", new object[] {
                 request}, this.PublishPreUploadedMapOperationCompleted, userState);
 }
コード例 #6
0
ファイル: Reference.cs プロジェクト: romanbdev/quickroute-gps
 /// <remarks/>
 public void PublishPreUploadedMapAsync(PublishPreUploadedMapRequest request) {
     this.PublishPreUploadedMapAsync(request, null);
 }
コード例 #7
0
ファイル: Reference.cs プロジェクト: romanbdev/quickroute-gps
 public PublishPreUploadedMapResponse PublishPreUploadedMap(PublishPreUploadedMapRequest request) {
     object[] results = this.Invoke("PublishPreUploadedMap", new object[] {
                 request});
     return ((PublishPreUploadedMapResponse)(results[0]));
 }