[mapguide-users] Select To Features & Zoom

Vishaal vs2k2000 at rediffmail.com
Fri Feb 29 07:11:41 EST 2008


Hey Max,

thanks for the code and the prompt reply. i am developing the solution using
MGOS1.2 and Visual Studio2005. i have already made a selection tool.i get a
list of selected features in a new panel on the right hand side. now what i
want is, there should be a link for each and every feature selected so that
if i click on a feature then that particular feature should get zoomed and
selected in the map and the related information should get displayed in the
left properties pane. hope this clears my point.

any help will be highly appreciated.

regards,
vishal



max_samart wrote:
> 
> 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
> _______________________________________________
> 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-tp14879630s16610p15757238.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list