I want to get to the location with the hepl of attributes that are there in the dbf file .
Suppose the dbf file is made up of columns like ID,Location
Now if I give the ID and location as input then i my map in ajax to zoom that particular location.
Please help me with the solution.
I can give the general algorithm that you would need to follow if you know the record number in the .dbf.
- compute the record number in the .dbf - call it n
- retrieve the nth entry in the .shx index file - there are two parts: the location of the shape in the .shp and the size of the shape in the .shx
- depending on the type of shapes in the shapefile you may or may not have to read the whole shape into memory and then compute a bounding box or location in the case of points. From that you should be able to position your map accordingly.
You should probably review the shapefile format documents, the official one from ESRI
http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf and the wikipedia entry