[mapserver-users] Same database connection across multiple layers

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Fri May 13 06:18:23 PDT 2022


Hi,

Write the connection into a separate file that you can INCLUDE into the main mapfile  https://mapserver.org/mapfile/include.html

-Jukka Rahkonen-

Lähettäjä: MapServer-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Atlanta Geek
Lähetetty: perjantai 13. toukokuuta 2022 16.14
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] Same database connection across multiple layers

Is there a way to set the db connection only once for multiple layers.
We have a very dynamic mapfile with lots of layers and its a pain to replace the db name when doing development or changing for a customer.  We are running ms4w as well.


In addition to this is it possible to set the connection string outside the mapfile.  Maybe as an option to the cgi script or something.

--
http://www.atlantageek.com<https://eur06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.atlantageek.com%2F&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C9c9b664d51004234f5fa08da34e28af7%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C637880444874534938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000%7C%7C%7C&sdata=N77AlRW2f8obLulE5KT0Mapk5WThpVI6KTMW9U%2FNKOM%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220513/0ebbb42c/attachment.htm>


More information about the MapServer-users mailing list