geomoose / gm3

GeoMoose 3.0 Development. Please submit pull requests to the 'main' branch.
https://www.geomoose.org
MIT License
58 stars 59 forks source link

Printing Enhancements #327

Open klassenjs opened 5 years ago

klassenjs commented 5 years ago

1) Print to a specified scale 2) Print legends 3) Print compass rose 4) Print attribution (ex. for OpenStreetMaps)

tchaddad commented 5 years ago

+1 for adding back the printing of legends

christian4423 commented 5 years ago

Maybe add crossOrigin default to Anonymous for printing.

In OL in image.js the code

  this.image_ = new Image();
  if (crossOrigin !== null) {
    this.image_.crossOrigin = crossOrigin;
  }

When printing I get a canvas tainted error. I could not find in the gm3 code where you all call to ol/image.js to pass it the anon value.

I changed the ol code to

  this.image_ = new Image();
  if (crossOrigin !== null) {
    this.image_.crossOrigin = crossOrigin;
  }else{
    this.image_.crossOrigin = "Anonymous";
  }

for the meantime but it would be nice if gm3 did that out of the box.