Kyros Nox
Kyros Nox

Reputation: 183

Using Maps in Codename One

Can anyone assist me in adding a Map to a Form in Codename One? I've been reading and searching, and can't find an "updated" demo/tutorial on using the library effectively.

IDE - IntelliJ Build Tool - Maven

Upvotes: 1

Views: 118

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

The old code works mostly the same as it did. The github project instructions are up to date and should work as expected. Just add the dependency and get the API keys from Google.

Then all you need to do is create a BorderLayout Form and place the map within it. E.g.:

Form mapForm = new Form(new BorderLayout());
mapForm.add(CENTER, mapContainerInstance));
mapForm.show();

Upvotes: 1

Related Questions