[Geoprisma-users] GeoPrisma and existing application

Alexandre Dube adube at mapgears.com
Mon Jan 16 09:23:03 EST 2012


Hi Gabriel,

   There is currently no easy way to accomplish that in GeoPrisma.  It 
would be possible with some modifications to the server 'core'.  Here's 
some ideas :

=== Use proxy only ===

   In GeoPrisma, there are 2 main parts : the proxy (server) and the 
templating system (auto-builds the client app).  In your case, you could 
only pick the server part.  You would only need to setup the php files 
and config and instead of using the UI auto-generation (see an index.php 
in any sample), you would only setup a proxy.php.

   In your client application, change the hosts of your layers to point 
to proxy.php and by adding "osmservice" and "osmresource" parameters.  
Using firebug, look at any layer generated url to see an example of a 
call using the proxy.

   Then, the only thing remaining would be to add/remove tools depending 
on the user rights.  You could create a small php file that would read 
the config and acl, browse them and return a JSON representing the 
rights of the currently logged user.  You'd need to look at the core php 
files to see how they work.  You would then use that JSON in your app to 
add/remove wanted/unwanted tools.

=== Create a new "box" widget ===

   This idea would focus more in using both parts : proxy and templating 
system.

   There is currently no widget in GeoPrisma that has the purpose of 
loading complete external files and treat them as widgets.  It could be 
a good idea to create one that would do the following :

  * manually list the resources needing it
  * in xslt, it would check if the resource is existant in the config 
(has the ACL rights) and execute the included code for it
  * each resource+widget could have a unique js file to include
  * it could also be unbound, i.e. could simply load source not related 
to resource (like a widget adding some static feature in the app)

   In my opinion, this would be a simpler idea than the first one.

======


   Anybody else have other ideas ?

Kind regards,

Alexandre


On 12-01-13 09:41 AM, Gabriel Vatin wrote:
> Hi,
>
> I am discovering GeoPrisma through the online examples and tutos. But 
> I can't really find examples for my case : I already have an existing 
> application using GeoExt and OpenLayers, all JavaScript based. I'd 
> like to control the access of users (visible layers, tools...), but I 
> can't find if I have to develop a brand new app with XLS, or if I can 
> directly "plug" GeoPrisma to my app...
> Thanks for your help !
>
> Gabriel
> _______________________________________________
> Geoprisma-users mailing list
> Geoprisma-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geoprisma-users


-- 
Alexandre Dubé
Mapgears
www.mapgears.com



More information about the Geoprisma-users mailing list