WebMap ZoomToSelectedFeature help

May 28, 2013 at 7:24 PM
HI, I'm new using DotSpatial two years ago I used MapWindow for a desktop app, but this is my first webmap project.

I'm doing a project with .net 2010 and DotSpatial WebMap, the dll's are the same in DemoWeb, and need to do zoom to features and show thematic maps about two stadistic fields in my layer, the first trouble I have is how to do zoom to selected features, I´m trying to do a simple selection in my layer, the selection works fine, but the zoom don't.

This is my code:
   protected void cboxSelect_SelectedIndexChanged(object sender,       RadComboBoxSelectedIndexChangedEventArgs e)  {

        string cad = "[DIST_ID] = " + cboxSelect.SelectedValue;
        IFeatureLayer mapLyr = (IFeatureLayer)WebMap1.ControlMap.Layers.ElementAt(2);
        mapLyr.SelectByAttribute(cad);
        mapLyr.ZoomToSelectedFeatures();
        mapLyr.Invalidate();

        //ISelection selFeatures = mapLyr.Selection;
        //WebMap1.MapViewExtents = selFeatures.Envelope.ToExtent();
    }
as you con read, I'm trying the zoom direct from IFeatureLayer, without success, below this I try passing the selected feature's extent to the webmap extent with same result.

My second trouble is find a sample of how to do a thematic map and create simbology for each range of values.

I don't know if something is missing, but if someone can help me and show me the right way to do this I'll appreciate it

Thanks in advance to everyone

PS: sorry about my english