Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 13
Registered: ‎08-23-2016
Accepted Solution

Capture Map Click Event : Geospatial Portal SDK 2015 EP05

Hi,

 

In Geospatial Portal SDK 2015 EP05, is there a way to register a MapClick event ?

The Map Move exists but apparently not the MapClick.

 

Many thanks,

 

David

Highlighted
Occasional Contributor
Posts: 13
Registered: ‎08-23-2016

Re: Capture Map Click Event : Geospatial Portal SDK 2015 EP05

Ok,

 

I get the solution : 

$(".map").click(function (e) {
        var coords = $GP.utils.getInMapCrs({
                x: e.offsetX,
                y: e.offsetY
            }),
            msg = "Coords + " + coords.x + ", " + coords.y;
        $GP.ui.info(msg);
        // unregister click event
        $(".map").off("click");
});

But I didn't found it in the documentation.

The $(".map") has a lot of functions to listen event to the map.

 

Enjoy !

 

David

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.