Team,
I want to set the zoom to the selected shapes extent. May I know how this can be achieved?
Thanks,
Pavan
Thanks for letting me know, Sean! :-)
I was just about to investigate.
Hello Lazar,
I had posted an issue here but I think it was to do with the order in which things were happening and I seem to have solved it now.
Thanks again,
Sean
Hi, Pavan
You can find attached an HTML sample which implements zooming on a shape when that shape is clicked with the mouse (or tapped on a touch screen). It contains a separate JS file with a helper class which contains a variety of helper functions which do the tricks.
Please, note that the sample must be hosted on a web server in order to work. Review and post here if you need some information.
Cheers, Lazar
Hi, Sean
The following code shows how to create a ShapeDataSource for a pair of shape and DBF files and how to enumerate the shapes. There is code which accesses a field from the shape data and code which enumerates all the geographic points defining the shape:
I’ll post in a while a full sample answering the question above. It will show how to zoom the map on a shape when the user clicks on that shape.
I am looking to do something similar in a project I am working on.
I need some advice on a couple of steps:-
1) Is there a way to get a list of rendered shapes from a series on the map? (e.g. get a list of countries from a shape file?)
2) Would you be able to send me the sample of how to set the windowRect to match that of a given country?