aratcliffe / Leaflet.contextmenu

A context menu for Leaflet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contextmenu support react-leaflet

ismaelheinen opened this issue · comments

There is forecast to be implemented for react-leaflet, tried to insert in some ways, did not work.
If it is not the plan, you can close the issue.
Thanks

I successfully integrated contextmenu in its current version into a react-leaflet map in one of my projects, just imported context menu as usual and then in map declaration put contextmenu= {true} contextmenuWidth={ 130} contextmenuItems={ [{
instead of contextmenu: true, contextmenuWidth: 130, contextmenuItems: [{

Well, I'll try that. Very simple. Just stupid of me, by the way.

commented

I successfully integrated contextmenu in its current version into a react-leaflet map in one of my projects, just imported context menu as usual and then in map declaration put contextmenu= {true} contextmenuWidth={ 130} contextmenuItems={ [{
instead of contextmenu: true, contextmenuWidth: 130, contextmenuItems: [{

Here it almost works... but only the text appears. The box beneath it, don't. Tried to manually include the css in the html, but still doesn't work.

@SrBrahma a quick and dirty hack is to add the content of the contextmenu css to your index.css file.