Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

make a selection with x/y

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
312 Views, 9 Replies

make a selection with x/y

Is there any way to code a forced selection of and object by using a range of x/y coordinate values?
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: Anonymous

Which version of MapGuide are you using? MapGuide 6.5 or below or MapGuide
Enterprise?

Andy

wrote in message news:5267704@discussion.autodesk.com...
Is there any way to code a forced selection of and object by using a range
of x/y coordinate values?
Message 3 of 10
Anonymous
in reply to: Anonymous

I'm not totally sure at the moment because I am not at my machine...but I think 6.5
Message 4 of 10
Anonymous
in reply to: Anonymous


This could be done completely programatically, but
is a bit complicated.  Here is the basic flow:


  • Create a temporary redline rectangle based on
    your range of x/y coordiante values. 

  • Select the redline object

  • Perform a select within based on the redline
    rectangle while specifying the desired layer to select objects on

  • Delete the redline object

  • Retrieve your selected object keys or whatever
    else you need to do


--
Andy Morsell, P.E.
Spatial Integrators, Inc.

href="http://www.SpatialGIS.com">http://www.SpatialGIS.com

 

I'm not totally sure at the
moment because I am not at my machine...but I think 6.5
Message 5 of 10
Anonymous
in reply to: Anonymous

I can kind've see how to go about doing this...however when I look at the developers guide I always only see examples for .php. Is there any way to do this stricly in javascript or C# in and .aspx page from the task frame?
Message 6 of 10
Anonymous
in reply to: Anonymous

You're not using MapGuide 6.5 then, you are using MapGuide Enterprise. My
workflow still somewhat applies, but the underlying programming code will be
significantly different. You won't need to create a temporary redline
object if you already know the lat,lon coordinates you are using. In this
case, you can use the FDO API to do a spatial query against the desired
layer feature source based on an envelope you compute from your points,
create the selection set object (which will be on the server) from the
returned query results, then refresh the map with the client JavaScript API.

The developers guide only has PHP examples. I don't know if they are
planning to produce an equivelent .NET and Java guide. The downloadable
sample application from the OSGeo site at
https://mapguide.osgeo.org/servlets/ProjectDocumentList?folderID=10&expandFolder=10&folderID=36
are available in all 3 languages, however.

Andy

wrote in message news:5268748@discussion.autodesk.com...
I can kind've see how to go about doing this...however when I look at the
developers guide I always only see examples for .php. Is there any way to
do this stricly in javascript or C# in and .aspx page from the task frame?
Message 7 of 10
Anonymous
in reply to: Anonymous

Is there anyway to just set the selection using four points?
Message 8 of 10
Anonymous
in reply to: Anonymous

Pretty much what I previously described will work. You have to create a
polygon envelope based on your 4 points and then do a spatial intersection
query against your desired feature source(s).

You could also look at using the API digitizing tools to create a temporary
object and then doing a select within or buffer based on that temporary
polygon.

Andy

wrote in message news:5269177@discussion.autodesk.com...
Is there anyway to just set the selection using four points?
Message 9 of 10
Anonymous
in reply to: Anonymous

One last question is it possible to build an XML selection string in javascript so as to use in with setSelectionXML()?
Message 10 of 10
Anonymous
in reply to: Anonymous

Sure, that would probably work. But you have to know the internal FEATID's
of each feature you want to select first. Doing an FDO query may be the
only way to accomplish this.

Andy

wrote in message news:5269375@discussion.autodesk.com...
One last question is it possible to build an XML selection string in
javascript so as to use in with setSelectionXML()?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report