VDS Technologies

 

Zooming (again)

7/21/2015 5:39:30 AM
Total Posts 19

Zooming (again)

Getting to grips with this now...Currently I use the (example driven)
Dim xx As ActualMap.Recordset = Map1.Identify(e.InfoPoint, 5)
to zoom in to my map when I click on it which works a treat.

I now also need to zoom in initially to a known index field in the shape file without knowing the infopoint.How do I get hold of the infopoint x&y from the shape file in this instance?

Thanks for any help

Dave

7/21/2015 6:23:43 AM
MVP
Total Posts 323

Re: Zooming (again)

There is the ParcelMap sample in the standard sample, it demonstrates how to search by a field value in the layer and zoom into the found feature.

dim layer as Layer = map("shapefilename")

dim rs as Recordset = layer.SearchExpression("FIELDNAME = """ & fieldvalue & """")

if Not rs.EOF then

  map.Extent = rs.RecordExtent

  ' or map.ZoomScale(rs.Shape.Centroid, 100000)

end if