[OpenLayers-Trac] [OpenLayers] #1419: loadURL doesn't work if params are passed as a string

OpenLayers trac at openlayers.org
Thu Mar 6 15:38:53 EST 2008


#1419: loadURL doesn't work if params are passed as a string
----------------------+-----------------------------------------------------
 Reporter:  elemoine  |       Owner:     
     Type:  feature   |      Status:  new
 Priority:  minor     |   Milestone:     
Component:  general   |     Version:  2.5
 Keywords:            |       State:     
----------------------+-----------------------------------------------------
 This problem was reported on the mailing list:

 {{{
 When calling this function the 'params' parameter doesn't work.
 I think I've found why  :

 When you call OpenLayers.loadURL(url, param,... ) and you give string like
 param = "toto=blabla&titi=haha";

 The following function (Ajax.js, line 257) :
 this.options.parameters =
 OpenLayers.Util.getParameters(this.options.parameters);
 return null.

 OpenLayers.Util.getParameters() seems to need a full url like
 "page.php?toto=blabla&titi=haha" to work.
 if you only give the params, it return null. So parameters are lost.
 }}}

 This looks like a bug to me.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1419>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list