Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generateExportJson follow-ups #270

Closed
5 tasks done
sashadev-sky opened this issue May 21, 2019 · 49 comments · Fixed by #286 or #314
Closed
5 tasks done

generateExportJson follow-ups #270

sashadev-sky opened this issue May 21, 2019 · 49 comments · Fixed by #286 or #314

Comments

@sashadev-sky
Copy link
Member

sashadev-sky commented May 21, 2019

follow-ups to #254 :

  • distortableCollection.avg_cm_per_pixel
  • generateExportJson pulls from distortableCollection.avg_cm_per_pixel
  • startExport ajax call that gets the url for the status.json file
  • refactor to get _getStatusJson separated from outer ajax call _runExport
  • distortableCollection.startExport(callbackFn) with basic console.log callback function to show progress every X seconds
@sashadev-sky sashadev-sky changed the title generateExportJson followups generateExportJson follow-ups May 21, 2019
This was referenced May 21, 2019
@sashadev-sky
Copy link
Member Author

@jywarren for point 3, not sure how to proceed. Is the indicator of progress that the image has been added to the json.images array that will eventually be returned?

@jywarren
Copy link
Member

I think you can just console.log the contents of status.json for now, and it doesn't have to be correlated to anything yet!

@jywarren
Copy link
Member

But, the steps of progress will be:

  1. Warping each image
  2. Compositing
  3. Tiling
  4. Zipping tiles
  5. Generating jpg

So, we can treat those each as 1/5 (or 1/(5+x)) of completion, depending on the num of images.

@sashadev-sky
Copy link
Member Author

@jywarren so this part will be in rails (aka mapknitter repo)?

@jywarren
Copy link
Member

This'll be running in one of our new exporter systems, like: http://export.mapknitter.org/export?url=https://mapknitter.org/maps/ceres--2/warpables.json&scale=30 (now operational!)

But it'll be displaying in MapKnitter eventually, yeah.

But actually since we don't /require/ any back-end now (using this cloud system) we can start by just showing status in the console (later using a Bootstrap progress bar) and doing everything client-side. Let's just ensure we have callbacks in place to save the status.json location when we eventually do integrate it with the MapKnitter rails app. Make sense?

@jywarren
Copy link
Member

So it'll be:

  1. generate request to cloud exporter URL from an image collection
  2. receive back status.json URL
  3. (eventually via callback store step 2's URL somewhere -- in the export model)
  4. keep requesting status.json every X seconds to check for updates
  5. display status each time we load a new version of status.json

How does that sound?

@sashadev-sky
Copy link
Member Author

@jywarren Ok first I can make an example of calling that link above specifically, grabbing the data from it (the status.json url), using that to make another request, and console.log the output of status.json? But to do this from our leaflet repo locally right now, we will need to enable CORs on the mapknitter export API right? @icarito

Sorry if i'm not understanding correctly

@jywarren
Copy link
Member

That's exactly right! And, for many maps it is working properly now... we've been getting some awesome big map exports out of it, like this one:

image

@sashadev-sky
Copy link
Member Author

sashadev-sky commented May 30, 2019

@jywarren

select.html:1 Access to XMLHttpRequest at 'http://export.mapknitter.org/export?url=https://mapknitter.org/maps/ceres--2/warpables.json&scale=30' from origin 'http://127.0.0.1:55062' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

So does @icarito need to set this there first? Or is there a way to get around this? This is what my request looks like:

  _startExport: function () {
    $.ajax({
      url: "http://export.mapknitter.org/export?url=https://mapknitter.org/maps/ceres--2/warpables.json&scale=30",
      crossDomain: true
    }).done(function(data) {
      console.log(data);
    });
  },

@jywarren
Copy link
Member

OK, got CORS for the storage bucket. The ID generated is usable to fetch the status.json, jpg, and tif files, and we'll add the others too. We can document later. But until i get CORS enabled for the Kubernetes cluster app, this can be a workaround:

https://storage.googleapis.com/mapknitter-exports-warps/1559178763/status.json

so then it'd be:

https://storage.googleapis.com/mapknitter-exports-warps/1559178763/1559178763.jpg

https://storage.googleapis.com/mapknitter-exports-warps/1559178763/1559178763.tif

@sashadev-sky sashadev-sky mentioned this issue May 30, 2019
5 tasks
@jywarren
Copy link
Member

@jywarren
Copy link
Member

jywarren commented May 30, 2019

You should be able to POST the .json of the collected corner coordinates (for each image) to this route: https://github.com/publiclab/mapknitter-exporter-sinatra/blob/34b13d674f9500599b5aa34ee3d0b7350af53e97/app.rb#L64-L66

Which should be, i think:

http://export.mapknitter.org/export (with generateExportJson's output as collections=[{...},{...}]&scale=30)

$.post(
  'http://export.mapknitter.org/export',
  {
    collections: distortableCollection.generateExportJson(),
    scale: 30
  }
);

@jywarren
Copy link
Member

alt:

$.ajax({
      url: "https://storage.googleapis.com/mapknitter-exports-warps/1559178763/status.json",
      crossDomain: true,
      method: 'post'
    })

@jywarren
Copy link
Member

@jywarren
Copy link
Member

OK! Adding CORS to our sinatra app... or trying... publiclab/mapknitter-exporter-sinatra#44

@jywarren
Copy link
Member

OK, we'll resolve CORS and SSL for the sinatra app... in the meantime, you can work from 2 test files that mock the exporter responses with static files.

File 1 would be the initial request (like http://export.mapknitter.org/export) and would contain the text:

/id/1559243723/status.json

(although the ID number would change... it's just a timestamp)

Once you load that file, the idea is to use the returned URL to fetch the status file itself, which will be updated periodicaly. The status file will return something in this format, though it'll change as the map processes:

{"status_url":"https://mapknitter-exports-warps.storage.googleapis.com/1559243723/status.json","status":"warping 1 of 9","tms":false,"geotiff":false,"zip":false,"jpg":false,"export_id":1559243723,"user_id":null,"size":null,"width":null,"height":null,"start_time":null,"run_time":null,"gem_version":"1.0.7","cm_per_pixel":null}

@jywarren
Copy link
Member

I'm imagining something like... getLatestStatus(), createProgressBar(container_id) and updateProgressBar(container_id, percent, status)

but you know React better than I!

@jywarren
Copy link
Member

jywarren commented Jun 4, 2019

OK! Progress! CORS is now enabled on exporter.mapknitter.org, and this works -- although ONLY from HTTP and not HTTPS:

$.get("http://export.mapknitter.org/export?url=https://mapknitter.org/maps/pvdtest/warpables.json&scale=30", {
      crossDomain: true
}).done(function(response){
  // now fetch the actual status
  getStatus("http://export.mapknitter.org" + response, console.log);
});
function getStatus(url, callback) {
  $.get(url, {
    crossDomain: true
  }).done(function(response){
    callback(response); 
  })
}

@jywarren
Copy link
Member

jywarren commented Jun 4, 2019

Next i'll work with sebastian on SSL/HTTPS, but you can run this locally already!

@sashadev-sky
Copy link
Member Author

@jywarren ok I updated locally to the above function you gave in #286 (its a little messier but I will clean it up just concerned about functionality right now), but I am pretty confused because it doesn't include _generateExportJson, and the 2nd part is just making a get request.

from it I get the output:

AJAX request 1: /id/1559692778/status.json

AJAX request 2 (using data from 1):{"status_url":null,"status":"starting","tms":false,"geotiff":false,"zip":false,"jpg":false,"export_id":1559692778,"user_id":null,"size":null,"width":null,"height":null,"start_time":"2019-06-04 23:59:38 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":null}

Is this what we want right now?

Lmk and I will clean up the function!

@jywarren
Copy link
Member

jywarren commented Jun 6, 2019 via email

@sashadev-sky
Copy link
Member Author

@jywarren I tried a bunch of different combinations and I couldn't get it to work. Would you be available tomorrow afternoon to go through it with me and get it working? Sorry for the delay!

@jywarren
Copy link
Member

jywarren commented Jun 6, 2019 via email

@sashadev-sky
Copy link
Member Author

sashadev-sky commented Jun 6, 2019

I'm getting blocked by CORs for post requests still I think @jywarren. But I know there are other things that could be wrong that make it look like thats the problem :/ Ok no problem! maybe @icarito or @rexagod can help me?

@jywarren
Copy link
Member

OK we'll look at this now!

@jywarren
Copy link
Member

jywarren commented Jun 10, 2019

Running this locally, at a non-SSL (http, not HTTPS) site, in the console, i see this succeed, code coming straight from your PR:

$.ajax({
      url:
        "http://export.mapknitter.org/export?url=https://mapknitter.org/maps/pvdtest/warpables.json&scale=30",
      crossDomain: true,
      success: function _startExport(data) {
        console.log(data);
        $.ajax("http://export.mapknitter.org" + data, {
          type: "GET",
          // data: {
          //   collections: collection,
          //   scale: 30
          // },
          crossDomain: true
        }).done(function(data) {
          console.log(data);
        });
      }, 
    });
{readyState: 1, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}

Response 1:
/id/1560201006/status.json

Response 2:
{"status_url":null,"status":"starting","tms":false,"geotiff":false,"zip":false,"jpg":false,"export_id":1560201006,"user_id":null,"size":null,"width":null,"height":null,"start_time":"2019-06-10 21:10:06 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":null}

Maybe you saw an SSL error by running it from an HTTPS site?

@jywarren
Copy link
Member

So, running this on MapKnitter, I see:

Mixed Content: The page at 'https://mapknitter.org/maps/pvdtest/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://export.mapknitter.org/export?url=https://mapknitter.org/maps/pvdtest/warpables.json&scale=30'. This request has been blocked; the content must be served over HTTPS.

@jywarren
Copy link
Member

Sorry! OK, i tried this:

collection = [{"cm_per_pixel":24.771,"created_at":"2019-04-30T20:40:21Z","deleted":false,"height":166,"history":"","id":312455,"image_content_type":"image/png","image_file_name":"test.png","image_file_size":103148,"locked":false,"map_id":13238,"nodes":[{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629578,"lat":"41.8200720823","lon":"-71.4033919887","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629579,"lat":"41.8199361572","lon":"-71.4029521064","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629580,"lat":"41.8197102811","lon":"-71.4030567126","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629581,"lat":"41.8198082274","lon":"-71.4035100059","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0}],"parent_id":null,"thumbnail":null,"updated_at":"2019-04-30T20:40:36Z","width":214,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/312455/test.png","srcmedium":"https://s3.amazonaws.com/grassrootsmapping/warpables/312455/test_medium.png"},{"cm_per_pixel":0.0,"created_at":"2019-04-30T20:40:25Z","deleted":false,"height":166,"history":"","id":312456,"image_content_type":"image/png","image_file_name":"test.png","image_file_size":103148,"locked":false,"map_id":13238,"nodes":[],"parent_id":null,"thumbnail":null,"updated_at":"2019-04-30T20:40:25Z","width":214,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/312456/test.png","srcmedium":"https://s3.amazonaws.com/grassrootsmapping/warpables/312456/test_medium.png"}];

$.ajax({
      url:
        "http://export.mapknitter.org/export",
      crossDomain: true,
      success: function _startExport(data) {
        console.log(data);
        $.ajax("http://export.mapknitter.org" + data, {
          type: "POST",
          data: {
            collections: collection,
            scale: 30
          },
          crossDomain: true
        }).done(function(data) {
          console.log(data);
        });
      }, 
    });

And this DID see a CORS error. Looking...

@jywarren
Copy link
Member

But the error is for GET http://export.mapknitter.org/export 500 (Internal Server Error) send @ jquery.js:8630 ajax @ jquery.js:8166 (anonymous) @ VM83:1

so I think it's because it errored, and we got CORS blocked on the error!

@jywarren
Copy link
Member

jywarren commented Jun 10, 2019

Realizing that we want the collections object to be singular so collection, AND that we need to add it to the initial request, not the 2nd request! So, this should work:

collection = [{"cm_per_pixel":24.771,"created_at":"2019-04-30T20:40:21Z","deleted":false,"height":166,"history":"","id":312455,"image_content_type":"image/png","image_file_name":"test.png","image_file_size":103148,"locked":false,"map_id":13238,"nodes":[{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629578,"lat":"41.8200720823","lon":"-71.4033919887","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629579,"lat":"41.8199361572","lon":"-71.4029521064","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629580,"lat":"41.8197102811","lon":"-71.4030567126","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629581,"lat":"41.8198082274","lon":"-71.4035100059","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0}],"parent_id":null,"thumbnail":null,"updated_at":"2019-04-30T20:40:36Z","width":214,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/312455/test.png","srcmedium":"https://s3.amazonaws.com/grassrootsmapping/warpables/312455/test_medium.png"},{"cm_per_pixel":0.0,"created_at":"2019-04-30T20:40:25Z","deleted":false,"height":166,"history":"","id":312456,"image_content_type":"image/png","image_file_name":"test.png","image_file_size":103148,"locked":false,"map_id":13238,"nodes":[],"parent_id":null,"thumbnail":null,"updated_at":"2019-04-30T20:40:25Z","width":214,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/312456/test.png","srcmedium":"https://s3.amazonaws.com/grassrootsmapping/warpables/312456/test_medium.png"}];

$.ajax({
      url:
        "http://export.mapknitter.org/export",
      crossDomain: true,
      type: "POST",
      data: {
        collection: collection,
        scale: 30
      },
      success: function _startExport(data) {
        console.log(data);
        $.ajax("http://export.mapknitter.org" + data, {
          type: "POST",
          crossDomain: true
        }).done(function(data) {
          console.log(data);
        });
      }, 
    });

But it doesn't... looking now....

@jywarren
Copy link
Member

https://github.com/publiclab/mapknitter-exporter-sinatra/blob/019548fbe21ba8f01ad7d219516af4d2c8c805de/app.rb#L71-L85 is where this should be receiving, but we got a 500 error... checking logs...

@jywarren
Copy link
Member

Ha! Found the error:

 textPayload:  "2019-06-10 21:34:15 - TypeError - no implicit conversion of Sinatra::IndifferentHash into String:

@jywarren
Copy link
Member

On @images_json = JSON.parse(params[:collection])

@jywarren
Copy link
Member

Aha! We needed to JSON.stringify(collection) before sending it!!!

@jywarren
Copy link
Member

Got it!!! OK, here:

collection = [{"cm_per_pixel":24.771,"created_at":"2019-04-30T20:40:21Z","deleted":false,"height":166,"history":"","id":312455,"image_content_type":"image/png","image_file_name":"test.png","image_file_size":103148,"locked":false,"map_id":13238,"nodes":[{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629578,"lat":"41.8200720823","lon":"-71.4033919887","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629579,"lat":"41.8199361572","lon":"-71.4029521064","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629580,"lat":"41.8197102811","lon":"-71.4030567126","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0},{"author":"warren","body":null,"color":"black","created_at":"2019-04-30T20:40:36Z","description":"","id":2629581,"lat":"41.8198082274","lon":"-71.4035100059","map_id":0,"name":"","order":0,"updated_at":"2019-04-30T20:40:36Z","way_id":0,"way_order":0}],"parent_id":null,"thumbnail":null,"updated_at":"2019-04-30T20:40:36Z","width":214,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/312455/test.png","srcmedium":"https://s3.amazonaws.com/grassrootsmapping/warpables/312455/test_medium.png"},{"cm_per_pixel":0.0,"created_at":"2019-04-30T20:40:25Z","deleted":false,"height":166,"history":"","id":312456,"image_content_type":"image/png","image_file_name":"test.png","image_file_size":103148,"locked":false,"map_id":13238,"nodes":[],"parent_id":null,"thumbnail":null,"updated_at":"2019-04-30T20:40:25Z","width":214,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/312456/test.png","srcmedium":"https://s3.amazonaws.com/grassrootsmapping/warpables/312456/test_medium.png"}];
$.ajax({
      url:
        "http://export.mapknitter.org/export",
      crossDomain: true,
      type: "POST",
      data: {
        collection: JSON.stringify(collection),
        scale: 30
      },
      success: function _startExport(data) {
        console.log(data);
        $.ajax("http://export.mapknitter.org" + data, {
          type: "GET",
          crossDomain: true
        }).done(function(data) {
          console.log(data);
        });
      }, 
    });

This works properly!!!

@jywarren
Copy link
Member

And if you keep running this, it'll keep updating the status:

data = "/id/1560202769/status.json"        
$.ajax("http://export.mapknitter.org" + data, {
  type: "GET",
  crossDomain: true
}).done(function(data) {
  console.log(data);
});

@jywarren
Copy link
Member

jywarren commented Jun 10, 2019

Hooray! This just returned:

{"status_url":"https://mapknitter-exports-warps.storage.googleapis.com/1560202769/status.json","status":"complete","tms":"public/tms/1560202769/","geotiff":"public/warps/1560202769/1560202769.tif","zip":"public/tms/1560202769.zip","jpg":"public/warps/1560202769/1560202769.jpg","export_id":1560202769,"user_id":null,"size":"143423B","width":"235","height":"152","start_time":"2019-06-10 21:39:29 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":30.0}

And http://export.mapknitter.org/public/warps/1560202769/1560202769.jpg redirects to https://mapknitter-exports-warps.storage.googleapis.com/1560202769/1560202769.jpg, which shows:

image

@sashadev-sky
Copy link
Member Author

@jywarren I still get a 500 internal server error for the POST request and then a message saying I am blocked by CORS. You were able to run this on my PR from LDI?

@jywarren
Copy link
Member

Hm, I was able to run it from any page that's http, not https -- you ran the entire snippet at #270 (comment) ?

The 500 could be something malformed or erroring; the error pages themselves are not cors permitted, which makes it hard to debug.

@sashadev-sky
Copy link
Member Author

sashadev-sky commented Jun 13, 2019

Post request payload:

collection: {"images":[{"id":77,"src":"http://sasha.mapknitter.org/examples/example.png","nodes":[{"lat":51.51,"lng":-0.16},{"lat":51.51,"lng":-0.2},{"lat":51.49,"lng":-0.17},{"lat":51.49,"lng":-0.21}],"cm_per_pixel":18.28125},{"id":79,"src":"http://sasha.mapknitter.org/examples/example.png","nodes":[{"lat":51.5,"lng":-0.09},{"lat":51.5,"lng":-0.13},{"lat":51.48,"lng":-0.1},{"lat":51.48,"lng":-0.14}],"cm_per_pixel":18.28125},{"id":81,"src":"http://sasha.mapknitter.org/examples/example.png","nodes":[{"lat":51.51,"lng":-0.03},{"lat":51.51,"lng":-0.07},{"lat":51.49,"lng":-0.04},{"lat":51.49,"lng":-0.08}],"cm_per_pixel":18.28125}],"avg_cm_per_pixel":18.28125}
scale: 30

@jywarren
Copy link
Member

jywarren commented Jun 13, 2019

Strangely, when I run this, I get:

$.ajax('http://export.mapknitter.org/id/1560464327/status.json').done(function(r){console.log(r)});

{"status_url":"https://mapknitter-exports-warps.storage.googleapis.com/1560464327/status.json","status":"warping 3 of 3","tms":false,"geotiff":false,"zip":false,"jpg":false,"export_id":1560464327,"user_id":null,"size":null,"width":null,"height":null,"start_time":"2019-06-13 22:18:46 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":null}

But Sasha gets something different! So strange!

@sashadev-sky
Copy link
Member Author

local working implementation

_runExport: function() {
    var collection = this._generateExportJson();
    $.ajax({
      url: "http://export.mapknitter.org/export",
      crossDomain: true,
      type: "POST",
      data: {
        collection: JSON.stringify(collection.images),
        scale: 30
      },
      success: function _getStatusJson(data) {
        console.log(data);
        $.ajax("http://export.mapknitter.org" + data, {
          type: "GET",
          crossDomain: true
        }).done(function(data) {
          console.log(data);
        });
      }
    });

Output:

/id/1560464327/status.json
{"status_url":null,"status":"starting","tms":false,"geotiff":false,"zip":false,"jpg":false,"export_id":1560464327,"user_id":null,"size":null,"width":null,"height":null,"start_time":"2019-06-13 22:18:46 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":null}

mirroring @jywarren's ajax call to show my different reply:

$.ajax('http://export.mapknitter.org/id/1560464327/status.json').done(function(r){console.log(r)});
{readyState: 1, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}

{"status_url":null,"status":"starting","tms":false,"geotiff":false,"zip":false,"jpg":false,"export_id":1560464327,"user_id":null,"size":null,"width":null,"height":null,"start_time":"2019-06-13 22:18:46 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":null}

permanently getting "status_url": null, "status": "starting" while jywarren actually gets status strings with updates

@jywarren
Copy link
Member

Even stranger, when I go directly through the Google Cloud Storage interface, i get a status.json file like this:

{"status_url":"https://mapknitter-exports-warps.storage.googleapis.com/1560464327/status.json","status":"compositing","tms":false,"geotiff":"public/warps/1560464327/1560464327.tif","zip":false,"jpg":false,"export_id":1560464327,"user_id":null,"size":null,"width":null,"height":null,"start_time":"2019-06-13 22:18:46 +0000","run_time":null,"gem_version":"1.0.7","cm_per_pixel":30.0}

@jywarren
Copy link
Member

jywarren commented Jun 13, 2019

Maybe we were getting a locally browser cached status.json file. Let's try appending a timestamp to the request like:

$.ajax('http://export.mapknitter.org/id/1560464327/status.json?' + Date.now()).done(function(r){console.log(r)});

@sashadev-sky
Copy link
Member Author

@jywarren is my next step here to open a PR to: distortableCollection.startExport(callbackFn) with basic console.log callback function to show progress every X seconds

the last PR really just grabbed that file finally, no cb to keep calling it

@jywarren
Copy link
Member

jywarren commented Jun 14, 2019 via email

@jywarren
Copy link
Member

I updated the checklist!!!

@sashadev-sky
Copy link
Member Author

@jywarren Sorry!! I have been trying to wrap up implementing svgs in #274 after I noticed that my first implementation didnt support older browsers. Will be done there tonight probably then straight back to this.

Great, we can discuss the checklist update tomorrow :)

This was referenced Jun 24, 2019
@jywarren
Copy link
Member

image

@sashadev-sky sashadev-sky mentioned this issue Jun 29, 2019
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants