Hi,
I was playing with the kml reflector, ad in particular with a request
like this one:
To my surprise the bbox is getting ignored. Looking into the code I
see the network link transformer that
builds the kmz sets the bbox to null before encoding the wms request
that grabs the wms kml request
(and this sort of fine, since GE will fill the bbox in that one), but
then when encoding the lookat
the code looks like:
Envelope e = new Envelope();
e.setToNull();
for ( int i = 0; i < request.getLayers().size(); i++ ) {
MapLayerInfo layer = request.getLayers().get(i);
Envelope b = null;
try {
b = request.getLayers().get(i).getLatLongBoundingBox();
} catch (IOException e1) {
LOGGER.warning( "Unable to calculate bounds for "
+ layer.getName() );
continue;
}
if ( e.isNull() ) {
e.init( b );
}
else {
e.expandToInclude( b );
}
}
Err... uh? I can understand not using the bbox in case it was not
provided, but in case
it's provided in the request wouldn't it be better to use that one
instead of defaulting to
the whole layer?
The idea in the request above is that I actually want to look at a
specifific portion of
the layer.
Also think of the case where a cql filter is appended to the request,
imho we should
go and zoom in the area that has data, not go and show the whole layer area.
Opinions?
Cheers
Andrea
--
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf