SceneView: Annotation Symbols and Text

884
7
05-22-2018 09:44 PM
MichalGasparovic
New Contributor III

Hi,

I'm trying to reproduce the functionality of the DirectLineMeasurement3D widget (as the out of box is good only for presentation purposes) and I wonder how can I create the 

- annotation lines / symbols

- text

- etc

Any ideas on how to get this implemented would be great. Thank you!

0 Kudos
7 Replies
MichalGasparovic
New Contributor III

Hi Rob, thanks for the reply. Yes I went through all those, and while they are all good, I'd really like to know how it's done for the DirectLineMeasuremnt3D widget, where these text are offset from the polyline, and they switch accordingly so are always at the front. Also the annotation line is not just vertical line, but a proper 3D one. Is this all done via custom WebGL code? 

when I look at the code, I see there are plenty of interesting tools that are not publicly avialable, but would be great if esri could come up with some samples on how to achieve something similar. I reckon I'll have to have a look at external renderers and WebGL development. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Michal,

   There are many internal part of the API that will not be exposed and most widgets are just that. Sorry I do not know how they do that exactly but my guess would be through WebGL.

MichalGasparovic
New Contributor III

Hi Rob, thanks again. Well it's time to dive into webgl then  I'd love to see more examples on oxternal renderers but will get there. Without learning we stop being engineers!

0 Kudos
RalucaNicola1
Esri Contributor

Hi Michal, 

to me it sounds like you want to create your own 3D measurement tool? Could you give us feedback on why you need to do this? We tried to design this tool so that people don't have to do all the work from scratch.

Indeed, most of it is internal API and the actual calculation, the line generation and the labeling are not public and we don't really plan to make them. We use WebGL to render the 3D line and the labels are HTML elements. We considered adding options to change the color of the line. Would that help you already?

Let me know what your requirements are, as I mentioned in the other post we are still working on the public API.

0 Kudos
MichalGasparovic
New Contributor III

Hi, well basically I cannot change much now regarding the measure widget, style of the line, cannot change the labels (are you sure they are html elements??). As you've mentioned, it's all webgl. Btw I cannot control the weidget the way I wish... how do I activate drawing (via view.activetool.activate(), but it's not documented. I'd like to be able to connect to some public events, not just to 'watch' the properties in order to guess if that's the correct value for the event I'd like, example given would be onMeasureDone or similar so I can display my own UI.

The lack of all these will force me to look into webgl and to use the external renderers to do what I need on my own terms.

Don't take it wrong, but the lone public method ''cancelMeasurement' or whatever and no public subscription points is just not enough for the widget that actually does so much!

Thanks

0 Kudos
RalucaNicola1
Esri Contributor

As previously mentioned, we are working on exposing more functionality in a future release, but for now we only exposed the widget and the viewmodel, which allow you to plug the widget in your app and use as is. The most that users can do at the moment is to have their own UI for it and listen for changes in the state.

Currently with public API you can't programmatically activate the widget, nor deactivate it. You also cannot change the style.

My question is again: can you tell us your use case? We will definitely expose the activation mechanism once we decide on the public API. But changing the style is currently not in our radar. Unless we have feedback on how this might be used.

0 Kudos