Skip to content

MapContainer.addPath draws a straight line instead of actual route #5478

Description

@Eric-Chomba

Summary

MapContainer.addPath draws a straight line between coordinates.

Minimal reproducer

Using this test case

    public void runApp() {
        MapContainer cntMap = new MapContainer("MAP_KEY");

        cntMap.addPath(cntMap.getCameraPosition(),
                //new Coord(-33.866, 151.195), //Sydney
                //new Coord(-18.142, 178.431), //Fiji
                //new Coord(21.291, -157.821), //Hawaii
                //new Coord(37.423, -122.091) //Mountain View
                new Coord(38.8936904,-77.179282)
        );

        form.add(cntMap);
        form.show()
    }

Steps to reproduce

Run the test case above in a simulator.

Expected and observed behavior

Show actual route on the roads to help drivers to navigate to a destination.

Codename One version

7.0.262

JDK version

17

Target environment

Simulator, Android, iOS

Last known working version

No response

Logs and diagnostics

Screenshots or recordings

Image

Report checks

  • I searched existing issues and discussions for this behavior.
  • The reproducer contains no credentials, signing keys, or private customer data.
  • I understand that triage is not a commitment to a fix date.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions