display problem Sharpmap & Openlayers

Topics: General Topics, SharpMap Project, SharpMap v0.9 / v1.x
May 12, 2008 at 5:35 AM
hello,
i use openlayers to access sharpmap WMS. but, it always can not display map fully. some of the tiles can not display. i must right click on the tile, then chose "show picture".
what's the problem. does it relate to my machine
configuration?
Developer
May 12, 2008 at 8:01 AM
please describe carefully your code, so I could investigate
May 12, 2008 at 8:54 AM
Edited May 12, 2008 at 8:55 AM
sorry for my poor english.

openlayers access wms will cut image into many tiles and then display them. My problem is, some of these tiles can not display at the same time when request SharpMap WMS. i must right click on these non-displayed tiles and chose "show picture" on the menu, then these pictures will be showed.
Coordinator
May 12, 2008 at 9:02 AM
Do the tiles take a long time to render? Some browsers limit the number of concurrent requests to the same domain to two. If those two take a long time to render the other tiles may time out. OpenLayers lets you assign an array of wms servers to get around this problem - you may be able to add more hostnames to your server and the same hostnames to OpenLayers and 'fool' the browser..
May 13, 2008 at 1:45 AM
hi, JohnDiss. thanks.
maybe the cause of this problem is like what you said. can i set the time out to let browser waiting until all the tiles are being rendered?
i running wms on my own computer. how can i add more hostnames to my server?

P.S. If i use TileCache to cache the wms, can the problem be solved? but, i have no idea how to set SharpMap WMS url in TileCache.

the default setting can work.
[basic]
type=WMSLayer
url=http://labs.metacarta.com/wms/vmap0
extension=png


I add my SharpMap WMS url. it can not work. i don't know why?
[Townbound]
type=WMS
url=http://localhost/wms/WmsParser.ashx
extension=png

Coordinator
May 13, 2008 at 9:28 AM
Edited May 13, 2008 at 12:12 PM
A tile cache will almost certainly help - but we use bespoke ones so I can't really help you with the official setup.

To try the multiple hosts thing :
If you have an internal dns server on your network you could add multiple CName or AName records for your machine and use them. In this case as long as both wms server and wms client are on your internal network they can be on different machines.
 
 If you do not have an internal dns server but both wms server and wms client is on your machine you can edit the machine's HOSTS file and add multiple hostnames there - but be warned if you do it wrong you may get in a real mess.

then to set up IIS :
as long as the website identity does not have a hostname set it will answer to any of the names that resolve to the machine..

I may not have described this very well :(
hth jd


cdqrain wrote:
hi, JohnDiss. thanks.
maybe the cause of this problem is like what you said. can i set the time out to let browser waiting until all the tiles are being rendered?
i running wms on my own computer. how can i add more hostnames to my server?

P.S. If i use TileCache to cache the wms, can the problem be solved? but, i have no idea how to set SharpMap WMS url in TileCache.

the default setting can work.
[basic]
type=WMSLayer
url=http://labs.metacarta.com/wms/vmap0
extension=png


I add my SharpMap WMS url. it can not work. i don't know why?
[Townbound]
type=WMS
url=http://localhost/wms/WmsParser.ashx
extension=png




May 13, 2008 at 1:27 PM
Edited May 13, 2008 at 1:29 PM
Hi, JohnDiss
I run wms server and wms client on my machine.
I have added multiple hostnames in the HOSTS file like this:
127.0.0.1 localhost
127.0.0.1 local
127.0.0.1 host

but, i don't know how to set up in IIS.

before i modify it, the status bar in IE tell me "69 items remained" when started.

then, i use this array ["http://localhost/wms/wmshandler.ashx","http://local/wms/wmshandler.ashx",""http://host/wms/wmshandler.ashx""]  as url parameter in OpenLayers.Layer.WMS();
at this time, the status bar tell me only "12 items remained". I think adding mutiple hostnames in HOSTS file does speed up browser. But, there are more tiles can not be rendered then before. Why? Does it relate to non-setting up in IIS?

P.S. what is bespoke? can you give me its official link? what role does it play in WMS? and, may i set the minExtent to limit the min extent so that openlayers don't need to render so large extent in order to speed up rendering?

thank you for your constructive suggestion. :)


Coordinator
May 13, 2008 at 1:45 PM
Edited May 13, 2008 at 1:47 PM

bespoke just means we wrote it in house as a very specific solution to a related problem.

I would try adding a few more HOSTS entries - the only limit is the performance of the machine  -  obviously hitting the maching for 40 tiles will take a while if each tile takes a long time to render and time outs may still occur. Try running task manager or another profiling tool on your machine while making the wms requests - it may be that your machine is flat out..

if your map is on a regular grid a tile cache will definately help

remember though that in a production environment you may need to do similar or your dev environment may perform better than your live one.

May 14, 2008 at 7:16 AM
I'm sure the TileCache can help me. I have made TileCache running on IIS and test successfully. But, I dont know how to request my SharpMap WMS.