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
Regular Contributor
Posts: 207
Registered: ‎07-27-2016
Accepted Solution

$GP.map.draw BBOX

[ Edited ]

Hi Guys,

 

Is there a way of drawing a rectangle (Bbox) using the $GP.map.draw function.

 

Can only seem to get point and polygon

 

$GP.map.draw({
type: "Point" // Polygon
}, function(retBbox) {
$GP.map.draw.clear();
ChartTitle = Ext.getCmp('QuantifiedDataid').getRawValue();
getDataSenti();
});

 

I need users to draw a bbox on the map and pass the bottom-left and upper-right vertices.

 

Your help will be greatly appreciated.

 

Kind Regards

Jacques

Technical Evangelist
Posts: 1,101
Registered: ‎09-11-2015

Re: $GP.map.draw BBOX

Hi Jacques,

 

Um, how about $GP.map.draw.rectangle()? :-)

 

$GP.map.draw.rectangle({}, function (r) {
    console.log(r.feature.get_geoJSON());
});
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Regular Contributor
Posts: 207
Registered: ‎07-27-2016

Re: $GP.map.draw BBOX

Thank you Yoda!

 

That would work perfectly!

 

Kind regards

Jacques

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