Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to request small WMS tiles instead of a single image for the entire map viewport because I know the request is going through a Tile Service (TileCache). OpenLayers handles this with the WMS layer by setting singleTile=false. JSAPI has the ability to set the maxHeight and maxWidth via the resourceInfo options attribute.

But the JSAPI does something unexpected but very practical when these values are set. Instead of getting multiple images to fill the map it still gets a single image and stretches it to fill the map (see for an example).

What I appears to be missing is an option to get multiple images.

The reason I'm asking about this is I have a TileCache service which is accessible via a WMS service but the requests must have specific BBOX values.

share|improve this question
I'm not sure how this works in does OL know to build a BBOX which corresponds to exactly one tile? Doesn't this require knowing the starting tile like in other tiling schemes? Or perhaps with tilecache the topleft of the extent is always the starting tile? If that is the case then perhaps the solution is to build a custom WMS layer like this WMTS example… – ca0v Jul 26 '12 at 20:18
I think you're on to something here. I haven't tried the WMTS approach yet, but it sounds like the right path based on what you're seeing with normal WMS. I'm not too surprised to see it pulling only one image as that's the norm for non-tiled WMS services. And as for OL, in my opinion the best way to learn how things work is to dig in to the code to see what's going on behind the scenes! – Ryan Twilley Jul 30 '12 at 14:28
I've since learned that OL uses the corner of the extent to determine the TileOrigin if no TileOrigin is explicitly provided. The JSAPI solution is to use… and discover the TileCache resolutions and extent via JSON by adding format=json on the query string (see Also, see… – ca0v Jul 30 '12 at 14:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.