[mapguide-users] select the location on map

susan Daniel daniel.susan6 at gmail.com
Wed Apr 22 02:05:31 EDT 2009


hi deve
           I couldn't find that sample application.Any link?
regards
susan

On Tue, Apr 21, 2009 at 8:01 PM, Dave Wilson <dave.wilson at autodesk.com>wrote:

>  The sample application that does the Find Address does a selection on the
> map when you click on one of the search results. I thought this was
> discussed in the Sample Application.
>
>
>
> Dave
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Monday, April 20, 2009 12:18 AM
>
> *To:* MapGuide Users Mail List
> *Subject:* Re: [mapguide-users] select the location on map
>
>
>
> hi alll...........
>                   I read the dev guide but didn't get any idea regarding
> this.Hav anyone tried this before pls give me any hint how to start this ...
>
> thanks &regards
> susan
>
> On Fri, Apr 17, 2009 at 8:18 PM, Dave Wilson <dave.wilson at autodesk.com>
> wrote:
>
> Have you read through the developer’s guide? It has sample code for
> selection and explains many concepts. It sounds like you need to make either
> an invoke script or invoke url call from a command in your Basic or Flexible
> Web Layout. You don’t actually have to replace the gettingstarted.php. In
> the invoke script or invoke url command allows you to specify the target
> frame for the output of the script.
>
>
>
> Regards,
>
> Dave
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Friday, April 17, 2009 3:57 AM
>
>
> *To:* MapGuide Users Mail List
> *Subject:* Re: [mapguide-users] select the location on map
>
>
>
> yeah...i know that..
>
> On Fri, Apr 17, 2009 at 3:15 PM, Ivan Milicevic <
> Ivan.Milicevic at supranet.hr> wrote:
>
> Did you know how to create file that display's database table? If you don't
> know that you must find help somewhere else because I'm not a PHP guy.
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Friday, April 17, 2009 11:42 AM
>
>
> *To:* MapGuide Users Mail List
> *Subject:* Re: [mapguide-users] select the location on map
>
>
>
> Hi..
>     No i dont have the file that displays database table...Actually iam
> doing this prjct in php.but i know javascript'
>
> On Fri, Apr 17, 2009 at 3:02 PM, Ivan Milicevic <
> Ivan.Milicevic at supranet.hr> wrote:
>
> Ok, so you have file that display's data from your database table? Or you
> don't have it at all? How familiar are you with javascript?
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Friday, April 17, 2009 11:13 AM
>
>
> *To:* MapGuide Users Mail List
> *Subject:* Re: [mapguide-users] select the location on map
>
>
>
> hi...
>    My problem is that..
>    I have a database table..Having colums  place ,id etc .If i
> selected(clicking) a data in the table the corresponding place(polygon)
> should be displayed(selected) on the map...My map is a polygon map .each
> polygon having unique id.and the same id is present in the db table
> also....Now u got it?any idea please help...
>
> regards
> susan
>
> On Fri, Apr 17, 2009 at 2:24 PM, Ivan Milicevic <
> Ivan.Milicevic at supranet.hr> wrote:
>
> I'm not sure that I understand your problem. With this code you can select
> any feature on map. Can you send a little bit more information? I'm clues
> over there.
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Friday, April 17, 2009 10:47 AM
>
>
> *To:* MapGuide Users Mail List
> *Subject:* Re: [mapguide-users] select the location on map
>
>
>
> thank you  ivan...
>
>                        on which file i have to write this coding???  any
> idea??
>
> regards
> susan
>
> On Fri, Apr 17, 2009 at 2:09 PM, Ivan Milicevic <
> Ivan.Milicevic at supranet.hr> wrote:
>
> OBJEKTI is layer name and other thing is path to the feature source.
>
>
>
> "Library://SAMPLES/DATA/SEWERS/SEWERS.FeatureSource");
>
>
>
> You can copy/paste feature source from mapguide maestro in layer definition
> window.
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Friday, April 17, 2009 9:45 AM
> *To:* MapGuide Users Mail List
> *Subject:* Re: [mapguide-users] select the location on map
>
>
>
> thank you Ivan
> but  i 'd like to know on which file i want to write this coding??
> In ur coding OBJEKT1  is layer name right?then what is this
> "Library://PROJEKTI/" + TIMgisUser + "/PODACI/OBJEKTI.FeatureSource");
>
> thanks and regards
> susan
>
> On Fri, Apr 17, 2009 at 12:46 PM, Ivan Milicevic <
> Ivan.Milicevic at supranet.hr> wrote:
>
> Hello Susan,
>
>
>
> Here is C# code for selection, it's pretty same as PHP.
>
>
>
> MgSiteConnection siteConnection = null;
>
>     InitializeWebTier();
>
>
>
>     MgUserInformation userInfo = new MgUserInformation(mgSessionId);
>
>     siteConnection = new MgSiteConnection();
>
>     siteConnection.Open(userInfo);
>
>     MgResourceService resourceService = siteConnection.CreateService(
> MgServiceType.ResourceService) as MgResourceService;
>
>     MgFeatureService featureService = siteConnection.CreateService(
> MgServiceType.FeatureService) as MgFeatureService;
>
>     MgMap map = new MgMap();
>
>     map.Open(resourceService, "1"); //opening map with name „1“
>
>
>
>     MgFeatureQueryOptions queryOptionsObjekti = new MgFeatureQueryOptions
> ();
>
>     MgAgfReaderWriter geometryReaderWriter = new MgAgfReaderWriter();
>
>     MgSelection selection = new MgSelection(map);
>
>
>
>     //Defining layer and feature source
>
>     MgLayer layerObjekti = GetLayerByName(map, "OBJEKTI");
>
>     MgResourceIdentifier featureResIdObjekti = new MgResourceIdentifier(
> "Library://PROJEKTI/" + TIMgisUser + "/PODACI/OBJEKTI.FeatureSource");
>
>
>
>     //Creating feature filter, this is very important step!
>
>     string filter = "ID=" + idO;
>
>
>
>     queryOptionsObjekti.SetFilter(filter);
>
>     MgFeatureReader featureReaderObjekti = featureService.SelectFeatures(
> featureResIdObjekti, "OBJEKTI", queryOptionsObjekti);
>
>     selection.AddFeatures(layerObjekti, featureReaderObjekti, 1);
>
>     selection.Save(resourceService, "1");
>
>
>
>     StringReader stream = new StringReader(selection.ToXml());
>
>     string selectionXml = selection.ToXml();
>
>     featureReaderObjekti.Close();
>
>     map.Save();
>
>
>
>     //Here, you call javascript function and pass the selection var
>
>     Response.Write("<script>select('" + selectionXml + "');</script>");
>
>
>
> //This is javascript function that set's the selection from code and do the
> refresh.
>
> function select(xml)
>
> {
>
> parent.mapFrame.SetSelectionXML(xml);
>
> parent.mapFrame.ExecuteMapAction(10);
>
> }
>
>
>
>
>
> *From:* mapguide-users-bounces at lists.osgeo.org [mailto:
> mapguide-users-bounces at lists.osgeo.org] *On Behalf Of *susan Daniel
> *Sent:* Friday, April 17, 2009 9:11 AM
> *To:* mapguide-users at lists.osgeo.org
> *Subject:* [mapguide-users] select the location on map
>
>
>
> hi all
>         My plat form is mapguide maestro&php.I connect it with mysql.Now i
> want to select the corresponding polygon on the map while clicking on the
> data in database.In order to display the database table in the taskpane,i
> removed the contents of the file "/mapviewerphp/getting started .php" and
> wrote my codings.then how to select the polygon?.Any one know this????Anyone
> having coding to do this???
> please help me
>
>
> thanks&regards
>  susan
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> --
> thanks&regards
>  susan
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> --
> thanks&regards
>  susan
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> --
> thanks&regards
>  susan
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> --
> thanks&regards
>  susan
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> --
> thanks&regards
>  susan
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> --
> thanks&regards
>  susan
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>


-- 
thanks&regards
 susan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090422/07afe531/attachment.html


More information about the mapguide-users mailing list