Select to view content in your preferred language

Zoom the map to a line

2789
2
Jump to solution
11-25-2014 03:23 AM
HaniDraidi
Frequent Contributor

Is there a way to zoom mapview to a line as is the case with the point? For example, when I want to zoom the map to a point I use: MapView.zoomTo(centerPt, factor), is it possible to do this with a line?

0 Kudos
1 Solution

Accepted Solutions
EricBader
Honored Contributor

You can try setExtent on the MapView and pass in the Polyine Geometry itself. That might work the same.

I hope this is helpful.

View solution in original post

0 Kudos
2 Replies
EricBader
Honored Contributor

You can try setExtent on the MapView and pass in the Polyine Geometry itself. That might work the same.

I hope this is helpful.

0 Kudos
HaniDraidi
Frequent Contributor

You are right!

Many thanks Eric

0 Kudos