Hi friends, I’m newbie, and I haven’t idea of how make a sample with osm in eclipse.
I need test osm in android device, and for this I’ve eclipse…but I don’t know how start…I’ve searched in internet but didn’t find anything…I’ll be very grateful if you pass me any link with tutorials…
For starting, what I need, is know how install osm in eclipse, in order to know it, in order to test it in android.
Later, I’ll need to know about things like: locate users (draw points in the map), draw routes given two coordinates, interact with divs…this is possible? I hope that yes…
How good is your Java knowledge? Sounds like “absolutely nothing”. Eclipse is a Java IDE and can be used in conjunction with ADT (Android Development Tools) for Android development. To use data from OSM in Android there’s a free library: mapsforge. It can be used to display online tiles as well as offline vector maps (converted with a filter for osmosis). But this requires a lot of Java knowledge and I’m not sure if you are able to do what you have planned.
I’m new to this too
I start today on doing something like you, for now i’m having the same problem. But for now i’m only trying examples that i found online.
I apreciate the help if anyone can give some hints.
I will probably use the mapnik to render the imgs, i already try to export the map for my city in the osm site, in the export option, but the result is not what i was expeting, only a few imgs is downloaded with a very smal size of bits.
For now i’m only trying the get the map with diferent lod’s and representing them on my android app.
The installation is not very difficult, here are the things you are required :
Java - 1.6, 1.7 (compile target is 1.6!)
Eclipse - 3.3, 3.4, 3.5 (version is undefined, newer the better)
Android SDK + android eclipse plugin
Optionally Andriod NDK (native code)
EGit - git plugin for eclipse (can not do everything yet)
Downloads : tile maps, osm (osm.bz2) vector map depends on the area you want to work to. For country Belarus (Minsk) you can download directly from the “downloads”
Java is required 1.6 (you can download from jdk6.dev.java.net - download jdk to get source for base java classes
Android SDK is required developer.android.com/sdk/installing/index.html (You will be required for 2 versions 1.6 & 2.2)
(Optional) Android NDK is required if you want to change and compile native code (http://developer.android.com/tools/sdk/ndk/index.html
Eclipse you can download eclipse.org/downloads- ! run the eclipse with more memory, 32 bit around 512MB, 64 bit around 1GB. Android tools take lot of memory to compile the project !
You will need eclipse android plugin developer.android.com/tools/sdk/eclipse-adt.html
Optional you can install EGit, git plug-in for eclipse eclipse.org/egit/. Or you can stick with some other git tool
To see results how you are working you also need map data :
To create tile maps you can use (MobileAtlasCreator) : create tiles for OSMtracker tile storage (now ‘Mapnik’ as source map is hardcoded), please use it.
You can find osm map for country through special sites. You can download small part of osm for town through JOSM (as example)
You also can use internet : both swing application & android application can download tiles by itself from internet.
Install repo utility.
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Check out the project from repository.
$ repo init -u git://github.com/osmandapp/OsmAnd-manifest.git
$ repo sync
You can make your fork on github and work with it and do pull-requests to publish your work in OsmAnd’s repository.
Import OsmAnd (from /platforms/android) and OsmAndMapCreator (from /tools/) and OsmAnd-java (from /core/) projects from into eclipse (do not copy them to workspace). See plugins directory, where can be some plugin projects you can contribute to.
Make sure that eclipse android plugin refers to android sdk path (Preferences → Android → SDK)
(Optional, should work out of box) Check external folder in OsmAnd project : specify that use refers to OsmAnd-java/src (use path variable to have common version in reposititory).
Try to compile all projects to get rid of the errors or try to run Ant script alternatively.
Configure local.properties (look at sample file) in OsmAnd project in order to run OsmAnd\build.xml. Run Ant file OsmAnd\build.xml and get OsmAnd-debug.apk ready.
You can run OsmExtractionUI.class and it is OsmAndMapCreator
If you want to enable logging - do not forget to put Java VM arg -Djava.util.logging.config.file=logging.properties
After that you can try to run Swing (standalone) application to see whatever result.
If you did all, possibly you installed development environment on your machine.
I used some mapsforge converted vector maps and I want to edit them. Is it possible? What editor do I need, JOSM?
Sorry, may be it is not the right place to ask this question but I could not find any other…