map_launcher icon indicating copy to clipboard operation
map_launcher copied to clipboard

Special characters are not considered in title: !#$&'()*+,-./:;=?@_~

Open MIUXIU opened this issue 1 year ago • 4 comments

for example:Modify the usage in the example

MapsSheet.show(
                context: context,
                onMapTap: (map) {
                  map.showMarker(
                    coords: Coords(latitude, longitude),
                    title: "testTitle&lon=1.0",
                    zoom: zoom,
                  );
                },
              );

will overwrite the real lon field Of course, this problem only occurs on maps that use the title field, such as Amap The problem is with Uri.encodeFull(url) in map_launcher.dart file,encodeFull will not escape these characters, you can use encodeComponent to encode these fields, and then concatenate them into url, then you can no longer encode the url.

Hope google translate can make you understand what I mean,Thank you for your open source contributions

MIUXIU avatar May 15 '23 06:05 MIUXIU

Cool yeah that makes sense. I'll see what I can do about it :)

mattermoran avatar May 16 '23 06:05 mattermoran

We have a similar problem. We tried to open a marker like this using google maps.

 map.showMarker(
                        coords: Coords(
                         latitude,
                         longitude,
                        ),
                        title:"#Title",
                      );

oantacamelia avatar Sep 11 '23 07:09 oantacamelia

yeah that will def mess up the generated url. I'll have to update the url generator

mattermoran avatar Sep 11 '23 07:09 mattermoran

any update?

ronytesler avatar Nov 09 '23 16:11 ronytesler