Taking brackets out of the callback.

The Yahoo API doesn't accept quotes in the callback (e.g. foo['bar']).  Since the callback registry is an object and all identifiers are prefixed with "c" now, we can use dot notation.
This commit is contained in:
tschaub
2012-03-21 09:18:23 -06:00
parent 127abf8782
commit 609e5f7f09
2 changed files with 12 additions and 9 deletions

View File

@@ -56,10 +56,11 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
/**
* APIProperty: callbackTemplate
* {String} Template for creating a unique callback function name
* for the registry. Should include ${id}.
* Default is "OpenLayers.Protocol.Script.registry['${id}']".
* for the registry. Should include ${id}. The ${id} variable will be
* replaced with a string identifier prefixed with a "c" (e.g. c1, c2).
* Default is "OpenLayers.Protocol.Script.registry.${id}".
*/
callbackTemplate: "OpenLayers.Protocol.Script.registry['${id}']",
callbackTemplate: "OpenLayers.Protocol.Script.registry.${id}",
/**
* APIProperty: callbackKey