opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
237 stars 176 forks source link

vtm ios #101

Open Guti opened 9 years ago

Guti commented 9 years ago

Hi! I love vtm

I've tried vtm-ios and robovm without success.

[debug] IOSApplication: resumed
java.lang.UnsatisfiedLinkError: com.badlogic.gdx.backends.iosrobovm.IOSGLES20.glViewportJni(IIII)V
    at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.glViewportJni(Native Method)
    at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.glViewport(IOSGLES20.java)
    at com.badlogic.gdx.backends.iosrobovm.IOSGraphics.draw(IOSGraphics.java)
    at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.draw(IOSGraphics.java)
    at org.robovm.apple.uikit.UIView.$cb$drawRect$(UIView.java)
    at org.robovm.apple.uikit.UIApplication.main(Native Method)
    at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
    at org.oscim.ios.RobovmLauncher.main(RobovmLauncher.java)

Is it possible to create vtm-ios in static library?

http://stackoverflow.com/questions/25019762/create-ios-static-library-from-robovm-project-bad-access-in-jni


I have also converted the java code to objective c with j2objc: added.. /vtm /vtm-themes remove okhttp and org.slf4j.LoggerFactory references

and the results: Translated 207 files: 0 errors, 0 warnings

afterwards I modified GLMatrix.m

But I have no knowledge in OpenGL.

this is the xcode project:

https://www.dropbox.com/s/vcl2mqu57d41lhw/OscimMap.zip?dl=0

hjanetzek commented 9 years ago

Frankly, dont try the vtm-ios stuff unless you are experimenting just for fun :) I got it run once a while ago and what worked then might not work out of the box anymore.

Though the link error looks rather like you are missing the native libs from vtm-ext-libs repository. check that you have the git submodules checked out.

hello-willy commented 9 years ago

Ohooooo, my error is ClassNotFoundException, but the class is com.android.okhttp.HttpHandler??why??the okhttp had been removed. can you help me hjanetzek??

Longri commented 8 years ago

Here, the native libraries are not loaded for iOS!

In the fork from Mapsforge I reworked vtm-iOS and it runs very well on an iPhone 4S!

You can see my changes in PR https://github.com/mapsforge/vtm/pull/28!