Andre,
my patch was a bit too sloppy, you need both checks, so have it like
if (checkScale($this->map, $mLayer, $this->map->scale)) {
if ($mLayerStatus == MS_ON) {
...
}
}
or take this
http://svn.pmapper.net/trac/browser/pmapper/branches/latest-stable/incphp/map.php
armin
Andre van Atten wrote:
> Armin,
>
> Thanks for your answer. I like the xy layer because imho it is faster then
> ogr en it gives the possibility to add a where clause. This is nice because
> itdoes not require the need and db rights to create a view and still have the
> possibilty of filtering.
> Maybe if more people learn how to use it becomes more popular!
>
> Thanks for giving it attention,
>
> Andre
>
>
> -----Original Message-----
> From: Armin Burger
> To: Andre van Atten
> CC: [email protected]
> Sent: Wed Dec 20 21:46:53 2006
> Subject: Re: [pmapper-users] XYLAYER does not respond to MAXSCALE setting in
> the mapfile
>
> this is quite possible that it's not working. I keep this kind of layers
> just as legacy, I never use them any more and I doubt lots of others do.
> It became a bit obsolete with OGR based layers doing something similar.
>
> I will check if it's easily possible to adapt it to correct behaviour.
>
> armin
>
> Andre van Atten wrote:
>> Hi list,
>>
>> I have a problem with XY-layers in Pmapper 3.0 on ms4w (2.2.1). It shows on
>> the map, but when I zoom out, it should respond to the MAXSCALE setting,
>> above this scale the layer should switch off automatically like any other
>> layers, but it doesn't. I have the same problem with Pmapper 1.53 on ms4w
>> 1.5.
>>
>> In the legend, the layer is grayed when I zoom out, but enabling/disabling
>> the layer still works despite of the zoom level. The problem is that the
>> database is queried with a large amount of points.
>> I tried setting the MAXFEATURES setting also, but it didn't work out either.
>>
>> The layer definition is:
>>
>> LAYER
>> STATUS OFF
>> NAME "Addresses"
>> TYPE POINT
>> UNITS METERS
>> SIZEUNITS PIXELS
>> MINSCALE 500
>> MAXSCALE 10000
>> #MAXFEATURES 1000
>> TOLERANCE 5
>> TOLERANCEUNITS PIXELS
>> METADATA
>> "DESCRIPTION" "Addresses"
>> "RESULT_FIELDS" "Cityname, StreetName, nrVA, nrTM, Zip, RangeX,
>> RangeY"
>> "RESULT_HEADERS" "Plaatsnaam, Straatnaam, vanafNR, totenmetNR, PC6,
>> X, Y"
>> "XYLAYER_PROPERTIES"
>> "odbc://'':''/[EMAIL
>> PROTECTED]||fn_vw_TopoStreetRanges()@RangeX>0||RangeX,RangeY,0"
>> END
>> CLASS
>> NAME "Addresses"
>> TEMPLATE void
>> STYLE
>> SYMBOL 'default-circle'
>> COLOR 255 0 0
>> SIZE 6
>> MINSIZE 1
>> MAXSIZE 100
>> END
>> END
>> END
>>
>> The XYLAYER_PROPERTIES is one line in the mapfile.
>> Obviously the function returns the recordset like any standard SQL, this
>> works the same as any SQL select. ALL XY layers have the same problem when
>> zooming out, independant of their (ODBC) source.
>> I use the PEAR from version ms4w 2.1, it works fine, all db-related stuff
>> works fine.
>>
>> My ini file:
>>
>> [GENERAL]
>>
>> ; p.mapper version
>> pmapper = 3.0.0
>> msVersion = 4.10.0
>> pm_config_location = ovreis
>> ;pm_incphp_location = ../../pmapper2lib/incphp
>> ;pm_javascript_location = ../../pmapper2lib/javascript
>> mapFile = "/ms4w/apps/maplab-2.2.1/OVReis/OVReis.map"
>> pm_default_language = nl
>> defCharset = UTF-8
>> map2unicode = 1
>> allGroups = "My commaseparated layer list, I will not annoy you with it.
>> Actually defined in categories"
>> defGroups = Andes6, Andes5, Andes4, Andes3, Andes2, Andes1
>> ;mutualDisableList = notused
>> layerAutoRefresh = 1
>> limitResult = 500
>> highlightColor = 0, 10, 80
>> highlightSelected = on
>> autoZoom = nquery
>> zoomAll = search nquery
>> infoWin = window
>> alignQueryResults = 1
>> pointBuffer = 1000
>> catStyle = tree
>> grpStyle = tree
>> legStyle = attached
>> useCategories = 1
>> scaleLayers = 1
>> icoW = 18
>> icoH = 14
>> imgFormat = png
>> altImgFormat = jpeg
>> ;altImgFormatLayers = jpl_wms_global_mosaic, dem
>> sliderMax = max
>> sliderMin = 1000
>> pdfres = 2
>> dpiLevels = 150, 200, 300
>> enableRightMousePan = 1
>>
>> I also tried different combinations of layer grouping / catgories / styles
>> on/off, but that does'nt seem to make any difference
>>
>> Thanks,
>> Andre
>>
>>
>>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users