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

Map is generated only in top, left corner of MapView in Java SDK 9 #36

Closed
JSzut opened this issue Apr 12, 2018 · 14 comments
Closed

Map is generated only in top, left corner of MapView in Java SDK 9 #36

JSzut opened this issue Apr 12, 2018 · 14 comments

Comments

@JSzut
Copy link

JSzut commented Apr 12, 2018

I found out that map is generated only in top, left corner of the whole MapView after switching into Java 1.9. In Java 1.8 works fine. How to solve it?
obraz

@sothawo
Copy link
Owner

sothawo commented Apr 14, 2018

I suppose this is the known problem described here: https://www.sothawo.com/2018/02/mapjfx-problems/. I had this in different versions of Java 8 and 9, can you try Java 10?

probably duplicate of #29

@JSzut
Copy link
Author

JSzut commented Apr 15, 2018

I've just tried in Java 10 and problem is the same. I have even tried to create simple app just with MapView in Java SE 10, still the same:
obraz

@JSzut
Copy link
Author

JSzut commented Apr 15, 2018

Hence, looks like it is something more than Java version as it sometimes works (@sothawo case) and sometimes not (my case).

@sothawo
Copy link
Owner

sothawo commented Apr 16, 2018

it does not always work for me, as described in the linked issue on on my web site; this seems to be a connection issue from the webkit browser to the OSM maps; but this is deep in the native calls of webkit, where I have no access to.

I have no problems whatever when I am using Bing maps, whatever flavour.

And I have this problem when just browsing the OpenLayers demo with a JavaFX application using a WebView, so this is not only with my MapView.

So the best I can recommend at the moment is to get an API key for Bing Maps (https://www.microsoft.com/en-us/maps/create-a-bing-maps-key) and try this.

@JSzut
Copy link
Author

JSzut commented Apr 16, 2018

I've tried Bing Maps and I am even more confused as they to not work neither (I've tried both aerial and roads):
obraz

@sothawo
Copy link
Owner

sothawo commented Apr 16, 2018

that is strange, can you share the code of your sample app, so I might try it on my machine?

@JSzut
Copy link
Author

JSzut commented Apr 16, 2018

@sothawo I've just added you to the repo with my app. I set the OSM map, but feel free to edit it for Bing maps. Please, let me know, if it works for you.

@sothawo
Copy link
Owner

sothawo commented Apr 16, 2018

image

forked it (could not clone), opened in IntelliJ and ran it using JDK 10.

I hate unreproducible erros. So this leaves me clueless at the moment

@JSzut
Copy link
Author

JSzut commented Apr 16, 2018

I hate them too. I will try to run it on Linux and maybe few more machines. I will give you a further feedback tomorrow. Thank you for your outstanding commitment.

@JSzut
Copy link
Author

JSzut commented Apr 25, 2018

With some delay but I'm back with quite interesting fact that map is generated properly on Linux machine. Looks like some weird platform-specific issue. I have to try on some other Windows.

@sothawo
Copy link
Owner

sothawo commented Apr 26, 2018

I think this might quite well be possible, as WebKit is a native implementation which is called by the Java Runtime; thanks for the hint

@JSzut
Copy link
Author

JSzut commented Apr 26, 2018

Ok, I have just checked on different Windows machine and it works fine. Looks like my machine's WebKit problem. Do you know any way to reset/reinstall it fully?

@vewert
Copy link

vewert commented Sep 7, 2018

Thanks for your excellent work on this project, it looks perfect for an application I am creating.
When I tried using it, however, I am noticing this same problem. It seem like the tiles do load... but verrry slowly. I tried it on Window 10 and MacOS using Java8, both with the same results.

Just as a reference, the WebView I am using WebKit 605.1 (webView.getEngine().getUserAgent())

Since it seems like it might be a problem with WebKit, are there any other alternatives? I saw something about JxBrowser https://www.teamdev.com/jxbrowser, but don't know anything about it, just a thought.

Thanks again for your efforts!

@sothawo
Copy link
Owner

sothawo commented Sep 8, 2018

you might want try to contact Majid Hojati ( see #42 (comment)), this is a different issue, but he wrote that he switched to jxbrowser. I do not know, if he changed mapjfx to use jxbrowser or does uses jxbrowser without mapjfx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants