Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm evaluation Geomajas. Apparently, there's very little info on this framework across the Internet. I've managed to create a context menu for the map (the menu that appears when you right click on the map).

I want to do the same for a map point marker (I may need to extend this to other geometry types, i.e., Polygons, Multipolygons, Lines, etc). Anyone with an idea on how to do this, please assist.

Additionally, when I add context menu, the "About Geomajas" menu item hides my first menu item. Is there a way that I can add menu items from below this menu, or make it the last item in the menu?

I'm adding context menu by adding the line:

share|improve this question
up vote 0 down vote accepted

I think you should just create your own context menu instead of adding to the existing one (in general you have to know the type of an object in SmartGWT to know which method to use to add items.

For example (from MeasureDistanceController):

    menu = new Menu();
    menu.addItem(new CancelMeasuringAction(this));
    Layer selectedLayer = mapWidget.getMapModel().getSelectedLayer();
    if (selectedLayer instanceof VectorLayer) {
        menu.addItem(new ToggleSnappingAction((VectorLayer) selectedLayer, this));
share|improve this answer
Thanks. I'll try this out. – okello Jun 29 '12 at 16:26

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.