Open MephestoKhaan opened 6 years ago
Hi - thanks for raising this issue. A bit of background on how building highlights are implemented, Our streamed building geometry is pre-processed to optimize for realtime rendering performance. Level-of-detail meshes are created for display at different map zoom levels. This optimized streamed building geometry does not have uniquely identifying information for each building, nor does it include other metadata such as building height, outline polygon, etc. Instead, when making a BuildingHighlight.Create request for information, internally an asynchronous web request is made for this information. On response, the caller is notified via the callback supplied by BuildingHighlightOptions.BuildingInformationReceivedHandler. If creating a visible highlight (InformationOnly was not set), internally, the BuildingInformation is used to create mesh geometry suitable for overlaying over the regular streamed building geometry. This is done by extruding outline polygons to create upright prisms. This dynamically-created highlight geometry matches the streamed building geometry quite closely when displaying the most detailed level-of-detail ("LoD 0"). However, for simplified LoDs, the streamed building geometry and the dynamically-created highlight geometry may not match exactly. From your screenshot https://gyazo.com/b0e721636d83085abad173699529b3bf, this looks like the cause of the first problem that you are seeing. The intermittent nature of the issue ("happens 50% of the time") might be due to sometimes being zoomed in close enough to be displaying LoD 0 buildings, and sometimes zoomed further out so that LoD 1 buildings are displayed? This is likely not something that we can address in the short-term. A longer-term solution might involve changing the format of streamed building geometry such that the triangles belonging to a single building can be identified - though this in turn would place additional constraints on how LoD simplification can occur between connected building parts.
For the second issue you are reporting, it sounds incorrect that the callback would be received immediately - we will investigate.
Thanks for the response!
It is sighly worse than that. Because iin this case it gave me even the wrong building: https://gyazo.com/633ad08b6efed90ddd57d5dd57695060 (should be the tall one).
The highlightsystem for v0.6 seems to have a problem when the desired building has not been yet streamed. See Image: https://gyazo.com/b0e721636d83085abad173699529b3bf
This happens 50% of the time, Probably the call is happening too soon sometimes? If I hihglight the building while visible it works perfect.
Also , as an user, I would like to be able to retrieve a callback of a building only, without highlighting it. Right now if we add "InformationOnly" the callback is called immediately with some data that is not exactly right (the
id
is very different for landmarks, for example, which I need). So If I want the callback to give me good information I need to set it to Color.clear and wait (and still because of the above problem 50% of the time the data is not accurate).