[OpenLayers-Users] TypeError: OpenLayers.Control.EditingToolbar is not a constructor

Alexandre Dubé adube at mapgears.com
Fri Jun 28 05:27:44 PDT 2013


Use Firebug or any browder dev tools to inspect your code.  Put break 
points, watch your variables content and you'll discover what's wrong.

HTH,

Alexandre


On 13-06-28 05:13 AM, Tonton wrote:
> Yes i use OL embeded with the horde framework
>
> i replace it with OL stable just downloaded and i have this
>
> error
> TypeError: this.map.addControl is not a function
> [Stopper sur une erreur] 	
> this.map.addControl(new OpenLayers.Control.EditingToolbar(vlay));
>
> any
>
> idea ?
>
>
> On Thu, Jun 27, 2013 at 7:27 PM, Alexandre Dubé <adube at mapgears.com 
> <mailto:adube at mapgears.com>> wrote:
>
>     Hi,
>
>       Are you using a builded version of OpenLayers, like
>     OpenLayers.light.debug.js maybe ?  If so the
>     OpenLayers.Control.EditingToolbar might not included in the build
>     you're using.  If you enter "OpenLayers.Control" in your navigator
>     dev tool, you'll see what controls your build contains.
>
>       That would be the first thing I'd check.  Try switching to
>     OpenLayers.debug.js or OpenLayers.js to see if it works.
>
>     HTH,
>
>     Alexandre
>
>
>
>     On 13-06-27 10:57 AM, Tonton wrote:
>>     I try to add editing tools bare after the map was created
>>
>>     var vlay = this.map_layers[1];
>>                    console.log(vlay);
>>                     var editing = new
>>     OpenLayers.Control.EditingToolbar(vlay);
>>                     this.map.addControl(editing);
>>
>>     and systematicaly i had this error message
>>
>>     TypeError: OpenLayers.Control.EditingToolbar is not a constructor
>>
>>     the console. log output :
>>     Object { EVENT_TYPES=[28], options={...}, name="Editable",
>>     more...} is the layer i want to draw on
>>
>>     What i 'am doing wrong ?
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.osgeo.org  <mailto:Users at lists.osgeo.org>
>>     http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>     -- 
>     Alexandre Dubé
>     Mapgears
>     www.mapgears.com  <http://www.mapgears.com>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.osgeo.org <mailto:Users at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130628/7c590f0a/attachment-0001.html>


More information about the Users mailing list