CodenameOne
CodenameOne copied to clipboard
Create an open street map location finder instead of the old google maps one
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.
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...
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
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 https://github.com/codenameone/CodenameOne/pull/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.
Thanks for the PR. I've added some comments there and requested a couple of changes.
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?
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.
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
I am new to open-source contributions and I want to contribute. Can I contribute?
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?
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.
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.
I'd like to take up this issue
@anniepauline yes. Sorry @colinldbd I missed your comment there, I'm assuming you moved on to something else.