Closed hqnghi88 closed 10 months ago
An overlay is a graphics layer so, as a workaround, have you tried, in the definition of the overlay, simply looping the buildings and drawing them directly as you intend to do on this layer (applying the correct scale, etc. manually) ? This workaround works well (I've tested it).
yes i was thinking about the looping of draw but how did you specify the "correct" scale??
Trial and error I suppose. If you specify the size of the overlay in pixels or whatever, you can probably apply a scaling to each agent...
A bit loss in how you specify the scaling for each agent in the overlay. how to scale their position and size? is it something like:
loop b over: building{
draw b size: {sub_scale, sub_scale};
}
or adk building { do drawaspect;} ??
I would say probably the first one is safer. But try to directly modify the shape (you have more flexibility), like draw b.shape scaled_by: {...,...} rotated_by ...
.
You can also merge all the geometries of the buildings and draw the result once (with draw geometry(building) scaled_to {x_size, y_size}
), it will be easier to adjust I guess.
Dear Sir, The draw geometry(building) is what i seek for (stupid me) . It is totally fit my needs. Thank you.
As in the screenshot, we have a 3d display which can rotate camera. And an overlay as minimap. However, in overlay we cannot define the graphics layer, so there is no solution for drawing the species (gis projected) to be scaled in the minimap size: the pink buildings cannot be fit in the small area in overlay.