<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=windows-1252"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
These javascript.functions never get executed. I checked now, I added
some "alert"s  and they didn't show.<br>
<br>
susan Daniel wrote:
<blockquote
 cite="mid:9b4e8e180904240224uea89c3fn9bea4a892cf91b6b@mail.gmail.com"
 type="cite">HI..<br>
        I removed that brace but still the error is there<br>
  <br>
  <br>
regards<br>
susan<br>
  <br>
  <div class="gmail_quote">On Fri, Apr 24, 2009 at 2:35 PM, Jackie Ng <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:jumpinjackie@gmail.com">jumpinjackie@gmail.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I see an extra brace (the very first one) in the javascript block that
could<br>
be messing everything up.<br>
    <br>
- Jackie<br>
    <div>
    <div class="h5"><br>
    <br>
SusanDaniel wrote:<br>
&gt;<br>
&gt; hi all<br>
&gt;         In order to display a form in the task pane i've the
following<br>
&gt; code<br>
&gt; in "....../mapviewerphp/window.php"<br>
&gt;<br>
&gt; &lt;body&gt;<br>
&gt; &lt;script language="javascript"&gt;<br>
&gt; {<br>
&gt; function getsession()<br>
&gt; {<br>
&gt; sessionId=parent.parent.mapframe.GetSessionId();<br>
&gt; }<br>
&gt; function getmapname()<br>
&gt; {<br>
&gt; mapname=parent.parent.mapframe.GetMapName();<br>
&gt; }<br>
&gt; &lt;/script&gt;<br>
&gt;<br>
&gt;<br>
&gt; &lt;form action="selectlocation.php" method="get"&gt;<br>
&gt; Enter PanId &lt;input type="text"
name="PanId"/&gt;&lt;br&gt;&lt;br&gt;<br>
&gt;<br>
&gt; &lt;input type="hidden"name="SESSION"
value=<a class="moz-txt-link-rfc2396E" href="javascript:getsession()">"javascript:getsession()"</a>/ &gt;<br>
&gt; &lt;input type="hidden"name="MAPNAME"
value=<a class="moz-txt-link-rfc2396E" href="javascript:getmapname()">"javascript:getmapname()"</a>/  &gt;<br>
&gt; &lt;input type="submit" value="Submit" /&gt;<br>
&gt; &lt;/form&gt;<br>
&gt;<br>
&gt; *and in the selectlocation .php i am having<br>
&gt; *<br>
&gt;  &lt;/head&gt;<br>
&gt;   &lt;?php $ID= $_GET['PanId'];<br>
&gt;     ?&gt;.&lt;br /&gt;<br>
&gt;<br>
&gt;   &lt;body class="AppFrame" onLoad="OnPageLoad()"&gt;<br>
&gt;<br>
&gt;     &lt;h1 class="AppHeading"&gt;Select features&lt;/h1&gt;<br>
&gt;<br>
&gt;<br>
&gt;     &lt;?php<br>
&gt;     include '../common/common.php';<br>
&gt;<br>
&gt;     $args = ($_SERVER['REQUEST_METHOD'] == "POST")? $_POST: $_GET;<br>
&gt;     $sessionId = $args['SESSION'];<br>
&gt;     $mapName = $args['MAPNAME'];<br>
&gt;<br>
&gt;     try<br>
&gt;     {<br>
&gt;<br>
&gt;       // Initialize the Web Extensions and connect to the Server
using<br>
&gt;       // the Web Extensions session identifier stored in PHP
session<br>
&gt; state.<br>
&gt;<br>
&gt;       MgInitializeWebTier ($webconfigFilePath);<br>
&gt;<br>
&gt;       $userInfo = new MgUserInformation($sessionId);<br>
&gt;       $siteConnection = new MgSiteConnection();<br>
&gt;       $siteConnection-&gt;Open($userInfo);<br>
&gt;<br>
&gt;       $map = new MgMap($siteConnection);<br>
&gt;       $map-&gt;Open($mapName);<br>
&gt;<br>
&gt;       // Get the geometry for the boundaries of District 1<br>
&gt;<br>
&gt;       $districtQuery = new MgFeatureQueryOptions();<br>
&gt;       $districtQuery-&gt;SetFilter("pan_id==$ID");<br>
&gt;<br>
&gt;       $layer = $map-&gt;GetLayers()-&gt;GetItem('Panchayat');<br>
&gt;       $featureReader = $layer-&gt;SelectFeatures($districtQuery);<br>
&gt;       $featureReader-&gt;ReadNext();<br>
&gt;       $districtGeometryData = $featureReader-&gt;<br>
&gt;       GetGeometry('Data');<br>
&gt;<br>
&gt;       // Convert the AGF binary data to MgGeometry.<br>
&gt;<br>
&gt;       $agfReaderWriter = new MgAgfReaderWriter();<br>
&gt;       $districtGeometry =
$agfReaderWriter-&gt;Read($districtGeometryData);<br>
&gt;<br>
&gt;       // Create a filter to select the desired features. Combine<br>
&gt;       // a basic filter and a spatial filter.<br>
&gt;<br>
&gt;       $queryOptions = new MgFeatureQueryOptions();<br>
&gt;<br>
&gt;       $queryOptions-&gt;SetSpatialFilter('SHPGEOM',
$districtGeometry,<br>
&gt; MgFeatureSpatialOperations::Inside);<br>
&gt;<br>
&gt;       // Get the features from the feature source,<br>
&gt;       // turn it into a selection, then save the selection as XML.<br>
&gt;<br>
&gt;       $layer = $map-&gt;GetLayers()-&gt;GetItem(0);<br>
&gt;       $featureReader = $layer-&gt;SelectFeatures($queryOptions);<br>
&gt;<br>
&gt;       $layer = $map-&gt;GetLayers()-&gt;GetItem(0);<br>
&gt;       $selection = new MgSelection($map);<br>
&gt;       $selection-&gt;AddFeatures($layer, $featureReader, 0);<br>
&gt;       $selectionXml = $selection-&gt;ToXml();<br>
&gt;<br>
&gt;<br>
&gt;     }<br>
&gt;     catch (MgException $e)<br>
&gt;     {<br>
&gt;       echo $e-&gt;GetMessage();<br>
&gt;       echo $e-&gt;GetDetails();<br>
&gt;     }<br>
&gt;     ?&gt;<br>
&gt;<br>
&gt;   &lt;/body&gt;<br>
&gt;<br>
&gt;   &lt;script language="javascript"&gt;<br>
&gt;<br>
&gt;<br>
&gt;     function OnPageLoad()<br>
&gt;     {<br>
&gt;       selectionXml = '&lt;?php echo $selectionXml; ?&gt;';<br>
&gt;       parent.parent.SetSelectionXML(selectionXml);<br>
&gt;     }<br>
&gt;<br>
&gt;   &lt;/script&gt;<br>
&gt;<br>
&gt; &lt;/body&gt;<br>
&gt; &lt;/html&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; *This code..But when i enter the panId in the form this error is
occuring<br>
&gt; *<br>
&gt;<br>
&gt;   Invalid argument(s): [1] = <a class="moz-txt-link-rfc2396E" href="javascript:getsession()">"javascript:getsession()"</a> The session
ID is<br>
&gt; invalid because the session separator character was not
found.Invalid<br>
&gt; argument(s): [1] = <a class="moz-txt-link-rfc2396E" href="javascript:getsession()">"javascript:getsession()"</a> The session ID is
invalid<br>
&gt; because the session separator character was not found. Exception
occurred<br>
&gt; in<br>
&gt; method MgUserInformation.SetMgSessionId at line 183 in file<br>
&gt;
d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.16\mgdev\common\mapguidecommon\System/UserInformation.cpp<br>
&gt;<br>
&gt;<br>
&gt; Any mistake in my coding?????<br>
&gt;<br>
&gt; Help me plss<br>
&gt;<br>
&gt; regards<br>
&gt; susan<br>
&gt;<br>
&gt; On Wed, Apr 22, 2009 at 9:01 PM, Dave Wilson<br>
&gt; &lt;<a moz-do-not-send="true"
 href="mailto:dave.wilson@autodesk.com">dave.wilson@autodesk.com</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt;  Did you check out the samples in the downloads area of Osgeo?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="http://mapguide.osgeo.org/download/releases/2.0.x-samples"
 target="_blank">http://mapguide.osgeo.org/download/releases/2.0.x-samples</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Dave<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *Ivan Milicevic<br>
&gt;&gt; *Sent:* Wednesday, April 22, 2009 1:52 AM<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* RE: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; You can get it from some of them. Please, read descritption.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Wednesday, April 22, 2009 9:46 AM<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thank u....<br>
&gt;&gt;                Can i get the source code of any of these sample<br>
&gt;&gt; applications? If so from where?<br>
&gt;&gt;<br>
&gt;&gt; regards<br>
&gt;&gt; susan<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Apr 22, 2009 at 1:00 PM, Ivan Milicevic &lt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:Ivan.Milicevic@supranet.hr">Ivan.Milicevic@supranet.hr</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="http://mapguide.osgeo.org/livegallery.html" target="_blank">http://mapguide.osgeo.org/livegallery.html</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Wednesday, April 22, 2009 8:06 AM<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; hi deve<br>
&gt;&gt;            I couldn't find that sample application.Any link?<br>
&gt;&gt; regards<br>
&gt;&gt; susan<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Apr 21, 2009 at 8:01 PM, Dave Wilson &lt;<a
 moz-do-not-send="true" href="mailto:dave.wilson@autodesk.com">dave.wilson@autodesk.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; The sample application that does the Find Address does a
selection on the<br>
&gt;&gt; map when you click on one of the search results. I thought
this was<br>
&gt;&gt; discussed in the Sample Application.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Dave<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Monday, April 20, 2009 12:18 AM<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; hi alll...........<br>
&gt;&gt;                   I read the dev guide but didn't get any idea
regarding<br>
&gt;&gt; this.Hav anyone tried this before pls give me any hint how to
start this<br>
&gt;&gt; ...<br>
&gt;&gt;<br>
&gt;&gt; thanks &amp;regards<br>
&gt;&gt; susan<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 17, 2009 at 8:18 PM, Dave Wilson &lt;<a
 moz-do-not-send="true" href="mailto:dave.wilson@autodesk.com">dave.wilson@autodesk.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Have you read through the developer’s guide? It has sample
code for<br>
&gt;&gt; selection and explains many concepts. It sounds like you need
to make<br>
&gt;&gt; either<br>
&gt;&gt; an invoke script or invoke url call from a command in your
Basic or<br>
&gt;&gt; Flexible<br>
&gt;&gt; Web Layout. You don’t actually have to replace the
gettingstarted.php. In<br>
&gt;&gt; the invoke script or invoke url command allows you to specify
the target<br>
&gt;&gt; frame for the output of the script.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt;<br>
&gt;&gt; Dave<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Friday, April 17, 2009 3:57 AM<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; yeah...i know that..<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 17, 2009 at 3:15 PM, Ivan Milicevic &lt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:Ivan.Milicevic@supranet.hr">Ivan.Milicevic@supranet.hr</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; Did you know how to create file that display's database table?
If you<br>
&gt;&gt; don't<br>
&gt;&gt; know that you must find help somewhere else because I'm not a
PHP guy.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Friday, April 17, 2009 11:42 AM<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi..<br>
&gt;&gt;     No i dont have the file that displays database
table...Actually iam<br>
&gt;&gt; doing this prjct in php.but i know javascript'<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 17, 2009 at 3:02 PM, Ivan Milicevic &lt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:Ivan.Milicevic@supranet.hr">Ivan.Milicevic@supranet.hr</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; Ok, so you have file that display's data from your database
table? Or you<br>
&gt;&gt; don't have it at all? How familiar are you with javascript?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Friday, April 17, 2009 11:13 AM<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; hi...<br>
&gt;&gt;    My problem is that..<br>
&gt;&gt;    I have a database table..Having colums  place ,id etc .If i<br>
&gt;&gt; selected(clicking) a data in the table the corresponding
place(polygon)<br>
&gt;&gt; should be displayed(selected) on the map...My map is a polygon
map .each<br>
&gt;&gt; polygon having unique id.and the same id is present in the db
table<br>
&gt;&gt; also....Now u got it?any idea please help...<br>
&gt;&gt;<br>
&gt;&gt; regards<br>
&gt;&gt; susan<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 17, 2009 at 2:24 PM, Ivan Milicevic &lt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:Ivan.Milicevic@supranet.hr">Ivan.Milicevic@supranet.hr</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; I'm not sure that I understand your problem. With this code
you can<br>
&gt;&gt; select<br>
&gt;&gt; any feature on map. Can you send a little bit more
information? I'm clues<br>
&gt;&gt; over there.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Friday, April 17, 2009 10:47 AM<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; thank you  ivan...<br>
&gt;&gt;<br>
&gt;&gt;                        on which file i have to write this
coding???  any<br>
&gt;&gt; idea??<br>
&gt;&gt;<br>
&gt;&gt; regards<br>
&gt;&gt; susan<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 17, 2009 at 2:09 PM, Ivan Milicevic &lt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:Ivan.Milicevic@supranet.hr">Ivan.Milicevic@supranet.hr</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; OBJEKTI is layer name and other thing is path to the feature
source.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; "Library://SAMPLES/DATA/SEWERS/SEWERS.FeatureSource");<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; You can copy/paste feature source from mapguide maestro in
layer<br>
&gt;&gt; definition<br>
&gt;&gt; window.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Friday, April 17, 2009 9:45 AM<br>
&gt;&gt; *To:* MapGuide Users Mail List<br>
&gt;&gt; *Subject:* Re: [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; thank you Ivan<br>
&gt;&gt; but  i 'd like to know on which file i want to write this
coding??<br>
&gt;&gt; In ur coding OBJEKT1  is layer name right?then what is this<br>
&gt;&gt; "Library://PROJEKTI/" + TIMgisUser +
"/PODACI/OBJEKTI.FeatureSource");<br>
&gt;&gt;<br>
&gt;&gt; thanks and regards<br>
&gt;&gt; susan<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 17, 2009 at 12:46 PM, Ivan Milicevic &lt;<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:Ivan.Milicevic@supranet.hr">Ivan.Milicevic@supranet.hr</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello Susan,<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Here is C# code for selection, it's pretty same as PHP.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; MgSiteConnection siteConnection = null;<br>
&gt;&gt;<br>
&gt;&gt;     InitializeWebTier();<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     MgUserInformation userInfo = new
MgUserInformation(mgSessionId);<br>
&gt;&gt;<br>
&gt;&gt;     siteConnection = new MgSiteConnection();<br>
&gt;&gt;<br>
&gt;&gt;     siteConnection.Open(userInfo);<br>
&gt;&gt;<br>
&gt;&gt;     MgResourceService resourceService =
siteConnection.CreateService(<br>
&gt;&gt; MgServiceType.ResourceService) as MgResourceService;<br>
&gt;&gt;<br>
&gt;&gt;     MgFeatureService featureService =
siteConnection.CreateService(<br>
&gt;&gt; MgServiceType.FeatureService) as MgFeatureService;<br>
&gt;&gt;<br>
&gt;&gt;     MgMap map = new MgMap();<br>
&gt;&gt;<br>
&gt;&gt;     map.Open(resourceService, "1"); //opening map with name „1“<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     MgFeatureQueryOptions queryOptionsObjekti = new
MgFeatureQueryOptions<br>
&gt;&gt; ();<br>
&gt;&gt;<br>
&gt;&gt;     MgAgfReaderWriter geometryReaderWriter = new
MgAgfReaderWriter();<br>
&gt;&gt;<br>
&gt;&gt;     MgSelection selection = new MgSelection(map);<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     //Defining layer and feature source<br>
&gt;&gt;<br>
&gt;&gt;     MgLayer layerObjekti = GetLayerByName(map, "OBJEKTI");<br>
&gt;&gt;<br>
&gt;&gt;     MgResourceIdentifier featureResIdObjekti = new
MgResourceIdentifier(<br>
&gt;&gt; "Library://PROJEKTI/" + TIMgisUser +
"/PODACI/OBJEKTI.FeatureSource");<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     //Creating feature filter, this is very important step!<br>
&gt;&gt;<br>
&gt;&gt;     string filter = "ID=" + idO;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     queryOptionsObjekti.SetFilter(filter);<br>
&gt;&gt;<br>
&gt;&gt;     MgFeatureReader featureReaderObjekti =
featureService.SelectFeatures(<br>
&gt;&gt; featureResIdObjekti, "OBJEKTI", queryOptionsObjekti);<br>
&gt;&gt;<br>
&gt;&gt;     selection.AddFeatures(layerObjekti, featureReaderObjekti,
1);<br>
&gt;&gt;<br>
&gt;&gt;     selection.Save(resourceService, "1");<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     StringReader stream = new StringReader(selection.ToXml());<br>
&gt;&gt;<br>
&gt;&gt;     string selectionXml = selection.ToXml();<br>
&gt;&gt;<br>
&gt;&gt;     featureReaderObjekti.Close();<br>
&gt;&gt;<br>
&gt;&gt;     map.Save();<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;     //Here, you call javascript function and pass the
selection var<br>
&gt;&gt;<br>
&gt;&gt;     Response.Write("&lt;script&gt;select('" + selectionXml +
"');&lt;/script&gt;");<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; //This is javascript function that set's the selection from
code and do<br>
&gt;&gt; the<br>
&gt;&gt; refresh.<br>
&gt;&gt;<br>
&gt;&gt; function select(xml)<br>
&gt;&gt;<br>
&gt;&gt; {<br>
&gt;&gt;<br>
&gt;&gt; parent.mapFrame.SetSelectionXML(xml);<br>
&gt;&gt;<br>
&gt;&gt; parent.mapFrame.ExecuteMapAction(10);<br>
&gt;&gt;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; *From:* <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>]
*On Behalf Of *susan Daniel<br>
&gt;&gt; *Sent:* Friday, April 17, 2009 9:11 AM<br>
&gt;&gt; *To:* <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
&gt;&gt; *Subject:* [mapguide-users] select the location on map<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; hi all<br>
&gt;&gt;         My plat form is mapguide maestro&amp;php.I connect it
with mysql.Now<br>
&gt;&gt; i<br>
&gt;&gt; want to select the corresponding polygon on the map while
clicking on the<br>
&gt;&gt; data in database.In order to display the database table in the
taskpane,i<br>
&gt;&gt; removed the contents of the file "/mapviewerphp/getting
started .php" and<br>
&gt;&gt; wrote my codings.then how to select the polygon?.Any one know<br>
&gt;&gt; this????Anyone<br>
&gt;&gt; having coding to do this???<br>
&gt;&gt; please help me<br>
&gt;&gt;<br>
&gt;&gt;<br>
    </div>
    </div>
    <div class="im">&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; thanks&amp;regards<br>
&gt;&gt;  susan<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt;&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; thanks&amp;regards<br>
&gt;  susan<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; mapguide-users mailing list<br>
    </div>
    <div class="im">&gt; <a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div class="im">&gt; <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
&gt;<br>
&gt;<br>
    <br>
--<br>
    </div>
View this message in context: <a moz-do-not-send="true"
 href="http://n2.nabble.com/select-the-location-on-map-tp2649765p2691346.html"
 target="_blank">http://n2.nabble.com/select-the-location-on-map-tp2649765p2691346.html</a><br>
Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
    <br>
_______________________________________________<br>
mapguide-users mailing list<br>
    <div class="im"><a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
    </div>
    <div>
    <div class="h5"><a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
thanks&amp;regards<br>
 susan<br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>