[Geoprisma-dev] Initial page load generate multiple WMS request,
one with bad params
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Dec 8 09:40:26 EST 2009
Alexandre Dube wrote:
> Hi Steve,
>
> The first load is definitively not normal (5000 ??). I'll try to take
> a look at it.
>
> About the "initial map extent" behavior, when using the InitialView
> widget, it's normal to have 2 calls to the server, 1 for the initial
> extent in the template and one for the actual "initial zoom" of the
> feature we want to be zoomed to. Otherwise, we should always have one
> and only one call.
>
> I just looked at your sample and I only see 2 calls, one with the
> width=5000 and the one we want (not full extent)
>
> Try to add this in your template and tell me what it does.
>
> if(!oMap.getCenter())
> {
> // your setCenter stuff
> }
Duh! I should have known that from OpenLayers. I added the if but is
does not change the behavior.
Here is the apache log of the inital page load:
http://imaptools.com:8080/project/myproj2/log.txt.gz
There are three requests, the two obvious ones at the end of the log and
the first request a bit higher up.
-Steve
> Regards,
>
> Alexandre
>
> Stephen Woodbridge wrote:
>> Hi,
>>
>> I was checking the apache logs while running the above url and on
>> inital load of the page I am getting three WMS requests.
>>
>> http://imaptools.com:8080/project/myproj2/
>>
>> 1) has a bogus image size (WIDTH=5000&HEIGHT=775) and fails because it
>> exceeds the default image max size which I think it 2000 in mapserver.
>> But if it succeeded this would be bad from a performance point of view
>> and tie up a lot of memory and resource computing the image.
>>
>> http://imaptools.com:8080/project/myproj2/proxy.php?osmservice=S_WMS_IMT_MS&osmtoken=TODO%20Delete%20this&osmresource[]=R_ONEMILEETJ&osmresource[]=R_LAKES&osmresource[]=R_PARCELS&osmresource[]=R_RAILROAD&osmresource[]=R_FMROADS&osmresource[]=R_SERVICEROADS&osmresource[]=R_STREETS&osmresource[]=R_HIGHWAYS&osmresource[]=R_INTERSTATE&osmresource[]=R_VOTINGPRECINCTS&osmresource[]=R_ZONING&FORMAT=image%2Fpng&TRANSPARENT=false&LAYERS=onemileetj,lakes,parcels,railroad,fmroads,serviceroads,streets,highways,interstate,votingprecincts,zoning&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-195678792.375,-30330212.818125,195678792.375,30330212.818125&WIDTH=5000&HEIGHT=775
>>
>>
>> 2) the next request appears to be at the maximum extents extents of
>> the world but not those defined in the map widget extents, but with
>> the correct viewport what I'm guessing is the correct viewport size of
>> 610x610 although I'm not sure how it cam up with that number unless by
>> some random chance that the browser geometry just happened to make it
>> square.
>>
>> http://imaptools.com:8080/project/myproj2/proxy.php?osmservice=S_WMS_IMT_MS&osmtoken=TODO%20Delete%20this&osmresource[]=R_ONEMILEETJ&osmresource[]=R_LAKES&osmresource[]=R_PARCELS&osmresource[]=R_RAILROAD&osmresource[]=R_FMROADS&osmresource[]=R_SERVICEROADS&osmresource[]=R_STREETS&osmresource[]=R_HIGHWAYS&osmresource[]=R_INTERSTATE&osmresource[]=R_VOTINGPRECINCTS&osmresource[]=R_ZONING&FORMAT=image%2Fpng&TRANSPARENT=false&LAYERS=onemileetj,lakes,parcels,railroad,fmroads,serviceroads,streets,highways,interstate,votingprecincts,zoning&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-23872812.66975,-23872812.66975,23872812.66975,23872812.66975&WIDTH=610&HEIGHT=610
>>
>>
>> 3) the final image you see after the browser is done loading. This
>> third request might be because I added a map.setcenter() call to the
>> template.
>>
>> http://imaptools.com:8080/project/myproj2/proxy.php?osmservice=S_WMS_IMT_MS&osmtoken=TODO%20Delete%20this&osmresource[]=R_ONEMILEETJ&osmresource[]=R_LAKES&osmresource[]=R_PARCELS&osmresource[]=R_RAILROAD&osmresource[]=R_FMROADS&osmresource[]=R_SERVICEROADS&osmresource[]=R_STREETS&osmresource[]=R_HIGHWAYS&osmresource[]=R_INTERSTATE&osmresource[]=R_VOTINGPRECINCTS&osmresource[]=R_ZONING&FORMAT=image%2Fpng&TRANSPARENT=false&LAYERS=onemileetj,lakes,parcels,railroad,fmroads,serviceroads,streets,highways,interstate,votingprecincts,zoning&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-10750132.512901,3763907.2951822,-10726819.219279,3787220.588805&WIDTH=610&HEIGHT=610
>>
>>
>>
>> If this sounds like a bug, let me know and I will write a ticket for it.
>>
>> Thanks,
>> -Steve
>> _______________________________________________
>> Geoprisma-dev mailing list
>> Geoprisma-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geoprisma-dev
>
>
More information about the Geoprisma-dev
mailing list