Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 6 of 6

What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

This is a discussion on What is it: ZoomIn, ZoomOut, ZoomTo or Altitude?? within the MapPoint Desktop Discussion forums, part of the Map Forums category; laguage: VC++ Hi MP-guru's I'm having problem with zoom-function. First I use zoom by giving Altitude an value when creating ...

  1. #1
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

    laguage: VC++

    Hi MP-guru's

    I'm having problem with zoom-function.
    First I use zoom by giving Altitude an value when creating a location.
    But suppose I want to see all the pushpins of a few datasetS on the map, than I have to use ZoomTo function of datasetS object. But what value do I have to give the Altitude. Because if I do nothing, the zoom goes back to the zoom of Altitude...

    It's a bit confusing to me, so I hope someone can help me.


    Thank you.

  2. #2
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

    The situation is, if I do the ZoomTo function, than normally it shows all the pushpins. But when I get a new Location, the zoom will change accoording to the Altitude that is put in the GetLocation(latitude,longitude, ALTITUDE).

    And I found out that leaving Altitude to zero '0', the map shows the globe (I don't know why, but that is how MP-api works).

    So what is overruling what, and how to solve the problem so, that I can zoom using a slidebar and ZoomTo using a button. But when I use the ZoomTo, the new location doesn't change the zoom, but stays as the ZoomTo.

    I hope I clarified a little bit of the situation here.

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

    Hi,

    I'm not sure if I understeand the question but:

    GetLocation(lat, lon, alt) just returns a Location object. It does not move or zoom the map.

    Location.Goto() Moves the map so that the location object is in center of the map. It does not zoom the map.

    MP.ActiveMap.Altitude = 1; This zooms to 1 km (or 1 mile). Set Altitude to zoom in or out, and read altitude to see the value.

    DataSet.ZoomTo() moves and zooms the map for a best view on all the pushpins in the dataset.

    ZoomIn() and ZoomOut() zooms some value in / out. You can use it if user has a button or so to zoom. To zoom exact the value you want then you better set the Altitude (see before).

    Does this answer your question ?

  4. #4
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

    Hi Wilfried,

    You understand the question perfectly well

    What I did is changing the altitude in the GetLocation(lat, lon, alt). I didn't know about Map.SetAltitude(). I've tried this out and it works very well.

    I was working on a serverapp with MP embedded in, to add a feature ZoomTo. The programmer doesn't work here anymore, but he programmed MP using a different aproach (I find it more difficult). Anyway, I want a bunch of pushpins to see on the map by using ZoomTo(). But there are, as far as I can see, 2 types of ZoomTo, one for DataSet and one for DataSets! Because I don't know how that dude programmed and where it is (even the FBI won't find it) I used the DataSets.ZoomTo() method. But actually I want to use the DataSet.ZoomTo.

    How can I get the DataSet of the standard MyPushpin set? Or how can I use the ZoomTo() for the MyPushpin set?

  5. #5
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

    Hi Wilfried,

    I solved all the problem now, it is exactly like you said. So thnx for your reply anyway! The problem was on the webclient app that did my collague!

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: What is it: ZoomIn, ZoomOut, ZoomTo or Altitude??

    Hi,

    Good that it is working

    As for your last question:

    Code:
      object o = "My Pushpins";
      MP.ActiveMap.DataSets.get_Item(ref o).ZoomTo();

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ZoomIn() gets "stuck" and does not zoom
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-22-2006, 01:54 PM
  2. ZoomIN() dosen't work on a deamon-application
    By Mika in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 09-29-2006, 09:52 AM
  3. dataSet.zoomTo()
    By chpw in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 05-17-2006, 08:05 AM
  4. ZoomTo Cropping
    By JRussell in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-27-2003, 11:47 AM
  5. Another Question much simpler (zoomto stuff)
    By Dazzer in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-24-2003, 06:18 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36