Author Topic: zoom tools with MapObjects - Need help.  (Read 5385 times)

erienas

  • phpBB Newbie
  • *
  • Posts: 5
    • View Profile
zoom tools with MapObjects - Need help.
« on: February 12, 2008, 08:32:43 PM »
i'm using Mapobject with visual basic in my project...actually i want to know if  there are any command can be used for zoom in and zoom out using command box without using toolbar.

MyGIS

  • http://www.facebook.com/groups/mygis
  • Administrator
  • phpBB Newbie
  • *****
  • Posts: 238
  • http://www.facebook.com/groups/mygis
    • View Profile
zoom tools with MapObjects - Need help.
« Reply #1 on: March 15, 2008, 04:58:29 PM »
Hi,



There are a couple of samples from www.esri.com/arcscripts, have you taken a look at them?



If I can remember properly, there are a couple of good samples in the book provided with the software. Do you have access to that book?



Thanks.

NetGIS

  • Moderator
  • phpBB Newbie
  • *****
  • Posts: 13
    • View Profile
    • http://www.google.com
zoom tools with MapObjects - Need help.
« Reply #2 on: April 22, 2008, 02:53:57 AM »
Hi there



In my experience, the alternative solutions to learn MapObjects is to refer the object model diagrams rather than "editing" exiting sample code provided.



See C:\Program Files\ESRI\MapObjects2\Samples\Diagram\Mo20Diag.pdf.



The diagram represent the type of MapObjects libaries and their relationship, and from there u can find a lot of information to program ur application



e.g of code



Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)



'Basic zoom/pan tool

If Shift = 0 Then

  If Button = 1 Then

   Set Map1.Extent = Map1.TrackRectangle

    Else

     Map1.Pan

  End If

 Else

  If Button = 1 Then

    Dim rect As New MapObjects2.Rectangle

     Set rect = Map1.Extent

     rect.ScaleRectangle (1.2)

     Set Map1.Extent = rect

   Else

     Set Map1.Extent = Map1.FullExtent

  End If

End If



End Sub

MyGIS

  • http://www.facebook.com/groups/mygis
  • Administrator
  • phpBB Newbie
  • *****
  • Posts: 238
  • http://www.facebook.com/groups/mygis
    • View Profile
zoom tools with MapObjects - Need help.
« Reply #3 on: April 22, 2008, 05:22:34 AM »
Thanks NetGIS,



Also guys when you post a question, please be specific in the question. The above post has been changed from "please help me" to zoom tools with MapObjects - Need help.