PROBLEM

Legend is truncated in MapCafe client when using ArcView IMS and ArcIMS middleware

Last Published: April 25, 2020

Description

The MapCafe legend image does not allow the client to scroll to the bottom of the legend image. The legend image is truncated, it is missing classification information.

Cause

This is a known problem in MapCafe build z19.

Solution or Workaround



  1. Load the ArcIMS 3.x extension for Arcview 3.x.
  2. Open the AVINETMP.LegendInfoGenerator script in a script window.
  3. Find the following section of code:

    Code:

    for each t in theThemes
    thmName = t.GetName
    LExt = t.ReturnLegendExt(theDpy,TOCSym,true)
    LY = LExt.GetY + 0.125
    LX = LExt.GetX + 0.0625

    '**************************************************
    '* ThemeHeights is a structure that gets passed *
    '* to MapCafe during initialization, it contains *
    '* information necessary for MapCafe to draw the *
    '* legend, place checkboxes, and know whether a *
    '* theme is initially to be made visible *
    '* and searchable. *
    '**************************************************
    '0:ThemeName 1:Visibility 2:XOrigin, 3:YOrigin 4:Width 5:Height 6:Active
    themeDetails ={thmName.Clone,t.IsVisible,0,(originY*ymod).Ceiling,((LX*xmod)).Ceiling,(LY*ymod).Ceiling,t.IsActive}

    '7:Type

  4. Change this section of code to:

    Code:

    tlast = 1
    tcount = theThemes.count

    for each t in theThemes
    thmName = t.GetName
    LExt = t.ReturnLegendExt(theDpy,TOCSym,true)
    LY = LExt.GetY + 0.125
    LX = LExt.GetX + 0.0625

    '**************************************************
    '* ThemeHeights is a structure that gets passed *
    '* to MapCafe during initialization, it contains *
    '* information necessary for MapCafe to draw the *
    '* legend, place checkboxes, and know whether a *
    '* theme is initially to be made visible *
    '* and searchable. *
    '**************************************************
    '0:ThemeName 1:Visibility 2:XOrigin, 3:YOrigin 4:Width 5:Height 6:Active
    if (tcount = tlast) then
    themeDetails ={thmName.Clone,t.IsVisible,0,(originY*ymod).Ceiling,((LX*xmod)).Ceiling,((LY + 3.5)*ymod).Ceiling,t.IsActive}
    else
    themeDetails ={thmName.Clone,t.IsVisible,0,(originY*ymod).Ceiling,((LX*xmod)).Ceiling,(LY*ymod).Ceiling,t.IsActive}
    end
    tlast = tlast + 1

    '7:Type

  5. Adjust the length of the legend image by adjusting the value added to the LY variable. The value represents inches according to the display settings for the Arcview server session.
  6. Compile the AVINETMP.LegendInfoGenerator script. The changes should be immediately recognized by all MapCafe clients accessing served views in the current Arcview session.

Article ID:000004537

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic