Re: [mapguide-users] sql filters on map load

2014-10-31 Thread GordonL
Hi,
you will have to get the Layer definition and get its XML.

Modify the XML filter property
for example:
$xmlNode-nodeValue  = ID_BLD_FLOOR=. $MYUID; 

Set the Resource as a new Layer, and add it to the map as a Session Layer:
for example:
$tempLayerResId = new MgResourceIdentifier(Session: . $mgSessionId .
//MyWalls.LayerDefinition);
$resourceService-SetResource($tempLayerResId,$byteSource-GetReader(),null); 


This is a classic application.  I have done a lot of Facilities Mapping
applications with MapGuide using this technique.  With both Oracle and SQL
Server as the data sources.  

You can store the Walls, Desks, Windows, Stairs and Carpets in separate
tables with the common columns such as FLOOR and BUILDING to filter the type
(Although sometimes I put all these in the same table).

This way you only need one map and a few layers to cover every building you
have to manage (even if you manage 1000s of buildings)

regards
Gordon






--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/sql-filters-on-map-load-tp5170576p5170685.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] sql filters on map load

2014-10-31 Thread Mark Volz (LeapCAD)
Further to Gordon's response, if you look at
http://localhost/mapguide/help/devguide/index.html (on the server that you
have installed MapGuide OS on) and go to the section called modifying maps
and layers you will see some examples and a work through of what the code
is doing.

Mark

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users