mattermoran / map_launcher

Flutter plugin for launching maps
MIT License
259 stars 117 forks source link

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

Open MIUXIU opened 1 year ago

MIUXIU commented 1 year ago

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

mattermoran commented 1 year ago

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

oantacamelia commented 10 months ago

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

 map.showMarker(
                        coords: Coords(
                         latitude,
                         longitude,
                        ),
                        title:"#Title",
                      );
mattermoran commented 10 months ago

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

ronytesler commented 8 months ago

any update?