[Mapbender-dev] mod_printPDF_pdf / url string matching and replacement

Samson, Marko Marko.Samson at wald-und-holz.nrw.de
Tue Apr 24 09:58:20 EDT 2007

hi devs,

I don't know for what this configuration option originally was made. I use it for our awful intranet-ländernet-testanet(different names and ips for one server etc.) scenery, with having relativ paths for our own wms's in the db and a replacement pattern like this:

$pattern =  "/cgi-bin/";
$replacement = "http://123.456.789.123/cgi-bin/"; //just an example-ip

Works fine for maps, but legend-pics urls are not replaced with the pattern. I changed it like this in mod_printPDF_pdf.php to solve the problem of missing legendpics from our wms's:

$my_wms_id = explode("___",$_REQUEST["wms_id"]);
	$my_wms_title = explode("___",$new_wms_title);
	$my_layers = explode("___",$new_layers);
	if($matching == true){
        $my_legend = str_replace($pattern,$replacement,$_REQUEST["legendurl"]);  
        $my_legend = $_REQUEST["legendurl"];
    $my_legend = explode("___",$my_legend);

If it is useful for the rest of the mapbender community I'll commit it this evening(home). What do you mean? (don't know, if the original thought of this configuration option is a totally different one!) 

Marko Samson

Marko Samson
Landesbetrieb Wald und Holz NRW
Referat I-5
Albrecht-Thaer-Straße 34
48147 Münster

Tel.: 0251/91797 - 169
Mail: marko.samson at wald-und-holz.nrw.de

More information about the Mapbender_dev mailing list