[fusion-users] How to map.getSelection(). Ps.: Are you receiving my text message?

Alan Boudreault aboudreault at mapgears.com
Sat May 3 10:26:59 EDT 2008


Hi,

I don't know what your AttTable.php is returning at the moment.... but 
it will need to use the same syntax of query.php.
Example of query.php result:

{"hasSelection":true,"layers":["state-provinces-poly"],"state-provinces-poly":{"featureCount":1},"queryFile"

:"/home/pdeschamps/fgs/tmp/sess_481c3cf252f3b/query.qry"}

The last parameter is the queryFile, where all the attributes and values 
has beed saved. If your php script result is similar, your are in the 
good way. I suggest you to check a little bit the method query and 
processQueryResults of MapServer.js file. These method call the 
query.php and trigger the events MAP_SELECTION_ON if hasSelection has 
been set to true. It will be the same pattern for your widget. You can 
implement these function in your widget, and change the map _sQueryfile 
property and after trigger the MAP_SELECTION_ON event. Once your php 
script is called correctly and you trigger the event, the widget 
SelectionPanel will show automagically all feature attributes and values.

Let me know if you need more information.
I hope this will help you.

regards,
Alan

Sapucaia wrote:
> Hi Alan, thanks for the qick reply and sorry for the double post!
>
> I am using MapServer
>
> On Fri, May 2, 2008 at 10:47 PM, Alan Boudreault 
> <aboudreault at mapgears.com <mailto:aboudreault at mapgears.com>> wrote:
>
>     Hi Vitor,
>
>     First, yes.. we have received your message :)
>
>     About your question. It's always a good thing to tell us what is
>     the cartographic web software (MapGuide and MapServer) that you
>     use. Some parts of Fusion will depends of this software. Let's me
>     know what part of Fuson that you use and i will try to help you.
>
>     regards,
>     Alan
>
>
>     Sapucaia wrote:
>
>         Hi list!
>
>         I've sent this message a week ago, but I'm not sure if you
>         recieved the hole message (message body).
>         So, I am sending one more time. Please, at least reply me a
>         confirmation =]
>
>         First of all, I am Vitor Fortunato, from Brazil, and I am
>         developing an application based on Fusion as my last work for
>         graduation (monography). So I decided to bring more features
>         to Fusion.
>
>         I need some directions to use the method
>         map.getSelection(callback, layers, startcount).
>         After select some features in the map, am I able to call this
>         method and return all selected features (ids) and layers names?
>         My point is to do an Attribute Table, that persists in PostGIS.
>
>         I've started a new widget and I want to get the selected
>         features ids and layers names of each feature after select
>         some features and execute the button that call the Attribute
>         Table.
>
>         My widget is attached in this mail. Note that I am just
>         starting to use Fusion and some code may be incorrect.
>
>
>         This is the first version that look just for the active layer
>         to make the grid.
>
>         The file:
>         http://lists.osgeo.org/pipermail/fusion-users/attachments/20080427/1214aa04/AttTable-0001.js
>
>
>         Thanks in advance!
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         fusion-users mailing list
>         fusion-users at lists.osgeo.org <mailto:fusion-users at lists.osgeo.org>
>         http://lists.osgeo.org/mailman/listinfo/fusion-users
>          
>
>
>
>     -- 
>     Alan Boudreault
>     Mapgears
>     http://www.mapgears.com/
>
>


-- 
Alan Boudreault
Mapgears
http://www.mapgears.com/ 



More information about the fusion-users mailing list