how to crop (cut) a map using ArcObjects???

610
6
05-23-2010 12:29 AM
AbdulrahmanAlqasim
New Contributor
hello everyone
im new to the field of Arcobjects.
i need to create a tool for clipping (crop) a map with predefined dimensions. the user has to select only where to crop.
1- the user press button
2- rectangle is drawn over the map with specific dimension
3- the user can move the rectangle and then press OK
4- a new layer contains the cropped map is added

please guys i need a hand on this issue. at least give guide lines
thank you
0 Kudos
6 Replies
AbdulrahmanAlqasim
New Contributor
guys, any clue, hint or link is much appreciated
0 Kudos
JamesCrandall
MVP Frequent Contributor
guys, any clue, hint or link is much appreciated


What is the application type (ArcEngine, ArcServer, ArcMap)? 

I can probably give some help regarding numbers 1-3, but I don't understand what you want to do with #4 at all.
0 Kudos
AbdulrahmanAlqasim
New Contributor
hi jamesfreddyc
im using Arcmap
i want to add new layer or save the new map as a tiff file. it doesnt matter. the important thing is that i want to give the user the ability to crop the map and save it as a file.

i really appreciate ur help
thank you
0 Kudos
JamesCrandall
MVP Frequent Contributor
hi jamesfreddyc
im using Arcmap
i want to add new layer or save the new map as a tiff file. it doesnt matter. the important thing is that i want to give the user the ability to crop the map and save it as a file.

i really appreciate ur help
thank you


I have not attempted to implement this functionality, but here's a sample from ArcGIS v9.0 that would probably work for you...

http://edndoc.esri.com/arcobjects/9.2/CPP_VB6_VBA_VCPP_Doc/COM_Samples_Docs/Cartography/Printing_and...
0 Kudos
AlexanderGray
Occasional Contributor III
Putting a map object inside a layer object is not really possible (for a number of reasons.)  I suggest you look at the IExport interface.  There is a sample on how to create a jpeg from activeView (a lot of the same methods would be required for tiff.)  There are methods for specifying the rectangle (extent) of the active view.
0 Kudos
AbdulrahmanAlqasim
New Contributor
jamesfreddyc thank you for the link.. i will try it


agray1: yes u r right, but i mean to add tiff image as layer ( not map)  . sorry im still beginner
0 Kudos