[Geomoose-users] How to use multiple mapbook?

Brent Fraser bfraser at geoanalytic.com
Mon Jan 16 13:44:26 EST 2012


The solution given in the wiki is a little terse.  I assume when you say 
"load only a few mapbook" you mean only a few map-sources.

Basically it suggests (for your case) you create three copies (one for 
each of your type of user) of geomoose.html and do a slight modification 
to change them into PHP scripts:

geomoose_superuser.php
geomoose_mrc.php
geomoose_user.php

When the person logs in, they would be given a link to one of the files 
above, depending on which group they belong to (you need to write the 
code to do that).

In each of the above files (mostly consisting of the original 
geomoose.html), put a little bit of PHP to set the name of the geomoose 
ini file

geomoose_superuser.php:

<?php
   session_start();
   $_SESSION['settings'] = 'superuser_settings.ini';
?>
<html>
:

geomoose_mrc.php:

<?php
   session_start();
   $_SESSION['settings'] = 'mrc_settings.ini';
?>
<html>
:

geomoose_user.php:

<?php
   session_start();
   $_SESSION['settings'] = 'user_settings.ini';
?>
<html>
:


Now create the three ini files named in the geomoose*.php files above, 
and edit them to point to three mapbook XML files.  Create the three 
mapbook XML files giving the user access to the map-sources you want 
them to see.

The new config.php file shown in the wiki will get the appropriate ini 
filename from the session variable set in the geomoose* php script.  It 
uses the ini file to look up the right mapbook XML file to send to the 
user's browser.

Best Regards,
Brent Fraser


On 1/16/2012 11:09 AM, maddqc wrote:
> Hi all,
>
> I'm working on a project that I need to use multiple mapbook.
>
> The problem is that I have tried this "solution"
> (http://geomoose.org/wiki/index.php/Modification_to_Use_Multiple_Map_Books)
> but it doesn't seem to work.
>
> Maybe I don't understand it very well...
>
> My goal is that, I have three class of users. One super user who can load
> all mapbook, one "mrc" user that can load only few mapbook and a single user
> who can only load one mapbook.
>
> I've found a place in the "config.php" where the mapbook is loaded, but i'm
> not sure if I can make a function call to check the type of user and load
> multiple mapbook from there...
>
> Can anyone help me?
>
> Thanks alot
>
> --
> View this message in context: http://geomoose-users.964460.n3.nabble.com/How-to-use-multiple-mapbook-tp3664006p3664006.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