-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Create Buffer using current location #521
Comments
You can get the geometry from locationDisplay, then use getMapLocation to get the point to create the buffer with. This should work, but are you not seeing the results? |
Hi Eric, **>
|
Wait for the LocationDisplay to start before trying to use it. For example, here is my code that seems to work for me. I'm listening for when the location display has started, then I'll call my bufferLocation method:
|
Hello Eric, The bad news is .addDataSourceStatusChangedListener seems not to work efficiently. The Content in the inner class can somehow not be accessed when the coordinates have been loaded. See image below where I toast the result. Therefore, I can still not load the Buffer when the location immediately loads without having to initiate the action by a button click. Here is the code. **> locationDisplay = health_lab_mapview.getLocationDisplay();
|
Thanks for sharing. The only difference is, in my code that works, simply check fo "isStarted()", instead of "isStarted()&&locationDisplay.getMapLocation()!=null)" What happens when you omit "&&locationDisplay.getMapLocation()!=null)" from that check? |
When I omit "&&locationDisplay.getMapLocation()!=null)" I still get the result above. |
Hello,
I would like to create a buffer from my my current location point without having to touch the MapView.
The code below works but when a point is touched on the MapView. I'd rather like to get a point of the locationDisplay loaded i.e (loc = locationDisplay.getMapLocation();) and use it to create a buffer.
_
_
When I try to use the point extracted from locationDisplay and call it from a Button Action nothing happens. I get no error but I also get no result. Kindly help.
Thanks.
The text was updated successfully, but these errors were encountered: