PlugIns? (#2) - Problem using IMap.SetMapDisplay (#256) - Message List

Problem using IMap.SetMapDisplay

Hi,

I'm trying to center the map on an icon that I've added. I see in the IMap interface SetMapDisplay. Which looks like you can set lat, lon, rotation, etc. for the map. But nothing happens when I call it.

Is there another step I need? Also not sure what to specify for the 'mask' parameter.

I can call GetMapDisplay? and it works correctly.

Thanks,

Tree View Flat View (newer first) Flat View (older first)
  • Message #1352

    Ryan,

    There is no need to implement the IMap automation interface. This is implemented by FalconView (fvw.exe).

    It sounds like you are using C#. You can do something like the following to change the map's center (assuming latitude and longitude are doubles) using SetMapDisplay:

    fvw.IMap map = new fvw.MapClass();
    map.SetMapDisplay(latitude, longitude, 0.0, 0, 0, 0, 3 /* LAT + LON */, 0);
    
  • Message #1351

    I am having troubles with SetMapDisplay as well. I've tried implementing the IMap interface, but that makes me make my own implementation of the method. When I try fvw.IMap.SetMapDisplay(...), it says the method requires ints instead of longs like the ICD states.

    I'm a rookie. How do I use this method properly? I don't understand the ICD entry, and I've been struggling with this for hours.

    Thanks,

    --Ryan

  • Message #494

    If you are passing in 0 for mask then nothing is being set.

    The mask is a bit mask that specifies which function parameters to use. For example, if you only want to set the rotation and longitude parameters, set the mask as follows: ROTATION | LON (4 + 2). This allows you to specify a subset of parameters to SetMapDisplay.

    TypeValue
    LAT1
    LON2
    ROTATION4
    CATEGORY8
    MAP_HANDLE16
    ZOOM32
    PROJECTION64
Tree View Flat View (newer first) Flat View (older first)

Subscriptions