Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
titleDynamic map engine configuration
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0"
	xmlns:wms="urn:com.cohga.server.map.wms#1.0"
	xmlns:dynamic="urn:com.cohga.server.map.dynamic#1.0">

	<wms:mapengine id="wms1">
		<url>http://server1.local/wms</url>
		<!-- other WMS configuration items -->
	</wms:mapengine>
	<wms:mapengine id="wms2">
		<url>http://server2.local/wms</url>
		<!-- other WMS configuration items -->
	</wms:mapengine>

	<!-- will redirect all requests 'redirect' to 'wms1' -->
	<dynamic:mapengine id="redirect">
		<mapengine>wms1</mapengine>
	</dynamic:mapengine>

	<!-- will cycle requests for 'loadbalanced' between 'wms1' and 'wms2' -->
    <!-- you can list as many map engines as you need but they must all be configured identically -->
	<dynamic:mapengine id="loadbalanced">
		<mapengine>wms1</mapengine>
		<mapengine>wms2</mapengine>
	</dynamic:mapengine>

	<!-- will send requests for 'failover' to 'wms1' until that falls over, in which case it'll use 'wms2' -->
    <!-- you can list as many map engines as you need but they must all be configured identically -->
	<dynamic:mapengine id="failover">
		<failover>true</failover>
		<mapengine>wms1</mapengine>
		<mapengine>wms2</mapengine>
	</dynamic:mapengine>

	<!-- will send requests for 'alternate' to 'wms1' unless the user turns on an aerial photo layer, in which case it will use 'wms2' -->
    <!-- you can only list two map engines -->
    <!-- Only available since 2.5.16 -->
	<dynamic:mapengine id="alternate">
		<altlayers>aerial_photo_2001,aerial_photo_2008,aerial_photo_2015</altlayers>
		<mapengine>wms1</mapengine>
		<mapengine>wms2</mapengine>
	</dynamic:mapengine>

</config>

In the above example any configuration item that previously references wms1 or wms2 would now reference redirect, loadbalanced, failover or failover alternate and operate the same as before with the benefits of the particular function configured. Plus, dynamic map engines can also reference other dynamic map engines, so you can combine load balancing or and fail over, for example.