[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,
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


-----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 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
>> "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
>> 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
>> up window populated with the relevant information.
>> Option 2:
>> Use the URL feature in studio to show a link.  Use expressions to
>> 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,
>> 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.
>> 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
>> studio.
>>  http://n2.nabble.com/file/n2315851/Untitled.jpg 
>> -Mark 
>> DYUTI wrote:
>>>   hi..all...
>>>             to open a new window while clicking on the points
>>> on the map where i've to write the coding...In which file i've to
>>> changes..&what change i've to make...plss help me... 
>>> thanks&regards
>>> dyuti

View this message in context:
Sent from the MapGuide Users mailing list archive at Nabble.com.

mapguide-users mailing list
mapguide-users at lists.osgeo.org

More information about the mapguide-users mailing list