[mapserver-users] Random acts of display...

Chad Streck chads at adci.com
Thu Apr 19 09:49:18 EDT 2001


Hopefully this will be my last issue for a while.  Everyone has been 
great in helping keep this project going.

I have 2 issues that seem rather random.  One happens on both NT and 
Linux, and the other happens only on NT.  The system is php_mapscript 
with php_proj.  The Linux system is running Apache/php4.0.4pl1/Postgres 
and the NT system is running IIS/php4.0.4pl1/MSSQL7 (actually MSDE).

1) I have roughly 11 layers in my mapfile and when the script runs, I 
populate 4 of the layers with points from an SQL table, 1 layer gets one 
point to highlight if the user has clicked on one of the previous 
points, and 1 layer gets a copyright notice.  They are populated in that 
order, and all other layers are county, highway, roads, hydro area and 
imagery.  The highlight layer displays a triangle with the company name 
next to it, and this is the layer that concerns me.  I have an addpoint 
function that plots the point, with annotation/name if its included, and 
then it does a drawLabelCache.  The problem that exists is that it tends 
to only render the name when it feels like it.  I can keep clicking on a 
point and it always renders the triangle, but only about 25%-50% of the 
time it renders the name.  I can add and test add point with all static 
values for x, y, and name, and it works all the time.  Finally, I do a 
drawLabelCache before I saveWebImage on the map file.  Very frustrating 
and I'm unsure where to look.  My only theory right now is that by 
running on smaller machines (333 and a 266) that they tend to drop 
things in an effort to speed up processing, but thats only a theory.  
(Programmers LOVE theory.)

2) On the NT port, I have the exact same application running, but it 
seems that about 50% of the time, no dots on the first 4 generated 
layers don't show.  Most times I get no errors, and if I do get 
warnings, they are divide by 0 warnings.  When looking at the what it is 
dividing by, the statment is a divide by extent->maxx - extent->minx.   
I have the same theory as above.

Any help or hints would be appreciated.  I attached my mapfile if it 
will help.

Thanks,
Chad Streck
-------------- next part --------------
map
  extent 263354 548123 967555 1108974
  fontset "C:\InetPub\wwwroot\maps\etc\fontsw.list"
  name "Maricopa County"
  scale 6000000
  shapepath "C:\InetPub\shape"
  size 600 400
  symbolset "C:\InetPub\wwwroot\maps\etc\symbol.sym"
  units feet

  projection
    "proj=tmerc"
    "ellps=GRS80"
    "units=ft"
    "lon_0=-111.916666667"
    "lat_0=31.000000000"
    "x_0=213360.000"
    "y_0=0.000000"
    "k=0.999900"
    "no_defs"
  end

  web
    imagepath "C:\InetPub\wwwroot\tmp\"
    imageurl "/tmp/"
    template "template/test.html"
  end
  legend
    status on
    label
      antialias
      color 0 0 0
      font "helv"
      size 12
      type truetype
    end
  end
  scalebar
    color 0 0 0
    intervals 4
    outlinecolor 0 0 0
    size 200 2
    status on
    units miles
    label
      antialias
      color 0 0 0
      size small
    end
  end
  layer
    data "etak\az\county"
  #  labelitem "feaname"
  #  minscale 75000
    name "County"
    status default
    type polygon
    class
      color 225 225 225
      outlinecolor 150 150 150
      label
        antialias
        buffer 3
        color 150 150 150
        font "helv"
        mindistance 100
        minfeaturesize 90
        outlinecolor 255 255 255
        position cc
        size 10
        type TRUETYPE
      end
    end
  end
 # layer
 #   data "etak\az\county"
 #   maxscale 75000
 #   minscale 0
 #   name "County"
 #   status default
 #   type polygon
 #   class
 #     color 225 225 225
 #     outlinecolor 150 150 150
 #   end
 # end
 # layer
 #   data "imagery\hires"
 #   minscale 25001
 #   name "Hires_Coverage"
 #   status default
 #   type polygon
 #   class
 #     color 128 255 128
 #   end
 # end
  layer
    maxscale 49000
    minscale 0
    name "Hi-Res_Imagery"
    status default
    tileindex "imagery\hires"
    tileitem "location"
    type raster
    class
    end
  end
  layer
    data "etak\az\hydro_a"
    name "major_water"
    status default
    type polygon
    class
      color 128 128 255
    end
  end
 # layer
 #   data "etak\az\hydro_l"
 #   maxscale 250000
 #   minscale 0
 #   name "minor_water"
 #   status default
 #   type line
 #   class
 #     color 128 128 255
 #   end
 # end
  layer
    data "etak\az\roads"
    labelitem "feaname"
    maxscale 5000
    minscale 0
    name "roads"
    status default
    type line
    class
      color 255 255 255
      label
        antialias
        color 255 255 255
        font "helv"
        mindistance 100
        minfeaturesize 100
        size 6
        type truetype
      end
    end
  end
  layer
    data "etak\az\hwy"
    labelitem "feaname"
    name "Highway"
    status default
    type line
    class
      color 255 0 0
      label
        antialias
        color 255 0 0
        font "times"
        mindistance 250
        outlinecolor 255 255 255
        position cc
        size 9
        type TRUETYPE
      end
    end
  end
  layer
    maxscale 750000
    minscale 0
    name "profileexisting"
    status default
    transform false
    type point
    class
      color 0 255 255
      name "Existing Client"
      size 12
      symbol "circle"
    end
  end
  layer
    maxscale 750000
    minscale 0
    name "profileprior"
    status default
    transform false
    type point
    class
      color 255 0 0
      name "Prior Contact (No Sale)"
      size 12
      symbol "circle"
    end
  end
  layer
    maxscale 750000
    minscale 0
    name "profilenew"
    status default
    transform false
    type point
    class
      color 0 0 255
      name "New Prospect"
      size 12
      symbol "circle"
    end
  end
  layer
    maxscale 750000
    minscale 0
    name "profileactive"
    status default
    transform false
    type point
    class
      color 255 255 0
      name "Active Prospect"
      size 12
      symbol "circle"
    end
  end
  layer
    name "highlight"
    status default
    transform false
    type point
    class
      color 255 255 255
      size 7
      symbol "triangle"
      label
        antialias
        color 255 0 0
        font "helvbold"
        outlinecolor 64 64 64
        position ur
        size 10
        type truetype
      end
    end
  end
  layer
    name "credits"
    status default
    transform false
    type annotation
    class
      label
        antialias
        backgroundcolor 255 255 255
        color 0 64 128
        font "helv"
        position ur
        size 6
        type truetype
      end
    end
  end
end



More information about the mapserver-users mailing list