Re: [OpenMap Users] Changing background color

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 14 Feb 2006 12:19:29 -0500

Yeah, that was pointed out recently, too. I've updated the beta on
the website with the fix - the default background can be set through
the properties (with the "background" or "openmap.BackgroundColor"
properties), or set directly on the MapRequestHandler/ImageServer.
The MapRequestHandler/ImageServer API has been modified to accept
Paint objects for backgrounds in it's createImage(....) method calls
instead of having the MapRequestHandler stomp on the default for
every request.

For the current release, you can modify the MapRequestHandler to
check for a BGCOLOR property set in the request Properties, and if
it's not there, just set it with the default hex color string you
want (RRGGBB).


Cheers,

Don




On Feb 14, 2006, at 11:26 AM, Denny Lee wrote:

> Don,
> Thanks for the tip. Just one other thing. I tried
> setting the background color in openmap.properties
> with openmap.BackgroundColor=FF00008B but the
> background still comes out white. Any suggestions?
>
> Thanks.
>
> --- Don Dietrick <dietrick_at_bbn.com> wrote:
>
>> Hi Denny,
>>
>> It looks like a bug in the
>> ImageServerUtils.getBackground(...)
>> method, where white is used if the defaults are not
>> set.
>>
>> One workaround (until you see a fix) would be to add
>> the property
>> ("BGCOLOR", "RRGGBB"), with RRGGBB being the hex
>> string
>> representation of the background color set in the
>> MapRequestHandler,
>> before the utils are asked to decode the color. I'd
>> only add this
>> property if it's not already in the Properties
>> object.
>>
>> - Don
>>
>>
>> On Feb 13, 2006, at 6:19 PM, Denny Lee wrote:
>>
>>> Hello all,
>>> I am using a servlet to serve maps and I am trying
>> to
>>> change the map background color. I would like to
>> be
>>> able to do it in the servlet code if possible. I
>> saw
>>> the setBackground() in the MapRequestHandler class
>> but
>>> I can't make it to do anything. Here is my code
>>> fragment
>>>
>>> MapRequestHandler iServer = new
>>> MapRequestHandler(requestProperties);
>>>
>>> iServer.setBackground(new Color(51, 0,0,0,));
>>>
>>> I tried various values in the argument spot for
>> Color
>>> but I can't seem to make the background change
>> color.
>>> It is constantly white.
>>>
>>> Any suggestions?
>>>
>>> Thanks.
>>>
>>> Denny
>>>
>>> --
>>> [To unsubscribe to this list send an email to
>> "majdart_at_bbn.com"
>>> with the following text in the BODY of the message
>> "unsubscribe
>>> openmap-users"]
>>
>>
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Feb 14 2006 - 12:20:16 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT