[Mapbender-users] Feature info Print

Gal Zsolt zsolt.gal at satelitnt.com
Sat Oct 30 20:30:04 PDT 2021


Hello Astrid,


I missing your answer, I discover it yestarday in the user list arhive, when I looking for info about Digitizer Date picker, how to set the date format. I found that Windows default date format, on the computer I use, control the Date picker date format. Exist other possibility?

On the Feature Info print, I made some changes in mapbender.element.featureInfo.js _printContent function and I can print. I don't understand exactly what I do, but my changes work.

Original:

_printContent: function() {
var $documentNode = $('.js-content.active', this.element);
var url = $documentNode.attr('data-url');
// Always use proxy. Calling window.print on a cross-origin window is not allowed.
var proxifiedUrl = Mapbender.configuration.application.urls.proxy + '?' + $.param({url: url});
var w =window.open(proxifiedUrl, 'title', "attributes,scrollbars=yes,menubar=yes");
w.print();
},

Modified:

_printContent: function() {
var $documentNode = $('.js-content.active', this.element);
var url = $documentNode.attr('data-url');
// Always use proxy. Calling window.print on a cross-origin window is not allowed.
// console.log(url);
var proxifiedUrl = Mapbender.configuration.application.urls.proxy + '?' + $.param({url: url});
// console.log( Mapbender.configuration.application.urls.proxy )
// console.log( $.param( {url: url}) );
// var w = window.open(proxifiedUrl, 'title', "attributes,scrollbars=yes,menubar=yes");
var w =window.open(url, 'title', "attributes,scrollbars=yes,menubar=yes");
w.print();
},

See you
Zsolt



On October 25, 2021 at 10:42:54 am +03:00, Astrid Emde (WhereGroup) <astrid.emde at wheregroup.com> wrote:

> Hello GÁL,
> 
> does this problem ooccur with every WMS? It normally should work with text/html - I just tried it with Mapbender 3.2.7.
> 
> Did you try the mapbender-user WMS?
> 
> Do you get any other message?
> 
> See you Astrid
> 
> Am 2021-10-08 11:25, schrieb Gal Zsolt:
> 
> > Hello List!
> > In Layersets I set Infoformat to text/html and Print result option
> > check.
> > When I try to print I receive the next message:
> > Oops! An Error Occurred
> > The server returned a "403 Forbidden".
> > Something is broken. Please let us know what you were doing when this
> > error occurred. We will fix it as soon as possible. Sorry for any
> > inconvenience caused.
> > If Infoformat is set to text/plain the print is OK.
> > Have anybody find/know about this problem?
> > I use the text/html settings because I write my custom templates to
> > show data (Geoserver, ftl, GetFeatureInfo).
> > I will be grateful for any suggestion/solution.
> > Thank you.
> > GÁL Zsolt
> > Satelit NT
> > 0744384065
> > _______________________________________________
> > Mapbender_users mailing list
> > Mapbender_users at lists.osgeo.org
> > <https://lists.osgeo.org/mailman/listinfo/mapbender_users>
> > 
> -- 
> Mit freundlichen Grüßen
> 
> Astrid Emde
> GIS-Consultant
> 
> ---------------------------------------------
> Schon gewusst?
> In unserem Blog geben wir Tipps & Tricks zu Open-Source-GIS-Software
> und berichten aus unserem Experten-Alltag:
> <https://wheregroup.com/blog/>
> ---------------------------------------------
> Astrid Emde
> WhereGroup GmbH
> Eifelstraße 7
> 53119 Bonn
> Germany
> 
> Fon: +49(0)228 90 90 38 - 22
> Fax: +49(0)228 90 90 38 - 11
> 
> <astrid.emde at wheregroup.com>
> <http://www.wheregroup.com>
> 
> Meinen PGP Public-Key können Sie unter pgp.mit.edu herunterladen:
> <https://keys.openpgp.org/vks/v1/by-fingerprint/01F8152D36FC07C25EADDE86C5084ACC1C287CCB>
> Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
> 
> Folgen Sie der WhereGroup auf twitter:
> <http://twitter.com/WhereGroup_com>
> 
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
> -------------------------------
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20211031/264ac7c2/attachment.html>


More information about the Mapbender_users mailing list