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

Astrid Emde (WhereGroup) astrid.emde at wheregroup.com
Wed Apr 25 02:51:56 EDT 2007


Hi Marco,

the changes you suggest make sense. So it would be nice if you could 
commit them.

Grüße aus Bonn Astrid


Samson, Marko schrieb:
> 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"]);  
>     }
>     else{
>         $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!) 
>
>
>
> Gruß,
> Marko Samson
>
>
> Marko Samson
> Landesbetrieb Wald und Holz NRW
> GIS-Anwendungsentwicklung
> Referat I-5
> Albrecht-Thaer-Straße 34
> 48147 Münster
>
> Tel.: 0251/91797 - 169
> Mail: marko.samson at wald-und-holz.nrw.de
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>   



More information about the Mapbender_dev mailing list