[mapguide-users] Zoom To Selection
Paul Spencer
pagameba at gmail.com
Fri Mar 13 08:03:56 EDT 2009
Michael,
the code is there in Fusion to do this but it was never exposed as a
clickable thing in the query results, probably because we had no
compelling need for it at the time.
I've added this as an enhancement request to the fusion trac (http://trac.osgeo.org/fusion/ticket/226
)
Cheers
Paul
On 12-Mar-09, at 6:54 PM, Michael G. Byrne wrote:
> In fusion I cannot see where you can click one item in the list
> returned by the search widget and zoom to the item – you can zoom to
> a view that shows all selected items. For example if the search
> widget returns a list of properties spread through a city – how can
> you click one of the properties in the list returned and have
> mapguide zoom to that property? If there are 100 items selected
> spread through the city it is hard to see where item X in the list
> is located. May be I am missing something?
>
> Michael
>
> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org
> ] On Behalf Of Warren Medernach
> Sent: Friday, 13 March 2009 10:42 a.m.
> To: MapGuide Users Mail List
> Subject: RE: [mapguide-users] Zoom To Selection
>
> Hi Michael,
> MapGuide does have this functionality. In the Basic WebLayout, if
> you create a ‘Search’, it provides the ability to zoom to a result
> of the search. Check out the Sheboygan sample and the SheboyganAsp
> WebLayout.
>
> In the Fusion Layouts, check out the Search Widget for the same
> functionality.
> Hope this helps
>
> Warren M
>
> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org
> ] On Behalf Of Michael G. Byrne
> Sent: Thursday, March 12, 2009 2:44 PM
> To: MapGuide Users Mail List
> Subject: RE: [mapguide-users] Zoom To Selection
>
> The capability to zoom to a feature (such as by clicking a feature
> in a list of features found by a search) should be a basic
> capability of a GIS system – why doesn’t Mapguide and fusion have it
> out of the box?
>
> Michael
>
>
>
> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org
> ] On Behalf Of Nisha P
> Sent: Wednesday, 11 March 2009 11:17 p.m.
> To: MapGuide Users Mail List
> Subject: Re: [mapguide-users] Zoom To Selection
>
> Hi Padmini..
> In which file u wrote this code?or is it an in-built file?
> On Thu, Dec 18, 2008 at 3:52 PM, padmini godavarthi <godavarthi.padmini at gmail.com
> > wrote:
>
>
> Hi,
> Iam using Mapguide Opensource 2.0 (with .net 2.0 +IIS 5.1)
>
> I want to query the parcel_id and zoomed it on the map
>
> may code is
>
>
> NameValueCollection serverVars = Request.ServerVariables;
> String strServerVars = "";
> foreach (String str in serverVars.AllKeys)
> {
>
> strServerVars += "<br>" + str;
>
> }
> String platform = serverVars["SERVER_SOFTWARE"];
> String queryStr = serverVars["QUERY_STRING"];
> string queryStr1 = serverVars["Form"];
> NameValueCollection requestParams = Request.HttpMethod ==
> "POST" ?
> Request.Form : Request.QueryString;
> String sessionId = Request.QueryString["SESSION"];
> //String sessionId = Request.QueryString["SESSION"]; ;
>
> string realPath = Request.ServerVariables["APPL_PHYSICAL_PATH"];
> String configPath = realPath + "webconfig.ini";
> MapGuideApi.MgInitializeWebTier(configPath);
>
> MgUserInformation userInfo = new MgUserInformation(sessionId);
>
> MgSiteConnection siteConnection = new MgSiteConnection();
> siteConnection.Open(userInfo);
>
> MgResourceService resService =
> (MgResourceService
> )siteConnection.CreateService(MgServiceType.ResourceService);
> MgFeatureService featureService =
> (MgFeatureService
> )siteConnection.CreateService(MgServiceType.FeatureService);
>
> MgMap map = new MgMap();
> map.Open(resService, "oramap");
>
>
> MgFeatureQueryOptions nameQuery = new MgFeatureQueryOptions();
>
> //
> nameQuery
> .SetFilter(ConfigurationManager.AppSettings["FieldToFilter"] +
> "=" + Globals.gURLParam);
> nameQuery.SetFilter("PARCEL_ID" + "=" + "670_111");
> MgResourceIdentifier parcelId = new
> MgResourceIdentifier("Library://Orasample/resora.FeatureSource");
> MgFeatureReader featureReader =
> featureService.SelectFeatures(parcelId, "GEOM_TABLE", nameQuery);
>
> //Highlight the query result on the map
> MgSelection selection = new MgSelection(map);
> MgLayer layer = (MgLayer)map.GetLayers().GetItem("GEOM_TABLE");
>
>
> featureReader = featureService.SelectFeatures(parcelId,
> "GEOM_TABLE", nameQuery);
> selection.AddFeatures(layer, featureReader, 0);
> String selectXML = selection.ToXml();
> selection.Save(resService, "oramap");
> Page.ClientScript.RegisterStartupScript(Page.GetType(), "test",
> "select('" + selectXML + "');", true);
> }
>
> but i got an error at
>
> MgFeatureReader featureReader =
> featureService.SelectFeatures(parcelId,
> "GEOM_TABLE", nameQuery);
>
>
> 1)can u plz tell me what do u man by faeture class name?
> from where i will gt it?
>
> Thanks and Regards,
> Padmini.
> --
> View this message in context: http://www.nabble.com/Zoom-To-Selection-tp21070073p21070073.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
>
>
>
> --
> Nisha P
> IIITM-K
> nisha at iiitmk.ac.in
>
> Tonkin & Taylor: Celebrating 50 years in 2009
> http://www.tonkin.co.nz
> This email is only intended to be read by the named recipient. It
> may contain information that is confidential, proprietary or the
> subject of legal privilege. If you are not the intended recipient
> please notify the sender immediately and delete this email. You may
> not use any information contained in it. Legal privilege is not
> waived because you have read this email.
> _______________________________________________
> 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