osm_flutter
osm_flutter copied to clipboard
Icon Marker Size in iOS
it seems that icon marker in iOS doesn't follow the size put in flutter side,
- [x] fix size of icon
- [x] if their is no size define in flutter size keep the same behaviour
Yes on, the android side, most phone have the option to change the resolution of the screen, like HD (1480 x 720, FHD+(2220 X 1080) WQHD+ (2960 X1440), Every time you change the resolution the icon size will also change making it too tiny on higher resolution. This behavior only happens with custom icons. Edit: the default icon og arrow and yellow person size dont change.
yeah for default icon they stay the same because they built nativaly not like custom icon I built them in flutter and after that i send them to native to native view , but i didn't notice that for custom icon in android that I will check it also
I am using widgets(because user profile pic is part of the marker with some status icon) as icon and in iOS its really small. android its ok
i will fix that sorry the problem in ios that size should be defined in the marker not like android i can use drawable i will make it bigger for now until i implement my solution for size icon i will try to fix it in the next week
check the new version 0.39.0
tried is doesn't seem to work. my file is in .png format. tested it in real device.

Seema to work only on simulators
try to use iconWidget and put asset in sizedbox widget
this is my code
userLocationMarker: UserLocationMaker(
personMarker: MarkerIcon(
assetMarker:
AssetMarker(image: AssetImage("images/images/car-ios.png")),
),
directionArrowMarker: MarkerIcon(
assetMarker:
AssetMarker(image: AssetImage("images/images/car-ios.png")),
),
),
I tried many ways, how do u want me to do it ?
try this example
MarkerIcon(
iconWidget: Image.asset(
"images/images/car-ios.png",
width: 24,
height: 32,
),
),
I did! what happens is when I run the app ,for a second the size will change but then again to back to some weird size again. I think when the user location changes the size also change back to default.
that wierd the problem that now i cannot test on my iphone ( don't adapter for my old iphone :disappointed: ) but i will re-check the logic of the marker when location changes i will make sure to fix this problem soon sorry for that
C UumbSent from my Galaxyxb b -------- Original message --------From: hamza mohamed alin @.> Date: 8/16/22 23:54 (GMT+05:45) To: liodali/osm_flutter @.> Cc: jesussmile @.>, Comment @.> Subject: Re: [liodali/osm_flutter] Icon Marker Size in iOS (Issue #216)
that wierd the problem that d now i cannot test on my iphone ( don't adapter for my old iphone 😞 )
but i will re-check the logic of the marker when location changes
i will make sure to fix this problem soon sorry for that
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
yeah i notice that problem i will why that is happen
i will publish fix for that tonight
I used a very creative way to fix the size across multiple devices: https://www.edoardovignati.it/constant-size-of-a-widget-across-multiple-devices-and-screen-resolutions-in-flutter/