[mapguide-users] window open

Mark Pendergraft markp at Meadgilman.com
Thu Feb 19 10:00:20 EST 2009


In VB:

Dim geom As MgGeometry
Dim query As New MgFeatureQueryOptions()
query.SetSpatialFilter("Geometry", geom,
MgFeatureSpatialOperations.Intersects)
Dim fr as MgFeatureReader = FeatService.SelectFeatures(LayerResId,
"Default:Temp", query)

Note that geom is a mggeometry object used to query the layer.  It could
be a point, polygon, etc.
LayerResId refers to the MgResourceIdentifier for a specified layer
"Default:Temp" is the layer's schema name.

In your case, you will probably want to create a MgPolygon from the
point the user clicked.  Then you will use the layer containing the
points you want to display info about to get your LayerResId and default
schema.

-Mark

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of DYUTI
Sent: Wednesday, February 18, 2009 11:32 PM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] window open


hi all.....
    any one plss tell me how to generate spatial filter. 
any suggestions will be appreciated

thanks and Regards

dyuti

DYUTI wrote:
> 
> Thank u mark ....i'll try this
> 
> regards
> dyuti
> 
> Mark Pendergraft wrote:
>> 
>> Here are 2 ways to accomplish what you are trying to do:
>> 
>> Option 1:
>> You have a widget which inherits Fusion.Tool.Canvas.
>> Use the mousedown even to get the coordinates clicked
>> Then use 
>> "var p = this.getMap().getEventPosition(e);" to get the event
position
>> "var gp = this.getMap().pixToGeo(p.x, p.y);" to get the N/E at that
>> position
>> 
>> Then send your northing and easting to a PHP page and use it to
generate
>> a spatial filter (you may want to create a mgPolygon from your N/E as
>> your spatialfilter in order to make sure you cover the point)
>> 
>> Return the selected point, and send it to another page to create your
pop
>> up window populated with the relevant information.
>> 
>> Option 2:
>> Use the URL feature in studio to show a link.  Use expressions to
pass
>> the points information into the link, and have the link directed to a
>> custom page which will populate itself with the relevant data.
>> 
>> 
>> Seeing as you are new to MapGuide, I would highly recommend option 2,
as
>> it requires very little coding and is very easy and user friendly.  I
>> have attached a photo of what the URL maptip looks like in my map.
In
>> the picture, the user hovers there mouse over a parcel and the maptip
>> pops up with a link to the parcel's page on the county's website.
All I
>> have to do is pass the parcel number in the link, which is all done
by
>> studio.
>> 
>>  http://n2.nabble.com/file/n2315851/Untitled.jpg 
>> 
>> -Mark 
>> 
>> 
>> DYUTI wrote:
>>> 
>>>   hi..all...
>>>             to open a new window while clicking on the points
displayed
>>> on the map where i've to write the coding...In which file i've to
make
>>> changes..&what change i've to make...plss help me... 
>>> 
>>> 
>>> 
>>> 
>>> thanks&regards
>>> dyuti
>>> 
>> 
>> 
> 
> 

-- 
View this message in context:
http://n2.nabble.com/window-open-tp2295629p2351717.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list