Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an open street map location finder instead of the old google maps one #3173

Open
shai-almog opened this issue Jul 21, 2020 · 13 comments
Labels
first-timers-only For first-time contributors good first issue Good for getting started Hacktoberfest Suitable for new contributor. Part of Hacktoberfest help wanted up-for-grabs For new contributors your-first-pr Make your first pull request
Milestone

Comments

@shai-almog
Copy link
Collaborator

The location simulator has commented out code that supports google maps here:
https://github.com/codenameone/CodenameOne/blob/master/Ports/JavaSE/src/com/codename1/impl/javase/LocationSimulation.java

If you look at the history of the file this was working well and was even contributed by 3rd party https://github.com/codenameone/CodenameOne/commits?author=PiotrZub

The reason the code was commented out is that Google Maps now requires a credit card to work and we can't distribute our map key as part of an open source project. The solution of proxy won't work either since this can be sniffed. Instead this should use another map API like Open Street Map where a credit card isn't required.

This should just require updating the HTML to that new map API and updating the binding. Ideally we'll also update this to use CEF instead of FX but I'll leave that as a separate task.

@shai-almog shai-almog added the good first issue Good for getting started label Jul 21, 2020
@shai-almog shai-almog added this to the Version 8.0 milestone Jul 21, 2020
@shai-almog shai-almog added this to To do in Codename One via automation Jul 21, 2020
@shannah shannah added the Hacktoberfest Suitable for new contributor. Part of Hacktoberfest label Sep 2, 2021
@yo-zubair yo-zubair added first-timers-only For first-time contributors help wanted up-for-grabs For new contributors your-first-pr Make your first pull request labels Sep 6, 2021
@Double-A-92
Copy link
Contributor

I wanted to do this and replace the old Google Maps code with LeafletJS, but I really can't figure out how to even build and run the project...

Is there any detailed setup guide? To I need a special IDE to run it? I tried IntelliJ but maven is refusing to build it because something with Java 5.

[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ codenameone-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 629 source files to C:\Users\amato\Documents\repos\CodenameOne\maven\core\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[INFO] 2 errors 
[INFO] -------------------------------------------------------------

Any Idea what it could be?

Also I'm not really sure where I have to put the codenameone-skins and cn1-binaries directories that I was told to download...

@shannah
Copy link
Collaborator

shannah commented Oct 6, 2021

There are maven build instructions in the readme. Basically
cd maven
mvn install

Use jdk8 or jdk11

Then create a test project using start.codenameone.com

And change the cn1.version and cn1.plugin.version properties to 8.0-SNAPSHOT

@Double-A-92
Copy link
Contributor

There are maven build instructions in the readme. Basically cd maven mvn install

Use jdk8 or jdk11

Then create a test project using start.codenameone.com

And change the cn1.version and cn1.plugin.version properties to 8.0-SNAPSHOT

Hi, I finally got it working, but I had to do little changes all over the maven configurations. I committed my changes as #3509 , maybe they might be useful to someone.

Could you maybe give it a look to check that I didn't completely ruin something? Thank you.

@shannah
Copy link
Collaborator

shannah commented Oct 7, 2021

Thanks for the PR. I've added some comments there and requested a couple of changes.

@shannah shannah closed this as completed Oct 7, 2021
Codename One automation moved this from To do to Done Oct 7, 2021
@Double-A-92
Copy link
Contributor

My PR didn't actually solve this issue, just the issue of not being able to use maven.
I assume this issue could have stayed open?

@shannah shannah reopened this Oct 7, 2021
Codename One automation moved this from Done to In progress Oct 7, 2021
@Double-A-92
Copy link
Contributor

Unfortunately the old commented out code doesn't work anymore because of missing javafx dependencies. I read here that it has been replaced by JCFE.

Are there any examples of the new way to create a "web view" panel somewhere in the code? The old code basically created a website which loaded Google Maps, and then just displayed that inside JFXPanel.

@shai-almog
Copy link
Collaborator Author

See the code here: https://github.com/codenameone/CodenameOne/tree/master/Ports/JavaSE/src/com/codename1/impl/javase/cef It's mostly @shannah who worked on it so I can't point at a specific block of code

@Ranzeb
Copy link

Ranzeb commented Aug 23, 2022

I am new to open-source contributions and I want to contribute. Can I contribute?

@Omkar2509
Copy link

Hello, I'm new to open source contribution. I want to get started with solving some sort of issues. Can you suggest me any other good first issue or should I work on this same issue only?

@shai-almog
Copy link
Collaborator Author

Sure. You can pick any issue you want. If it's marked as Good first issue it usually means we reviewed the issue and its:

  • Relatively simple
  • Isolated - so you don't need to know "everything" in order to work on it

You can also look through the issue database for things that spark your interest and ask about them.

@colinldbd
Copy link

Hi, I'm a new contributor and learning how to contribute to Open Source Project, can you assign this issue to me so that I can give it a try to solve this issue?

I'll follow the contribution guide carefully.

@anniepauline
Copy link

I'd like to take up this issue

@shai-almog
Copy link
Collaborator Author

@anniepauline yes. Sorry @colinldbd I missed your comment there, I'm assuming you moved on to something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-timers-only For first-time contributors good first issue Good for getting started Hacktoberfest Suitable for new contributor. Part of Hacktoberfest help wanted up-for-grabs For new contributors your-first-pr Make your first pull request
Projects
Codename One
  
In progress
Development

No branches or pull requests

8 participants