Comments (12)
Hey guys, I'll try to come out with a solution ASAP.
from ol-contextmenu.
Please, see if this is fixed in v3.2.0
.
from ol-contextmenu.
@niteshgoyal19 Please provide a fiddle to show your issue.
from ol-contextmenu.
I have the same issue. How can I import ol-contextmenu when using ol with webpack?
import ContextMenu from 'ol-contextmenu';
leads to this error when instantiating the menu:
Uncaught TypeError: Cannot read property 'appendChild' of undefined
at s.tg.setMap
Is there another way to import the menu?
I can't provide a fiddle since I don't know how to implement it using javascript modules.
from ol-contextmenu.
It could be a relevant repository. I don't have experience with webpack.
from ol-contextmenu.
Maybe it's not working because I use the new openlayers package ol. I don't think it's a webpack issue.
from ol-contextmenu.
I have the same issue. "ol": "^4.6.4"
from ol-contextmenu.
Same here, using latest version of OL...
from ol-contextmenu.
Hi..
I don't know if this is the same issue but it's the same error message at map.addControl.
I tried the code from example.
this.contextmenu_items = [
{
text: 'what is here ?',
// icon: this.pin_icon, // this can be relative or absolute
callback: this.searchAddressFromPoint
},
'-' // this is a separator
];
this.contextmenu = new ContextMenu({
width: 170,
defaultItems: true,
items: this.contextmenu_items // defaultItems are (for now) Zoom In/Zoom Out
});
this.map.addControl(this.contextmenu);
from ol-contextmenu.
It worked! Thank you.
from ol-contextmenu.
It works, Thanks, you save my day :-)
from ol-contextmenu.
hey am adding ol-contextmenu in my angular app and ol-5.x and
getting issue like
ol-contextmenu.js:7 Uncaught TypeError: Cannot read property 'control' of undefined
at ol-contextmenu.js:7
at ol-contextmenu.js:7
(anonymous) @ ol-contextmenu.js:7
(anonymous) @ ol-contextmenu.js:7
AppComponent.html:3 ERROR ReferenceError: contextmenu is not defined
at MapComponent.push../src/app/map/map.component.ts.MapComponent.ngOnInit (map.component.ts:109)
at checkAndUpdateDirectiveInline (core.js:9250)
at checkAndUpdateNodeInline (core.js:10514)
at checkAndUpdateNode (core.js:10476)
at debugCheckAndUpdateNode (core.js:11109)
at debugCheckDirectivesFn (core.js:11069)
at Object.eval [as updateDirectives] (AppComponent.html:4)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:11061)
at checkAndUpdateView (core.js:10458)
at callViewAction (core.js:10699)
tell me what is issue as am doing something wrong please let me know.
from ol-contextmenu.
Related Issues (20)
- Scrolling menu HOT 3
- contextMenu.on( 'open' ... is not working HOT 1
- Handling padding and window.pageXOffset HOT 3
- Uncaught SyntaxError: import declarations may only appear at top level of a module HOT 6
- Context menu doesn't position correctly HOT 4
- "open" event not triggered when constructed with defaultItems: false HOT 5
- Wrong offset and z-index for submenu
- Add icons (.svg) as it's own element instead of using background image
- When closing the context menu object, the listeners linked to the map are not deleted! HOT 1
- Uncaught SyntaxError: Cannot use import statement outside a module HOT 2
- Cannot use with parcel HOT 2
- Invalid positioning when `push`ing item with sub-items HOT 2
- Hi,there,when I use ol-contextmenu4.1.0 in Vue project,the callBack function is not work,I don't how to solove this problem? HOT 2
- Creates duplicate callbacks with multiple map instances HOT 6
- Start draging with menu open HOT 4
- Generate menu from json HOT 2
- positioning when extending with sub-items HOT 4
- Allow to translate default items text HOT 1
- Can Node 20 be added to the list of approved engines? HOT 3
- Support for OpenLayers 8 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ol-contextmenu.