Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Have a problem: when i activated that control:

function onPopupClose(evt) {
                selectControl.unselect(selectedFeature);
            }
            function onFeatureSelect(feature) {         
                selectedFeature = feature;
                id = feature.id;                
                var lonlat = map.getLonLatFromPixel(map.getControlsByClass("OpenLayers.Control.MousePosition")[0].lastXy);

                popup = new OpenLayers.Popup.FramedCloud("chicken", 
                                                        lonlat,
                                                        null,
                                                        "<div style='font-size:.8em'>" +CableLineText_arr[id] +"</div>",
                                                        null, true, onPopupClose);
                feature.popup = popup;
                map.addPopup(popup);
            }
            function onFeatureUnselect(feature) {
                map.removePopup(feature.popup);
                feature.popup.destroy();
                feature.popup = null;
            }
...

selectControl = new OpenLayers.Control.SelectFeature(lineLayer,
                    {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});
            drawControls = {
                        select: selectControl
                    };

            for(var key in drawControls) {  
                map.addControl(drawControls[key]);              
                var control = drawControls[key];
                control.activate();
            }

and when I click on the marker (poi), then the pop-up window does not appear, when i click on the line (feature) - popup window is displayed. If i disable this control, the pop-up window for the line (feature) does not appear, but if i click on the marker (poi) - a popup window is displayed.

How do I fix this problem?

Link on the map: http://softez.pp.ua/fiberms/fiberms/map.php (for test: check radio button "select polygon on click" and try to click on the line, and then - on the marker, after check radio button "navigate" and try to click on the line, and then - on the marker).

Thanks!

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.