Hi Dejan, hi all,

I just faced the same problem with one of my layers.
Its icon in the legend is a white rectangle instead of a smaller PNG than
the one used on the map. Only have this problem with one layer while it
works fine with the other ones also using a raster symbol.

I have found out that there is a way in the mapfile to force the legend to
use a specific image, with the keyword KEYIMAGE.

LAYER
...
   CLASS
      KEYIMAGE "images/legend/specific_image.png"
   END
END

Works great with an 18x14px image size.

Hope that helps.


Cheers,
Chris



On Wed, Jan 16, 2013 at 4:20 PM, Chris forum <bak.fo...@gmail.com> wrote:

> "deleted everything from images/legend to force it to recreate the icons"
> yes, I did that yesterday to check if that was working.
>
> Here I am using:
> pmapper 4.3
> PHP Version 5.3.10-1ubuntu3.2
> MapServer version 6.0.3
>
> Yes, $changeSize = false; in 4.3 was
> $changeSize = true; in 4.2
> (on the line you mention and also below)
>
> Maybe Thomas can tell you more about that, I'm just too noob in php...
>
> Chris
>
>
> On Wed, Jan 16, 2013 at 3:40 PM, Dejan Gambin <dejan.gam...@coin.hr>wrote:
>
>> I agree :-)
>>
>> I suppose you have modified the map file or deleted everything from
>> images/legend to force it to recreate the icons. Because the icons come
>> preinstalled I think (this is so with my debian package).
>>
>> Next thing - maybe this can be related to MS version also. I am
>> using 5.0.0-3ubuntu0.3 version from the package
>>
>> dejan
>>
>> On 16. sij. 2013., at 14:11, Chris forum wrote:
>>
>> Well done trying with 4.2 initmap.php.
>> Making a diff between 4.2 and 4.3 shows several  differences at the
>> paragraph called "bad legend icon (due to symbolscaledenom, unit or
>> attribute size/width binding)"
>>
>> But that doesn't explain why the demo works fine here and not on your
>> system...
>>
>> Chris
>>
>>
>> On Wed, Jan 16, 2013 at 1:21 PM, Dejan Gambin <dejan.gam...@coin.hr>wrote:
>>
>>> Replacing initmap.php with the 4.2 version solved the issue. So
>>> something is obviously changed in 4.3.
>>>
>>> regards, dejan
>>> On 15. sij. 2013., at 14:49, Thomas RAFFIN wrote:
>>>
>>> > Could you try with this file please:
>>> >
>>> http://svn.pmapper.net/trac/browser/trunk/pmapper/incphp/init/initmap.php?format=txt
>>> > (save and replace actual pmapper/incphp/init/initmap.php file)
>>> >
>>> > Thomas
>>> >
>>> > Le 15/01/2013 14:29, Thomas RAFFIN a écrit :
>>> >> Hi,
>>> >>
>>> >> The LEGEND part of the mapfile could be used to embed legend in the
>>> >> drawing map. Pmapper doesn't use it and redraw each icon in the
>>> >> pmapper/image/legend folder.
>>> >>
>>> >> Thomas
>>> >>
>>> >> Le 15/01/2013 14:24, Chris forum a écrit :
>>> >>> I probably can not help you anymore...
>>> >>> Please triple check the images are in the images/legend directory,
>>> with
>>> >>> www-data rights.
>>> >>>
>>> >>> Firebug will still show you the path to them even if they are not
>>> existing.
>>> >>> I just tried to delete the legend icons of the demo layers
>>> (countries,
>>> >>> rivers, cities, ...). I had then to modify the mapfile so that
>>> pmapper
>>> >>> regenerates the legend icons, otherwise they don't show up in the
>>> legend
>>> >>> (obvious) even though firebug displays their path when you inspect
>>> the
>>> >>> legend.
>>> >>>
>>> >>> You are right, the LEGEND part of the mapfile doesn't seem to be
>>> used.
>>> >>> There is one in the pmapper _demo.map though, don't really know what
>>> for...
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> On Tue, Jan 15, 2013 at 12:06 PM, Dejan Gambin <dejan.gam...@coin.hr>
>>> wrote:
>>> >>>
>>> >>>> Hi Chris
>>> >>>>
>>> >>>> Images are generated in images/legend folder. The icons are
>>> actually there
>>> >>>> so Firebug reports ok, for example "background-image:
>>> >>>> url(images/legend/key_name.png". LEGEND part is empty, that is how
>>> it was
>>> >>>> in previous version.
>>> >>>>
>>> >>>> I just noticed something else. I tried default demo and saw that
>>> legend
>>> >>>> icons for point features are drawn ok, but for polygons and lines
>>> not. Now
>>> >>>> I am confused even more :-)
>>> >>>>
>>> >>>> dejan
>>> >>>>
>>> >>>> On 15. sij. 2013., at 11:24, Chris forum wrote:
>>> >>>>
>>> >>>> Hi Dejan,
>>> >>>>
>>> >>>> Are the images generated into images/legend folder?
>>> >>>> What does indicate Firebug if you try inspecting the white/empty
>>> icons?
>>> >>>> What do you have for a LEGEND part in your mapfile?
>>> >>>>
>>> >>>> Chris
>>> >>>>
>>> >>>> On Tue, Jan 15, 2013 at 9:32 AM, Dejan Gambin <dejan.gam...@coin.hr
>>> >wrote:
>>> >>>>
>>> >>>>> Hi,
>>> >>>>>
>>> >>>>> I have just upgraded my p.mapper 3.2 to 4.3 on my Ubuntu box. I
>>> have a
>>> >>>>> problem with legend icon creation. The icons are created but they
>>> are
>>> >>>>> white/empty.
>>> >>>>>
>>> >>>>> Steps I tried:
>>> >>>>>
>>> >>>>> - I made sure images/legend folder is owned by www-data (chown -R
>>> >>>>> www-data:www-data /images/legend, even did this on whole pmapper
>>> folder)
>>> >>>>> - I have created a test php script for legend icon creation
>>> >>>>> (createLegendIcon). It works ok, even by putting the legend icons
>>> into the
>>> >>>>> same folder as above
>>> >>>>> - I checked error logs. Everything seems to be fine
>>> >>>>>
>>> >>>>> Any clue? Am I missing something?
>>> >>>>>
>>> >>>>> Thx very much
>>> >>>>>
>>> >>>>> regards, dejan
>>> >>>>>
>>> >>>>>
>>> ------------------------------------------------------------------------------
>>> >>>>> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS,
>>> SSRS
>>> >>>>> and more. Get SQL Server skills now (including 2012) with
>>> LearnDevNow -
>>> >>>>> 200+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> experts.
>>> >>>>> SALE $99.99 this month only - learn more at:
>>> >>>>> http://p.sf.net/sfu/learnmore_122512
>>> >>>>> _______________________________________________
>>> >>>>> pmapper-users mailing list
>>> >>>>> pmapper-users@lists.sourceforge.net
>>> >>>>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>> >>>>>
>>> >>>>
>>> >>>
>>> ------------------------------------------------------------------------------
>>> >>> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS,
>>> SSRS
>>> >>> and more. Get SQL Server skills now (including 2012) with
>>> LearnDevNow -
>>> >>> 200+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> experts.
>>> >>> SALE $99.99 this month only - learn more at:
>>> >>> http://p.sf.net/sfu/learnmore_122512
>>> >>> _______________________________________________
>>> >>> pmapper-users mailing list
>>> >>> pmapper-users@lists.sourceforge.net
>>> >>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> ------------------------------------------------------------------------------
>>> >> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
>>> >> and more. Get SQL Server skills now (including 2012) with LearnDevNow
>>> -
>>> >> 200+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> experts.
>>> >> SALE $99.99 this month only - learn more at:
>>> >> http://p.sf.net/sfu/learnmore_122512
>>> >> _______________________________________________
>>> >> pmapper-users mailing list
>>> >> pmapper-users@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
>>> > and more. Get SQL Server skills now (including 2012) with LearnDevNow -
>>> > 200+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> experts.
>>> > SALE $99.99 this month only - learn more at:
>>> > http://p.sf.net/sfu/learnmore_122512
>>> > _______________________________________________
>>> > pmapper-users mailing list
>>> > pmapper-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
>>> and much more. Keep your Java skills current with LearnJavaNow -
>>> 200+ hours of step-by-step video tutorials by Java experts.
>>> SALE $49.99 this month only -- learn more at:
>>> http://p.sf.net/sfu/learnmore_122612
>>> _______________________________________________
>>> pmapper-users mailing list
>>> pmapper-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>>
>>
>>
>>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to