[OpenLayers-Users] TypeError: this.layer is undefined on line 1591 (OpenLayers.js)

Gery . gamejihou at hotmail.com
Sun May 12 02:39:31 PDT 2013


Hello adidas,

Based on the image you need to define a layer, the code below is the relevant part of your code? Also, are you compressing your code? More info would help to help you.

Cheers,

Sent from my iRon

On May 12, 2013, at 11:35, "adidas" <xkadidas at gmail.com> wrote:

Hi! I'm trying to make a panel with the tools, but does not work.
var panel = new OpenLayers.Control.Panel({
    createControlMarkup: function(control) {
        var button = document.createElement('button'),
            iconSpan = document.createElement('span'),
            textSpan = document.createElement('span');
        iconSpan.innerHTML = ' ';
        button.appendChild(iconSpan);
        if (control.text) {
            textSpan.innerHTML = control.text;
        }
        button.appendChild(textSpan);
        return button;
        }
    }
);

var editCable = new OpenLayers.Control.ModifyFeature(lineLayer, {
    title: "Edit Cable",
    text: 'Edit<br>Cable',
    vertexRenderIntent: 'temporary',
    displayClass: "olControlMoveClosure",
    modified: true,
    createVertices: true,
    mode: OpenLayers.Control.ModifyFeature.RESHAPE
});

panel.addControls([editCable]);
map.addControl(panel);
popupCableCon.activate();

This error occurs when i declare editCable, but do not swear on this line, swear on line 1591 file OpenLayers.js. What's the problem?
Thanks!
Image with error: http://f4.s.qip.ru/qGVcUy1m.png
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130512/33ccd3b5/attachment.html>
-------------- next part --------------
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users


More information about the Users mailing list