osm_flutter icon indicating copy to clipboard operation
osm_flutter copied to clipboard

MarkerIcon don't always render

Open Trulsmatias opened this issue 1 year ago • 4 comments

Sometimes the marker icon wouldn't render and this is shown instead: osm_no_icon

It is placed on the geopoint instead of the pin, so it moves when you interact with the map. This happens sometimes, but most of the time it shows the pin correctly. Even though sometimes it is more 50/50 if the pin renders correctly or not.

Here is what is what I used trying to render a pin when getting this bug. (The reason I use a column of two pins where the bottom is not visible is because of #421.

staticPoints: [
        StaticPositionGeoPoint(
          "id",
          const MarkerIcon(
            iconWidget: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Icon(
                  CupertinoIcons.map_pin,
                  size: iconSize,
                ),
                Visibility(
                  visible: false,
                  maintainSize: true,
                  maintainAnimation: true,
                  maintainState: true,
                  child: Icon(
                    CupertinoIcons.map_pin,
                    size: iconSize,
                  ),
                ),
              ],
            ),
          ),
          [GeoPoint(latitude: widget.latitude, longitude: widget.longitude)],
        ),
      ],

Trulsmatias avatar Jun 22 '23 07:06 Trulsmatias