[OpenLayers-Users] Questions on using Protocol.HTTP and custom XML to load/edit features

Stephen Woodbridge woodbri at swoodbridge.com
Sun Mar 14 23:17:26 EDT 2010


Eric Lemoine wrote:
> On Wed, Mar 10, 2010 at 6:21 PM, Stephen Woodbridge
> <woodbri at swoodbridge.com> wrote:
>> I'm running OL 2.8, I have not tried trunk.
>>
>> http://imaptools.com:8080/tilecache/test.html?zoom=17&lat=33.89595&lon=35.49935&layers=BT
>>
>> This is a work in progress, that is getting edits, but demonstrates the
>> issue.
>>
>> 1) Turn on Firebug
>> 2) load the page
>> 3) verify in the FB->"Net" tab that
>> http://imaptools.com:8080/tilecache/poi-server.php?...
>> has not been called.
>> 4) Either pan view slightly ot toggle Vector layer off/on in layerswitcher
>> 5) Notice in FB->"Net" tab the poi-server.php is called.
> 
> Hi Steve.
> 
> I think I know what's going on, and it isn't a bug in the lib.
> 
> init does not call zoomToMaxExtent, because the ArgParser control,
> which the map constructor includes by default, already called
> setCenter. The ArgParser calls setCenter when the WMS layer is added,
> i.e. before the BBOX strategy is activated, so the BBOX strategy
> doesn't catch the first moveend. I'm pretty sure that setting controls
> to null in the map options makes the problem go away.
> 
> Cheers,
> 

Hi Eric,

Thanks that worked. I added:

    controls: [],

to my map definition and it cleared up the problem. That is a very 
subtle effect that I'm not sure I would have figured out on my own.

Best regards,
   -Steve



More information about the Users mailing list