[Geomoose-users] Re: Refresh Mapbook

Dan Little danlittle at yahoo.com
Tue Oct 25 09:19:50 EDT 2011


No, the mapbook should not be dynamic.  It's a configuration file and there are plenty of options in the runtime environment to perform dynamic operations.

I still really don't know what you're trying to do.  But assuming you have two known PHP scripts, and you're trying to share data between them, and assuming you're using GeoMOOSE 2.2/2.4 the following should work.  I haven't debugged or tested any of this code.  I just started typing and copied some of the code from the demo.  

In the mapbook:

<service name="service_a" title="Service A">
 <url>myphp/service_a.php</url>
 <input type="user" name="input_a" title="An input from the user:"/>
</service>

<service name="service_b" title="Service B">
 <url>myphp/service_b.php</url>
 <input type="hidden" name="input_b"/> <!-- hidden input that will be set to input_a -->
</service>

Later in the catalog:
<tool name="call_service_a" title="Service A" type="service" service="service_a" selectable="false"/>

The PHP:

myphp/service_a.php
<?php
header('Content-type: text/xml');

print "<results>";
print "<html><![CDATA[";
print "<a href=\"javascript:GeoMOOSE.startService('service_b', {input_b: '". $_GET['input_a']."']})\">Show Service B</a>";print "]]></html></results>";
?>

myphp/service_b.php

<?php
header('Content-type: text/xml');
print "<results>";
print "<html><![CDATA[";
print $_GET['input_b'];
print "]]></html></results>";
?>



>________________________________
>From: gayani <gayani.edirisinghe at gmail.com>
>To: geomoose-users at lists.osgeo.org
>Sent: Monday, October 24, 2011 10:10 PM
>Subject: [Geomoose-users] Re: Refresh Mapbook
>
>Hi,
>Can't we do it dynamic.
>
>I need to pass a variable from one php file to another PHP file through map
>service. That's why I an tring to make dynamic the Mapbook.
>
>Please help me to solve this problem.  (pass the variable within two PHP
>files)
>
>Thanks
>Gayani
>
>--
>View this message in context: http://geomoose-users.964460.n3.nabble.com/Refresh-Mapbook-tp3450108p3450274.html
>Sent from the Geomoose-users mailing list archive at Nabble.com.
>_______________________________________________
>Geomoose-users mailing list
>Geomoose-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
>
>


More information about the Geomoose-users mailing list