Creating a right-click Context Menu for Layers in Java Runtime

993
1
08-25-2017 04:19 AM
NateSwan
New Contributor

Anyone have an idea for how I'd create a basic context menu when right clicking on a map?

Let's say I just want to right click my basemap to display different types of graphics available to me.

This is similar to what I want, only in Javascript...

Context Menu for Map and Graphics 

0 Kudos
1 Reply
JackFairfield
Occasional Contributor II

Use the click event on the mapview.

view.on("click", (e) => {
   if(e.button === 2){

      console.log("right click happened");

 }
})

0 Kudos