Stuck Getting Started Mapsforge

336 views
Skip to first unread message

Muhammad Babar

unread,
Sep 8, 2014, 3:09:48 AM9/8/14
to mapsfo...@googlegroups.com
Hey folks,

Decided to use MapsForge for my App but disappointed to see no Tutorial. I have copied all 8 jars i.e mapsforgecore-0.4.0.jar , map, android then i followed this https://code.google.com/p/mapsforge/wiki/GettingStartedMapView 

I can't extend my activity to MapActivity as it is not found inside any jar. Also i can't find the method mapView.setMapFile(new File("/sdcard/path/to/mapfile.map"));

Is there some thing i'm missing or just get to the wrong page?

Guys please i need quick help.

Regards & Thanks for reading this
Muhammad Babar

Emux

unread,
Sep 8, 2014, 3:21:10 AM9/8/14
to mapsfo...@googlegroups.com
That's an old deprecated tutorial.
The new tutorial resides in this Wiki page:
https://code.google.com/p/mapsforge/wiki/GettingStartedAndroidApp

Also you need only these jars:
mapsforge-core
mapsforge-map
mapsforge-map-reader
mapsforge-map-android
svg-android

--
Emux
Cruiser - Atlas

Muhammad Babar

unread,
Sep 8, 2014, 3:43:18 AM9/8/14
to mapsfo...@googlegroups.com
Emux thanks for quick response. Going to try it out now.

AndroidUtil.createTileCache
this create a memory cache right!

Also the mapsForge is a total offline map rendering library right! or does it also work with online maps?

Emux

unread,
Sep 8, 2014, 3:48:02 AM9/8/14
to mapsfo...@googlegroups.com
Mapsforge is primary an offline map library.

But additionally it can also work with online tile providers (e.g. Mapnik).
After the introductory Wiki, you can find many examples at the Samples app.

Muhammad Babar

unread,
Sep 8, 2014, 3:54:31 AM9/8/14
to mapsfo...@googlegroups.com
Thanks for extending my knowledge. Any way i'm always a fan of offline libraries.

Also i tried to clone the git but it seems like something wrong an error pops up and failed i copied this https://code.google.com/p/mapsforge/ in GIT-GUI but no success.

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/540D5F2D.6070904%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

Emux

unread,
Sep 8, 2014, 3:58:19 AM9/8/14
to mapsfo...@googlegroups.com
There are some problems checking out the code from the Google repository with git > 1.7.2

We keep always synchronized a clone repository at GitHub:
https://github.com/applantation/mapsforge

Muhammad Babar

unread,
Sep 8, 2014, 4:02:32 AM9/8/14
to mapsfo...@googlegroups.com
Oh that's great. i wish i could have found that at google code project

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 8, 2014, 4:03:56 AM9/8/14
to mapsfo...@googlegroups.com

Muhammad Babar

unread,
Sep 8, 2014, 4:06:07 AM9/8/14
to mapsfo...@googlegroups.com
Thanks mate. You didn't answered that 
AndroidUtil.createTileCache
this create a memory cache right!?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 8, 2014, 4:11:09 AM9/8/14
to mapsfo...@googlegroups.com
Yes that's creating the needed tile cache.
But it's actually a 2 level cache: a small fast in memory cache and a larger file tile cache.

Muhammad Babar

unread,
Sep 8, 2014, 5:47:36 AM9/8/14
to mapsfo...@googlegroups.com
Thanks


--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 5:53:37 AM9/8/14
to mapsfo...@googlegroups.com
Whats the easiest way to load up java docs in the code and where to look for javadocs?
Message has been deleted

Emux

unread,
Sep 8, 2014, 6:03:19 AM9/8/14
to mapsfo...@googlegroups.com
The java doc are here: http://mapsforge.org/docs

How to link the docs with the code depends on your IDE options.
Usually you can link the library jars with a site / jar / zip containing the java doc.
You can even link the sources jar / zip from where also the docs can be viewed by the IDE.

Muhammad Babar

unread,
Sep 8, 2014, 6:08:02 AM9/8/14
to mapsfo...@googlegroups.com
I'm using Eclipse with adt. i tried to link one of the jar i,.e core with the online url of the javadocs but it says it can't found index.html when i pressed validate!

On Mon, Sep 8, 2014 at 3:01 PM, Emux <deve...@gmail.com> wrote:
The java doc are here: http://mapsforge.org/docs

How to link the docs with the code depends on your IDE options.
Usually you can link the library jars with a site / jar / zip containing the java doc.
You can link even the source jar / zip from where also the docs can be viewed be the IDE.

--
Emux
Cruiser - Atlas

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 6:09:48 AM9/8/14
to mapsfo...@googlegroups.com
jar seems to be a nice option where can i find it

Thanks a million

Muhammad Babar

unread,
Sep 8, 2014, 6:16:21 AM9/8/14
to mapsfo...@googlegroups.com
Tile cache must be null! is providing tile cache is necessary? Ain't it work without Cache (Just Testing)!!
Message has been deleted

Emux

unread,
Sep 8, 2014, 6:20:12 AM9/8/14
to mapsfo...@googlegroups.com
I don't think we provide the docs in archive format, probably we should.
Maybe there is an Eclipse plugin for Doxygen.
Or you can try linking the src zip? (you can download it from google code or github).

Muhammad Babar

unread,
Sep 8, 2014, 6:26:40 AM9/8/14
to mapsfo...@googlegroups.com
i guess i need to convert all the source files into jar then connect it to the libraries i.e jars

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 8, 2014, 6:28:29 AM9/8/14
to mapsfo...@googlegroups.com
Why the need for not cache?
The rendering of the maps is performed live on the device, so it's strongly recommended to follow the proposed procedure for the app life cycle.
Though you can use only memory cache, that's cannot be large.

Emux

unread,
Sep 8, 2014, 6:30:49 AM9/8/14
to mapsfo...@googlegroups.com
Eclipse accepts also zip, try connect the same zip to the libs.

Muhammad Babar

unread,
Sep 8, 2014, 6:30:51 AM9/8/14
to mapsfo...@googlegroups.com
Yes i reckon that i was just playing it with and though there might be some mechanism within the library that can request memory if no cache is available.

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 6:34:01 AM9/8/14
to mapsfo...@googlegroups.com
I just loaded up a map and quite impressed with the result so far thanks MapsForge Community for making such nice Rendering Library. I wish i could find some easy way to integerate GraphHopper on top of it.

Thanks
Emux

Muhammad Babar

unread,
Sep 8, 2014, 6:39:34 AM9/8/14
to mapsfo...@googlegroups.com
I notice some flicker and flashing on map. Is it a known issue or just me?

Emux

unread,
Sep 8, 2014, 6:40:04 AM9/8/14
to mapsfo...@googlegroups.com
There are many ways to accomplish that, one of them is at sample app on Peter's site.
https://github.com/graphhopper/graphhopper/tree/master/android

Emux

unread,
Sep 8, 2014, 6:43:55 AM9/8/14
to mapsfo...@googlegroups.com
It's a known issue.
You can turn hardware acceleration off in the manifest or only for the map view (depends on api level).
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
    mapView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

Muhammad Babar

unread,
Sep 8, 2014, 6:47:19 AM9/8/14
to mapsfo...@googlegroups.com
So you mean connect the whole zip i.e mapsforge-master.zip as the javadoc for each lib?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 6:49:26 AM9/8/14
to mapsfo...@googlegroups.com
Well thanks for that actually few months ago i tried GraphHopper but just couldn't get pass it was so difficult i never understand this maven. Its seems like Krausell just added the demo project latest.

Emux

unread,
Sep 8, 2014, 6:50:13 AM9/8/14
to mapsfo...@googlegroups.com
Yes, it actually contains the source, but IDEs can show javadoc also from those archives.

Muhammad Babar

unread,
Sep 8, 2014, 6:54:01 AM9/8/14
to mapsfo...@googlegroups.com
Yes you are right java-docs should works as i can see comments in the source code.

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 6:57:41 AM9/8/14
to mapsfo...@googlegroups.com
i added the zip as both source and javadocs on the javabuild path but no luck :(

Emux

unread,
Sep 8, 2014, 7:02:48 AM9/8/14
to mapsfo...@googlegroups.com
It's not necessary to add the zip as doc.
Only as 'external file' in the 'source attachment' should work.

Muhammad Babar

unread,
Sep 8, 2014, 7:13:14 AM9/8/14
to mapsfo...@googlegroups.com
yes i do the external file thing there are two options for any library source or docs.

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 7:15:19 AM9/8/14
to mapsfo...@googlegroups.com
I even converted the source to jars and then added it but still not working

Emux

unread,
Sep 8, 2014, 7:18:04 AM9/8/14
to mapsfo...@googlegroups.com
That's strange, I just downloaded the zip from github, attached to mapsforge jar as source and the docs work, even the 'open declaration' (F3).

Emux

unread,
Sep 8, 2014, 7:20:46 AM9/8/14
to mapsfo...@googlegroups.com
You have to get the same version for the source zip that the jars are.

Muhammad Babar

unread,
Sep 8, 2014, 7:42:53 AM9/8/14
to mapsfo...@googlegroups.com
 I just downloaded the zip from github, attached to mapsforge jar as source and the docs work

You mean with all the jars i.e mapsforge-core, -map, -android etc?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 7:43:33 AM9/8/14
to mapsfo...@googlegroups.com
my lib jars are 0.4.0 so do i guess the github source version is? Ain't it?

Emux

unread,
Sep 8, 2014, 7:45:16 AM9/8/14
to mapsfo...@googlegroups.com
Yes all.
Latest release is 0.4.3 download those jars and source.
https://github.com/applantation/mapsforge/releases/tag/0.4.3

Muhammad Babar

unread,
Sep 8, 2014, 7:47:50 AM9/8/14
to mapsfo...@googlegroups.com
Thanks i think you should announce on google code that you are migrated to Github. Or remove the depreciated things from the docs over google code. 

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 7:50:11 AM9/8/14
to mapsfo...@googlegroups.com
But that's just the source code there are no jars?

Emux

unread,
Sep 8, 2014, 7:52:37 AM9/8/14
to mapsfo...@googlegroups.com
The GitHub repository is just a clone repository (maintained only for the git issue).
We have not migrated to GitHub yet, all mapsforge functionality still exists at Google Code (Issues list, Wiki etc).

The old Wiki pages do not exist at main Wiki page - and are marked with instructions about their deprecated state.

Emux

unread,
Sep 8, 2014, 7:54:44 AM9/8/14
to mapsfo...@googlegroups.com

Muhammad Babar

unread,
Sep 8, 2014, 8:57:59 AM9/8/14
to mapsfo...@googlegroups.com
Do you guys make the libs.jar with jar cf command on the source of the respective library?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 8, 2014, 9:07:38 AM9/8/14
to mapsfo...@googlegroups.com
I have followed exactly as you told downloaded the 0.4.3 version lib and link the source of each library with the mapsforge-0.4.3.zip. Restarted eclipse no luck. Did you also attached the source zip as doc?

Emux

unread,
Sep 8, 2014, 9:13:11 AM9/8/14
to mapsfo...@googlegroups.com
No I attached the source zip to the source of each jar and it worked.

Muhammad Babar

unread,
Sep 9, 2014, 12:51:13 AM9/9/14
to mapsfo...@googlegroups.com
I just reference source from some other folder? I don't think it would be a problem. Or do i need to copy it inside lib?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 9, 2014, 1:03:21 AM9/9/14
to mapsfo...@googlegroups.com
Inline image 2Inline image 1

Emux

unread,
Sep 9, 2014, 1:55:49 AM9/9/14
to mapsfo...@googlegroups.com
That's the way I link the src zip with the jar libraries in Eclipse.
And it works with many other libs, not just with mapsforge.
Maybe you should search in Eclipse or dev forums for more info about the IDE settings.

Muhammad Babar

unread,
Sep 9, 2014, 1:58:36 AM9/9/14
to mapsfo...@googlegroups.com
Yes i know this mechanism work. i have did for so many other libraries but in that case they were jar or html files. but as you said zip also work so it should work may be some thing wrong in my adt. I'm very disappointed with the new adt by google. Looks like they have make it so sick intentionally to move developers to Android Studio. I hate Google.

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 9, 2014, 2:00:14 AM9/9/14
to mapsfo...@googlegroups.com
I think Mapsforge do have potential to compete Google maps but it needs a lot contribution and work from open source GIS workers.

Emux

unread,
Sep 9, 2014, 2:00:16 AM9/9/14
to mapsfo...@googlegroups.com
Try with a new Eclipse / ADT installation and with a new clean workspace, to see if the issue persists.

Muhammad Babar

unread,
Sep 9, 2014, 2:01:36 AM9/9/14
to mapsfo...@googlegroups.com
In maps forge do we have different layers like topo, Trafic, Satellite? i mean do these layers avaiables in Vector maps. Forgive my non sense i'm kinda new to Vector maps. Being a raster junky in the past ;)

Muhammad Babar

unread,
Sep 9, 2014, 2:03:05 AM9/9/14
to mapsfo...@googlegroups.com
Actually i'm in the middle of a project so can't afford new installation. But i'm sure that's some thing wrong with eclipse because i'm doing the way you do.

Emux

unread,
Sep 9, 2014, 2:08:19 AM9/9/14
to mapsfo...@googlegroups.com
A little off topic - but I don't think it's only Google Maps we should have in mind in the immediate future.
http://www.phonearena.com/news/Move-over-Google-Maps-Nokias-free-offline-navigation-coming-to-Android-and-iOS-before-year-end_id60149

In Mapsforge map files we can put anything we want, from official OSM data to any vector data we can use.
So there are not *official* layers, besides perhaps the original OSM vector data.
But as you can use also any raster online tile providers (even Mapbox), eventually you can expand the tile sources.

Muhammad Babar

unread,
Sep 9, 2014, 2:16:45 AM9/9/14
to mapsfo...@googlegroups.com
Yes you are right there are some other map rendering libraries that are tried which are actually too good. Nutiteq(not free), OsmDroid(Free & open source).

*In Mapsforge map files we can put anything we want, from official OSM data to any vector data we can use.
-> How can we put anything i mean i just downloaded the map file for pakistan from some online site (don't remember exactly). Can i edit the .map file now?

*So there are not *official* layers, besides perhaps the original OSM vector data.
->Do osm provide vector data i thought osm was raster only?

*But as you can use also any raster online tile providers (even Mapbox), eventually you can expand the tile sources.
->I love the styling of Mapbox Layers but unfortunately mapbox data in not free. Is there any way we can get that data from some site and sore it locally to use. Also whats the way to overlay layers (most probably Raster) other than Vectors in MapsForge?

Thanks
Muhammad Babar

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 9, 2014, 2:26:16 AM9/9/14
to mapsfo...@googlegroups.com
Also i'm trying to clone Graphopper only android project. I'm enter this url https://github.com/graphhopper/graphhopper.git/android and also tried this one https://github.com/graphhopper/graphhopper/tree/master/android but error appears 

Can you please help?

Emux

unread,
Sep 9, 2014, 2:30:48 AM9/9/14
to mapsfo...@googlegroups.com
OsmDroid(Free & open source).

There is also the new Mapbox (Osmdroid fork).


-> How can we put anything i mean i just downloaded the map file for pakistan from some online site (don't remember exactly). Can i edit the .map file now?

No, the map files are optimized for rendering only, they are not editable and not for searching in them too.

But you can create a map file from original osm or from custom vector data.
For that you'll need to play with the mapsforge map writer.
You can read here a discussion about the creation of a custom map.


->Do osm provide vector data i thought osm was raster only?

Take a look at Geofabrik.


*But as you can use also any raster online tile providers (even Mapbox), eventually you can expand the tile sources.
->I love the styling of Mapbox Layers but unfortunately mapbox data in not free. Is there any way we can get that data from some site and sore it locally to use. Also whats the way to overlay layers (most probably Raster) other than Vectors in MapsForge?

(Mapbox data are not free)
In mapsforge you can use online tile providers, have a look at DownloadLayerViewer and DownloadCustomLayerViewer examples at Samples app.
You can use also locally stored raster tiles, TileStoreLayerViewer example.

Emux

unread,
Sep 9, 2014, 2:34:43 AM9/9/14
to mapsfo...@googlegroups.com
Clone the whole repository and inside it you'll find the android sample.
About GraphHopper questions, please have in mind also its mailing list.

Emux

unread,
Sep 9, 2014, 2:37:53 AM9/9/14
to mapsfo...@googlegroups.com
Proper Geofabrik link: http://download.geofabrik.de/

Muhammad Babar

unread,
Sep 9, 2014, 2:54:45 AM9/9/14
to mapsfo...@googlegroups.com

There is also the new Mapbox (Osmdroid fork).

-> How can we put anything i mean i just downloaded the map file for pakistan from some online site (don't remember exactly). Can i edit the .map file now?

No, the map files are optimized for rendering only, they are not editable and not for searching in them too.

But you can create a map file from original osm or from custom vector data.
For that you'll need to play with the mapsforge map writer.
You can read here a discussion about the creation of a custom map.

=>Yes i know a bit about osmosis it is used to extract different data from osm like pois and also converts dump to database file. So you mean i can use mapwriter extension with osmosis. Choose any layer for example CycleMap layer then convert it to .map file(it will be raster ofcourse) and then i can use that .map file in MapsForge using TileRendererLayer class. Right!!! and can i use that .map file for any other map library that supports .map format?

Take a look at Geofabrik.

You did linked the wrong site actually(you linked Mapbox sdk) but i read about Geofabrik its just awesome. but one problem the data is either .shp files or osm.pbf format. Do i again need to do the steps defined above to convert to .map (Just confirming).

Very Best Regards
You are just awesome Emux

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 9, 2014, 3:13:43 AM9/9/14
to mapsfo...@googlegroups.com
Mapsforge map writer is a plugin for Osmosis tool, so we have to use what osmosis can read e.g. vector data in osm (xml) or pbf (binary) formats (not raster maps). Then the conversions creates the map files.

Muhammad Babar

unread,
Sep 9, 2014, 3:19:20 AM9/9/14
to mapsfo...@googlegroups.com
So its means that in vector map data its not possible to have different map layers like Cycle, Transport etc?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 9, 2014, 3:26:12 AM9/9/14
to mapsfo...@googlegroups.com
In latest version of render theme specification (render theme xml files describe how the map is rendered on screen) you can categorize the vector layers with tags, and select which category to be visible.

Muhammad Babar

unread,
Sep 9, 2014, 3:39:03 AM9/9/14
to mapsfo...@googlegroups.com
Thanks mate for such worthy help in two days i just understand alot of GIS aspects as each mail of your's is bundled with new thing that make me to search on it. Now i have  more understanding of how Vector map works SVG is the key player of vector data. I also have understanding that offline and online raster data can also be used with Mapsforge which really make it Heavy weight library. I wish to see MapsForge get more popular as from now i will suggest it to every one. Also i'm making my current app with mapsforge + graphhoper.

All the very best to you. May God Bless you.

P.S: May be i disturb you again if i find any problem in MapsForge ;)

Warm Regards
Muhammad Babar

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 9, 2014, 6:53:48 AM9/9/14
to mapsfo...@googlegroups.com
This is the Graphopper mailing addres  graph...@openstreetmap.org right!. i have asked them there but no answer. Do you know about the problem that Graphhopper can't import. I have converted the core into jar and copied it inside my lib folder but no success.
graphpoper.png

Emux

unread,
Sep 9, 2014, 7:17:19 AM9/9/14
to mapsfo...@googlegroups.com
I follow GraphHopper mailing list and saw your message.
I answered there.

Muhammad Babar

unread,
Sep 10, 2014, 5:57:52 AM9/10/14
to mapsfo...@googlegroups.com
Why mapView.getMapZoomControls().setZoomLevelMin((byte) 10); takes byte its Java not C? it should be taking integer?

I pass it 0 and app crashes?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 10, 2014, 6:04:37 AM9/10/14
to mapsfo...@googlegroups.com
We try to use the least possible types for each scope.
Java / Android had always the byte type and it seems appropriate for zoom levels which have limited values.

Muhammad Babar

unread,
Sep 10, 2014, 6:08:21 AM9/10/14
to mapsfo...@googlegroups.com
ok how do we classify these values i mean does it mean 10 bytes = zoom level 10?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Emux

unread,
Sep 10, 2014, 6:14:17 AM9/10/14
to mapsfo...@googlegroups.com
No bytes, the Byte class.

Muhammad Babar

unread,
Sep 10, 2014, 6:20:44 AM9/10/14
to mapsfo...@googlegroups.com
Pardon i ain't get you?

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 10, 2014, 6:46:44 AM9/10/14
to mapsfo...@googlegroups.com
What i mean to ask how do i know if i want to achieve a 5 level zoom what byte value should i pass in?

Emux

unread,
Sep 10, 2014, 6:51:12 AM9/10/14
to mapsfo...@googlegroups.com
The byte is a primitive type, like the int, double etc.
Zoom level 5 is byte value 5 (don't confuse it with bits and bytes).

You should also check the GettingStartedAndroidApp and the Samples app for understanding how the library works.

Muhammad Babar

unread,
Sep 11, 2014, 5:53:57 AM9/11/14
to mapsfo...@googlegroups.com
Hey today i'm very happy i have successfully integrated MapsForge and Graphhopper in my app. Thanks for your support.

Muhammad Babar

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 11, 2014, 6:57:36 AM9/11/14
to mapsfo...@googlegroups.com
Emux does the .map file is a vector maps? How do differentiate between Raster and Vector by just looking at them?

Emux

unread,
Sep 11, 2014, 7:09:33 AM9/11/14
to mapsfo...@googlegroups.com
Mapsforge's map files are vector maps which live render on the device screen.

Raster maps are images, usually 256x256 pixels in png / jpg format, that compose a map view. So they are quite big for having them offline and better served via online tile providers which host the tiles and send them to clients.

Vector maps are small map structures (mapsforge popular format is one of them) that contain the original vector data in them and the production and rendering of the map tiles is taking place on the viewer.

Muhammad Babar

unread,
Sep 11, 2014, 7:14:48 AM9/11/14
to mapsfo...@googlegroups.com
Thanks for detailed information. I was just zooming in the maps and the tiles are just disappearing and appearing like Raster maps so that get me in doubt about may be they are Raster.

Another i have a understanding (correct me if wrong). That like raster maps vector maps are also render to screen in form of pixels(bitmaps). I a pinch zoom and hold it i can see that the images are stretching. I know Vector maps are render as SVG(Scaleable Vector Graphics).

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

Muhammad Babar

unread,
Sep 11, 2014, 7:19:00 AM9/11/14
to mapsfo...@googlegroups.com
Also whats the way to rotate the map with two fingers?

Emux

unread,
Sep 11, 2014, 7:28:57 AM9/11/14
to mapsfo...@googlegroups.com
Maybe we should start another topic for technical info, this is already quite long!
A friendly proposal, I understand your will for learning the library concepts, but please try to collect the issues together, so that people who are following this mailing list are not getting many consecutive emails.

Mapsforge mechanism is actually creating bitmap tiles (of variable size depending on device dpi) from the vector data and render them at the map view.
The form of vector maps render differs by the engine, e.g. OsmAnd has a different render style.
The stretching you see is the scaling of the current viewable tiles until the new one to render.
SVG tehcnology is used in Mapsforge for symbol icons (you can use png or svg).

Emux

unread,
Sep 11, 2014, 7:30:43 AM9/11/14
to mapsfo...@googlegroups.com
Also whats the way to rotate the map with two fingers?

Unfortunately Mapsforge currently does not support map rotation.
A rough solution is to rotate outside the whole map view but that means that everything inside it (e.g. labels) will rotate too.

Muhammad Babar

unread,
Sep 11, 2014, 8:30:19 AM9/11/14
to mapsfo...@googlegroups.com
Thanks Emux i will/am following your advise.

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/0RXwr0mjfIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages