[mapserver-users] Re: quick question from mapserver beginner!
tigana.fluens at gmail.com
tigana.fluens at gmail.com
Thu May 13 04:26:52 PDT 2010
can anyone can help me? im just missing something : /
On 5/12/2010 8:49 PM, Asuka Milano wrote:
> i hope this is the right way to reply, i just clicked on reply and
> sent it again to mapserver-users at lists.osgeo.org :) thanks for the
> comment, but i guess i didnt explain my situation well on my first post
>
> BASELAYER: google hybrid
> OVERLAY: my own mapserver map with a single LAYER - an image of a field
>
> as you can see in the picture (here it is again:
> http://img688.imageshack.us/img688/5926/99138762.jpg), im really ok
> with rectangular shape of the overlay, the problem is that i want it
> to be smaller. i already made the layer small but the map itself with
> a black background remains big. in my case to start with, i can do
> fine with a map with just the size of its only layer. did i explain
> that well? :P
>
> to make it clearer, imagine this sample scenario:
> - google doesnt have a close up image of my house
> - i have my own aerial high resolution image of my house so i want to
> overlay it above the image google provides
> - problem: i already put my own image of my house above google's but
> the background of the map (which i assume is IMAGECOLOR 0 0 0) covers
> everything else
> - i dont want to provide a raster of the entire world (im saying this
> because the black part covers almost the whole world), only of my house
> - i believe it is possible to create a map with just a specific extent
> right? since there are SIZE and EXTENT values on the map file. but i
> dont know why it's not working for me
>
>
> sorry if i misunderstood some stuff.. thanks again!
>
> On 5/12/2010 8:28 PM, mattmendick wrote:
>> You first have to make sure you are outputting the image as a png or
>> some
>> other image format that supports transparency. Like this, at the base
>> of the
>> mapfile:
>>
>> OUTPUTFORMAT
>> NAME mypng
>> DRIVER "GD/PNG"
>> IMAGEMODE RGB
>> FORMATOPTION "INTERLACE=false"
>> MIMETYPE "image/png"
>> EXTENSION "png"
>> END
>> IMAGETYPE mypng
>>
>> Then, if your source image is not perfectly square, and has black in
>> areas
>> that you want to be transparent, you can use the "OFFSITE [R] [G] [B]"
>> attribute. This tells mapserver that any color in the raster that
>> matches
>> the color in your OFFSITE parameter should be rendered transparent.
>>
>> ex:
>>
>> LAYER
>> NAME "blah"
>> DATA '/path/to/raster.tiff'
>> OFFSITE 0 0 0
>> END
>>
>> This has worked for me in the past, I hope it works for you.
>>
>> -Matt Mendick
>
More information about the MapServer-users
mailing list