[ka-Map-users] IE6 & Transparency with layers

manu - malbela7 at hotmail.com
Mon Aug 18 18:52:10 EDT 2008


Hi Lorenzo,

This is the mapfile i'm working on, and yes, i have deleted the cache. I delete it everytime i made a change in the mapfile.

# Map file created from QGIS project file
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
  NAME PoblacionIndigena
  # Map image size
  SIZE 600 600
  UNITS dd
  TRANSPARENT ON
  EXTENT 550224.270181 1509236.278125 1044106.792319 1985236.846875
  PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    ''
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 192 192 192
  IMAGEQUALITY 100 
  IMAGETYPE png
  #OUTPUTFORMAT
   # NAME dithered
    #DRIVER "GD/PNG"
    #EXTENSION "png"
    #MIMETYPE "image/png"
    #IMAGEMODE RGBA
    #TRANSPARENT ON
    #FORMATOPTION "QUANTIZE_FORCE=ON"
    #FORMATOPTION "QUANTIZE_DITHER=OFF"
    #FORMATOPTION "QUANTIZE_COLORS=256"
  #END

  # OUTPUTFORMAT
  #   NAME gif
  #   DRIVER 'GD/GIF'
  #   MIMETYPE 'image/gif'
    #IMAGEMODE PC256
  #   EXTENSION 'gif'
  # END
  # Legend
  LEGEND
    IMAGECOLOR 255 255 255
    TRANSPARENT ON
    STATUS ON
    KEYSIZE 18 12
    LABEL
      FONT arial
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 89 89
    END
  END
  SCALEBAR
    TRANSPARENT TRUE
  END
  REFERENCE
     EXTENT 550224.270181 1509236.278125 1044106.792319 1985236.846875
     SIZE 136 131 
     IMAGE keymap.png
     STATUS ON
     COLOR -1 -1 -1
     OUTLINECOLOR 255 0 0
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
    # Set IMAGEPATH to the path where MapServer should
    # write its output.
    IMAGEPATH '/var/www/tmp/'

    # Set IMAGEURL to the url that points to IMAGEPATH
    # as defined in your web server configuration
    IMAGEURL '/tmp/'

    # WMS server settings
    METADATA
      'wms_title'           'Poblacion Indigena'
      'wms_onlineresource'  'http://localhost/cgi-bin/mapserv?map=wms.map&'
      'wms_srs'             'EPSG:4326'
    END

    #Scale range at which web interface will operate
    # Template and header/footer settings
    # Only the template parameter is required to display a map. See MapServer documentation
  END

  LAYER
    NAME 'departamentos_gua'
    GROUP 'Departamentos'
    TYPE POLYGON
    CONNECTIONTYPE postgis
    TEMPLATE "template_proyectos.html"
    METADATA
      'queryable' 'true'
      'imageformat' 'png'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    ''
    END
    CLASSITEM 'pob_indig'
    CLASS
      NAME '0.749 < pob_indig < 33.347'
      EXPRESSION ( ([pob_indig]>= 0.749) AND ([pob_indig] <= 33.347) )
      STYLE
        SYMBOL 0
          OUTLINECOLOR 0 0 0
          COLOR 255 170 127
        END
    END
    CLASS
      NAME '33.347 < pob_indig < 65.943'
      EXPRESSION ( ([pob_indig]>= 33.347) AND ([pob_indig] <= 65.943) )
      STYLE
        SYMBOL 0
          OUTLINECOLOR 0 0 0
          COLOR 0 169 86
        END
    END
    CLASS
      NAME '65.943 < pob_indig < 98.541'
      EXPRESSION ( ([pob_indig]>= 65.943) AND ([pob_indig] <= 98.541) )
      STYLE
        SYMBOL 0
          OUTLINECOLOR 0 0 0
          COLOR 0 84 171
        END
    END
  END

  LAYER
    NAME 'gisaeci'
    GROUP 'Proyectos'
    TYPE POINT
    CONNECTIONTYPE postgis
    TEMPLATE "template_proyectos.html"
    METADATA
      'queryable' 'true'
      'imageformat' 'png'
    END
    STATUS OFF
    TRANSPARENCY 100
    PROJECTION
    'proj=longlat'
    'ellps=WGS84'
    'datum=WGS84'
    'no_defs'
    ''
    END
    CLASS
       NAME 'gisaeci' 
       STYLE
         SYMBOL 'CIRCLE' 
         SIZE 10 
         OUTLINECOLOR 0 0 0
         COLOR 189 123 88
       END
    END
  END


      #Circle symbol
      SYMBOL
        NAME 'CIRCLE'
        TYPE ellipse
        FILLED true
        POINTS
          1 1
        END
      END

END


Thank you again!

Regards

Manu
----------------------------------------
> Date: Tue, 19 Aug 2008 00:16:06 +0200
> From: lorenzo at ominiverdi.com
> CC: ka-map-users at lists.maptools.org
> Subject: Re: [ka-Map-users] IE6 & Transparency with layers
> 
> I guess you have to paste or attach your mapfile (clean any possible 
> passwords)
> 
> have you deleted your cache?
> 
> 
> manu - wrote:
>> hehehe...yes, that's true,...it's better when you get the same result, 
>> but it will be much more better if the results where the desired.
>>
>> I've made the changes you suggested me, but still have no results.
>>
>> I hope you have any other idea. If you need more information you only 
>> have to ask for it.
>>
>> Thank you very much
>>
>> Manu
>>
>>
>>> Date: Mon, 18 Aug 2008 23:10:55 +0200
>>> From: lorenzo at ominiverdi.com
>>> CC: ka-map-users at lists.maptools.org
>>> Subject: Re: [ka-Map-users] IE6 & Transparency with layers
>>>
>>>
>>>
>>> manu - wrote:
>>>> Hello Lorenzo,
>>>>
>>>> First of all, thank you for your response.
>>>>
>>>> About what you said, i've changed the format type from png24 to png16
>>>> in the map file, and what i get now is that i have no transparency
>>>> both in ie6 and firefox.
>>>
>>> hehe, so that's much better now. same behavior is a good sign.
>>>
>>> I guess that at the moment your problem could be related to:
>>>
>>> 1) TRASPARENT attribute on MAP object
>>> it should be ON (not sure is mandatory)
>>> MAP
>>> ...
>>> TRANSPARENT ON
>>> ...
>>>
>>>
>>> 2) IMAGEFORMAT on LAYER's METADATA
>>> LAYER
>>> ...
>>> METADATA
>>> IMAGEFORMAT "PNG"
>>> ...
>>> END
>>> END
>>>
>>>
>>> 3) NO OUTPUTFORMAT definition on MAP Object for PNG
>>> to be sure you don't override the default value
>>>
>>>
>>>
>>> hope this helps
>>>
>>> Lorenzo
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> I'm sorry, but it's important for me that it works in the same way
>>>> with those web browsers.
>>>>
>>>> Thank you very much.
>>>>
>>>> Manu
>>>>
>>>>> Date: Thu, 14 Aug 2008 12:10:30 +0200
>>>>> From: lorenzo at ominiverdi.com
>>>>> CC: ka-map-users at lists.maptools.org
>>>>> Subject: Re: [ka-Map-users] IE6 & Transparency with layers
>>>>>
>>>>> Hola Manu,
>>>>> just to say that using png24 with IE6 and the JS trick is not a good
>>>>> idea at all.
>>>>> the rendering is very slow and the overall performances of the map
>>>>> navigation get bad quickly.
>>>>> I suggest you to use PNG (PNG16) instead.
>>>>> you'll avoid all kind of problems on rendering.
>>>>> ciao
>>>>> Lorenzo
>>>>>
>>>>>
>>>>> manu - wrote:
>>>>>> Hey,
>>>>>>
>>>>>> I've changed the kaMap.js file in order to put the class 
>> attribute in
>>>>>> each of the images of the tile, and now my tiles look like this:
>>>>>>
>>>>>> >>> 
>> src="http://192.168.10.43/ka-map/htdocs/tile.php?map=gmap&t=-3072&l=512&s=227538135372&g=Proyectos&i=png24" 
>>
>>>> style="position:
>>>>>> absolute; top: -256px; left: 0px; width: 256px; height: 256px;
>>>>>> visibility: visible;"/>
>>>>>>
>>>>>> But the result is the same as before, i have no transparency.
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Regards.
>>>>>>
>>>>>> Manu
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>> From: malbela7 at hotmail.com
>>>>>> To: ka-map-users at lists.maptools.org
>>>>>> Subject: RE: [ka-Map-users] IE6 & Transparency with layers
>>>>>> Date: Tue, 29 Jul 2008 20:08:39 +0000
>>>>>>
>>>>>> Thank you so much Jason,
>>>>>>
>>>>>> Hope someone jumps in and give us some ligth
>>>>>>
>>>>>> Regards.
>>>>>>
>>>>>> Manu
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>> From: jfournier at dmsolutions.ca
>>>>>> To: ka-map-users at lists.maptools.org
>>>>>> Subject: RE: [ka-Map-users] IE6 & Transparency with layers
>>>>>> Date: Tue, 29 Jul 2008 15:10:20 -0400
>>>>>>
>>>>>> Hi Manu,
>>>>>>
>>>>>>
>>>>>>
>>>>>> I took a look. The tiles do not appear to have class="png24" 
>> on them:
>>>>>>
>>>>>>
>>>>>>
>>>>>> >>>>>
>>>> 
>> src="http://216.230.155.125/ka-map/htdocs/tile.php?map=gmap&t=-2560&l=1024&s=227538135372&g=Proyectos&i=png24" 
>>
>>>>
>>>>>> style="position: absolute; top: 256px; left: 768px; width: 256px;
>>>>>> height: 256px; visibility: visible;" id="i75"/>
>>>>>>
>>>>>>
>>>>>>
>>>>>> It’s possible that the class is being applied via the DOM but 
>> I don’t
>>>>>> think that’s the case. It’s been a while - I can’t recall if 
>> there’s
>>>>>> a way through ka-Map‘s API to apply png24 to the tiles or not.
>>>>>> Perhaps others can jump in and let us know if there’s a way. 
>> If not
>>>>>> then you’ll likely want to use 8 bit pngs (and sacrifice alpha
>>>>>> transparency for IE6 compatibility).
>>>>>>
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> Jason
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From:* ka-map-users-bounces at lists.maptools.org
>>>>>> [mailto:ka-map-users-bounces at lists.maptools.org] *On Behalf Of 
>> *manu -
>>>>>> *Sent:* Tuesday, July 29, 2008 2:00 PM
>>>>>> *To:* ka-map-users at lists.maptools.org
>>>>>> *Subject:* RE: [ka-Map-users] IE6 & Transparency with layers
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sorry Jason, i just clicked the Reply button without 
>> considering the
>>>>>> mailing list.
>>>>>>
>>>>>> Here you have the url where you can find the sample i'm 
>> working on.
>>>>>>
>>>>>> http://216.230.155.125/ka-map/htdocs
>>>>>>
>>>>>> If you open it with IE6 and select the layer "Proyectos" you 
>> can see
>>>>>> what is going wrong.
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>>
>>>>>> From: jfournier at dmsolutions.ca
>>>>>> To: ka-map-users at lists.maptools.org
>>>>>> Subject: RE: [ka-Map-users] IE6 & Transparency with layers
>>>>>> Date: Tue, 29 Jul 2008 13:35:03 -0400
>>>>>>
>>>>>> Hi Manu,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Please reply to the list – this information could helps others 
>> and,
>>>>>> more importantly, someone else may be able to provide you with the
>>>>>> answer you’re looking after.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Transparency for 24 bit PNGs is supported by FF and IE7 so 
>> it’s not a
>>>>>> good indicator of the png24 class at work. Some reasons why 
>> this may
>>>>>> not be working:
>>>>>>
>>>>>>
>>>>>>
>>>>>> - No width set on the image (required)
>>>>>>
>>>>>> - No height set on the image (required)
>>>>>>
>>>>>> - No transparent.gif (or equivalent) provided
>>>>>>
>>>>>> - The png24 class would appear to be present but isn’t (unlikely)
>>>>>>
>>>>>>
>>>>>>
>>>>>> Do you have a url that we can see?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> Jason
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From:* manu - [mailto:malbela7 at hotmail.com]
>>>>>> *Sent:* Tuesday, July 29, 2008 12:56 PM
>>>>>> *To:* Jason Fournier
>>>>>> *Subject:* RE: [ka-Map-users] IE6 & Transparency with layers
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Jason,
>>>>>>
>>>>>> Thank you very much for your response.
>>>>>>
>>>>>> The class png24 is defines and i'm using it with no results on IE6
>>>>>> (working ok in firefox and ie7). The thing is when i have layers
>>>>>> divided by group and i want to put one layer with point over 
>> another
>>>>>> one which is a polygon. In this case, even when i have defined the
>>>>>> point layer with the imageformat set to png24, i have no 
>> transparency
>>>>>> and i get just the point without the polygon layer.
>>>>>>
>>>>>> Thank you vey much.
>>>>>>
>>>>>> Manu
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>>
>>>>>> From: jfournier at dmsolutions.ca
>>>>>> To: ka-map-users at lists.maptools.org
>>>>>> Subject: RE: [ka-Map-users] IE6 & Transparency with layers
>>>>>> Date: Tue, 29 Jul 2008 11:00:34 -0400
>>>>>>
>>>>>> Hi Manu,
>>>>>>
>>>>>>
>>>>>>
>>>>>> If I recall correctly ka-Map comes with a css class called 
>> png24 (ie,
>>>>>> the pngfix you refer to) – put this on your image, specify a 
>> width
>>>> and
>>>>>> a height (required), and it should work for you. If there is 
>> no png24
>>>>>> class then add the following to your css:
>>>>>>
>>>>>>
>>>>>>
>>>>>> img.png24 {
>>>>>>
>>>>>> filter:expression(msApplyPNGFilter(this));
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>> And the following to your javascript:
>>>>>>
>>>>>>
>>>>>>
>>>>>> function msApplyPNGFilter(o) {
>>>>>>
>>>>>> var t="./images/transparent.gif";
>>>>>>
>>>>>> if( o.src != t ){
>>>>>>
>>>>>> var s=o.src; o.src = t; o.runtimeStyle.filter =
>>>>>>
>>>> 
>> "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s+"',sizingMethod='scale')";
>>>>>>
>>>>>> }}
>>>>>>
>>>>>>
>>>>>>
>>>>>> You will need a single pixel transparent.gif in your images 
>> folder
>>>> for
>>>>>> the above to work verbatim.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hth
>>>>>>
>>>>>> Jason
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From:* ka-map-users-bounces at lists.maptools.org
>>>>>> [mailto:ka-map-users-bounces at lists.maptools.org] *On Behalf Of 
>> *manu -
>>>>>> *Sent:* Tuesday, July 29, 2008 10:37 AM
>>>>>> *To:* ka-map-users at lists.maptools.org
>>>>>> *Subject:* [ka-Map-users] IE6 & Transparency with layers
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Everyone,
>>>>>>
>>>>>> I've been working for some month with ka-map having great results
>>>> with
>>>>>> Mozilla Firefoz and IE 7. But i'm having problems with IE 6 and
>>>>>> tranparency.
>>>>>>
>>>>>> The thing is that i have defined my layers with the imageformat
>>>> set to
>>>>>> png24 so the transparency works perfectly with Firefox and IE7. I
>>>> have
>>>>>> tried some workarounds with pngfix and css modifications with no
>>>> result.
>>>>>>
>>>>>> I will be so thankful if someone could help me with this issue.
>>>>>>
>>>>>> Thank you very much for your time.
>>>>>>
>>>>>> Manu
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>>
>>>>>> ¡Sé solidario, haz clic! Por cada búsqueda que hagas desde Windows
>>>>>> Live Search, estarás ayudando a los que más lo necesitan ¡Sé
>>>>>> solidario, haz clic! 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>>
>>>>>> ¡Lo mejor de MSN y Windows Live en tu móvil! Hotmail, Messenger,
>>>>>> Spaces… Pruébalo ya y disfruta de todas sus ventajas donde quieras
>>>>>> ¡Lo mejor de MSN y Windows Live en tu móvil!
>>>>>> 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>>
>>>>>> ¡Lo mejor de MSN y Windows Live en tu móvil! Hotmail, Messenger,
>>>>>> Spaces… Pruébalo ya y disfruta de todas sus ventajas donde quieras
>>>>>> ¡Lo mejor de MSN y Windows Live en tu móvil!
>>>>>> 
>>>>>>
>>>>>>
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>> ¡Sé solidario, haz clic! Por cada búsqueda que hagas desde Windows
>>>>>> Live Search, estarás ayudando a los que más lo necesitan ¡Sé
>>>>>> solidario, haz clic! 
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>> ¡El Mundo Messenger te espera! Entra ya en "I love Messenger" y
>>>>>> descubre las últimas novedades, trucos, emoticonos… Entra ya en "I
>>>>>> love Messenger" 
>>>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> ka-Map-users mailing list
>>>>>> ka-Map-users at lists.maptools.org
>>>>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>>>>>
>>>>> _______________________________________________
>>>>> ka-Map-users mailing list
>>>>> ka-Map-users at lists.maptools.org
>>>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>>>
>>>> 
>> ------------------------------------------------------------------------
>>>> ¡Sé solidario, haz clic! Por cada búsqueda que hagas desde Windows
>>>> Live Search, estarás ayudando a los que más lo necesitan. 
>> Messenger TV
>>>> 
>>>> 
>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> ka-Map-users mailing list
>>>> ka-Map-users at lists.maptools.org
>>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>>>
>>> _______________________________________________
>>> ka-Map-users mailing list
>>> ka-Map-users at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>
>> ------------------------------------------------------------------------
>> ¡Sé solidario, haz clic! Por cada búsqueda que hagas desde Windows 
>> Live Search, estarás ayudando a los que más lo necesitan Un clic 
>> solidario 
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ka-Map-users mailing list
>> ka-Map-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>   
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users

_________________________________________________________________
¡Lo mejor de MSN y Windows Live en tu móvil! Hotmail, Messenger, Spaces… Pruébalo ya  y disfruta de todas sus ventajas donde quieras
http://serviciosmoviles.es.msn.com/


More information about the ka-Map-users mailing list