[mapguide-users] Select To Features & Zoom

Rahul unicorn_admirer at yahoo.com
Fri Feb 29 05:57:50 EST 2008


Hi Vishal,
               
Try this php code as provided by Ary Sucaya
 
$userInfo = new MgUserInformation($sessionId);
$siteConnection = new MgSiteConnection();
$siteConnection->Open($userInfo);
$map = new MgMap($siteConnection);
$map->Open($mapName);
$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter("$attributeName = '$attributeValue'");
$layer = $map->GetLayers()->GetItem($layerName);
$featureReader = $layer->SelectFeatures($queryOptions);
$selection = new MgSelection($map);
$selection->AddFeatures($layer, $featureReader, 0);
$selectionXml = $selection->ToXml();
echo $selectionXml;
 
execute that php code from your javascript function and add parent.parent.mapFrame.ExecuteMapAction(10); subsequently


Cheers !!
Max


----- Original Message ----
From: Vishaal <vs2k2000 at rediffmail.com>
To: mapguide-users at lists.osgeo.org
Sent: Friday, February 29, 2008 1:34:58 PM
Subject: Re: [mapguide-users] Select To Features & Zoom


Hi Max,

i too want to do the same zoom to selected parcel thing. i have a list of
records selected and now i want that if i click on a record then that record
should get zoomed into. can you share your code with me and the logic about
it....
thanks in advance..

regards,
Vishal


max_samart wrote:
> 
> Hi All,
>          I am working  on some application and what i want to do is that
> when i query and get the results in the grided format with  icon(Link) for
> the records and when i click on that link/icon  I can  zoom to that
> geometry (ZoomToView) as well as select that geometry and display the
> record in the property pane,I am able to do the zoom to view for different
> record but how can  i select the features as well as display the property
> in the property pane at the same time.Looking for some kind of
> suggestions.
> 
> Cheers 
> Max !!
> 
> 
>      
> ____________________________________________________________________________________
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search. 
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Select-To-Features---Zoom-tp14879630s16610p15752959.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


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080229/b88a8898/attachment.html


More information about the mapguide-users mailing list