[OpenLayers-Users] couple of hopefully quick OpenLayers questions

Christopher Schmidt crschmidt at metacarta.com
Fri Apr 13 15:30:23 EDT 2007


On Fri, Apr 13, 2007 at 02:27:22PM -0500, Ed Fialkowski wrote:
> Hey Bob, thanks for help.
> 
> mapExtent should work well for me.

"maxExtent", not "mapExtent", is what you want. 

> Right now only the bottom left map is hooked up.  My border layer is shown
> as default.  This is the layer I wish to lay on top of my data layer after
> the data is displayed. You can go ahead and hit Submit to see the black,
> gritty, overlay of the border layer, which has transparent: true in the map
> definition.
> 
> If all the black was actually transparent, and the lines were solid lines
> instead of whatever is happening now, I would be set.

http://datafed2.seas.wustl.edu/dvoy_services/ogc_views_NEISGEI.wsfl?&dataset_abbr_1=NEI_2002&dataset_abbr_2=NEI_2002&param_abbr_1=SO2&param_abbr_2=SO2&datetime_1=2002-01-01T00:00:00&datetime_2=2002-01-01T00:00:00&scale_min=0&scale_max=50&param_unit=kg&styles=bdr&LAYERS=WFAS_Grids_div&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-155.029297%2C14.951172%2C-110.029297%2C59.951172&WIDTH=256&HEIGHT=256

You're still requesting a JPEG. As the previous response pointed out,
you need to use a format which supports transparency. 

This looks much closer:

http://datafed2.seas.wustl.edu/dvoy_services/ogc_views_NEISGEI.wsfl?&dataset_abbr_1=NEI_2002&dataset_abbr_2=NEI_2002&param_abbr_1=SO2&param_abbr_2=SO2&datetime_1=2002-01-01T00:00:00&datetime_2=2002-01-01T00:00:00&scale_min=0&scale_max=50&param_unit=kg&styles=bdr&LAYERS=WFAS_Grids_div&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&SRS=EPSG%3A4326&BBOX=-155.029297%2C14.951172%2C-110.029297%2C59.951172&WIDTH=256&HEIGHT=256

Just add a 'format': 'image/png' or if you want to support IE,
'format':'image/gif' to your layer parameters, as described by the
previous poster.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list