Topic: The polygons do not appear to be filled in CalcAreaExample.
Hello.
"OnlineMapsDrawingPoly", it looks like the area is filled with 0.3 alpha channel, but in fact it is not filled with any color.
Is there any other way to fill the area?
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → The polygons do not appear to be filled in CalcAreaExample.
Hello.
"OnlineMapsDrawingPoly", it looks like the area is filled with 0.3 alpha channel, but in fact it is not filled with any color.
Is there any other way to fill the area?
Hello.
A quote from the documentation:
Drawing API - polygon has no fill in «Tileset»
This problem is related to the very difficult polygon triangulation. Most likely, this problem will never be
solved.
How to work around the problem:
1. OnlineMapsDrawingElement.checkMapBoundaries = false.
This mode works correctly only if the lines do not intersect.
2. Use «Draw to Texture» mode.
3. (Not recommended) Use Drawing as Overlay.
I understand. Thank you for your support.
I have changed it like this and can place and clear the lines at least:
private void OnMouseUp()
{
// Get the geographical coordinates of the cursor.
Vector2 cursorCoords = control.GetCoords();
// Create a new marker at the specified coordinates.
OnlineMapsMarker marker = markerManager.Create(cursorCoords, markerTexture, "Marker " + (markerManager.Count + 1));
// Save marker and coordinates.
markerPositions.Add(cursorCoords);
markers.Add(marker);
// Mark that markers changed.
changed = true;
}
private void Update()
{
if (Input.GetKey(KeyCode.LeftShift) && Input.GetMouseButtonUp(0))
{
OnMouseUp();
}
if (Input.GetKey(KeyCode.LeftShift) && Input.GetMouseButtonUp(1))
{
Clear();
}
...
Still the polygons do not appear to be filled in CalcAreaExample.
Why would the fill appear after these changes?
Please read post #2.
https://forum.infinity-code.com/viewtop … 7407#p7407
Infinity Code Forum → Online Maps Help → The polygons do not appear to be filled in CalcAreaExample.
Powered by PunBB, supported by Informer Technologies, Inc.