How to use on android

Topics: General, Help
Jun 4, 2013 at 10:39 PM
Hi Radioman,
I'm using your magic project since 2 years now ... and thanks for the nice job and the excellent support as well.

Forgive me for this question , but Can I use it with Android ?. Do you have an android sample ?.

Jun 5, 2013 at 7:38 AM
Jun 19, 2013 at 9:44 PM
Hi Radioman,

Thanks for your time to make us enjoy this great tool on Android too. (and thanks for support too :) )

Regarding android , I have installed the apk program to my Samsung Tab2 , tablet , the application runs great , but it display a white page with the following text

The webpage at file:///mnt/sdcard/GreatMaps/gmap.html might be temporarily down or it may have moved permanent to a new web address.
-make sure you have a data connection
  • Reload this webpage later
  • Check the address you entered.
I have copied the *.gmdb file to this folder on the tablet , but still the same message appear. Do I need to convert these files to html ? how.
Can I use my gmdb file generated by my PC using your winform demo application by exporting cache.

Jun 20, 2013 at 7:50 AM
create folder on sdcard: GreatMaps
copy there:
  • GMap.NET\Java\TileHost\gmap.html and leafletjs dependencies from References\Web\LeafletJS
  • Data.gmdb
    Enjoy ;}
Jun 20, 2013 at 10:45 PM
I have copied these files to the GreatMaps folder. When I open the application , it displays an empty white page !.
An advice.

Again the GreatMaps folder contains the following files

and the following folder Images that contains the following files
marker-icon@2x. marker-shadow.png spinner.gif P.S. Thanks so much for your great support , and sorry for my silly question.

Jun 21, 2013 at 8:00 AM
edit gmap.html and you'll see where the files from leaflet should be
Jun 22, 2013 at 11:32 AM
Dear Radioman,

I have checked the gmap source, it is as follows:
<link rel="stylesheet" href="../../References/Web/LeafletJS/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="../../References/Web/LeafletJS/leaflet-ie.css" />
<link rel="stylesheet" href="../../References/Web/LeafletJS/locate-ie.css"/>
<link rel="stylesheet" href="../../References/Web/LeafletJS/mobile.css" />
<link rel="stylesheet" href="../../References/Web/LeafletJS/locate.css" />

<script src="../../References/Web/LeafletJS/leaflet.js"></script>
<script src="../../References/Web/LeafletJS/proj4js-compressed.js"></script>
<script src="../../References/Web/LeafletJS/proj4leaflet.js"></script>
<script src="../../References/Web/LeafletJS/locate.js" ></script>
This means that these files should be into 2 levels up of the GreatMaps folder "../../" on the SD Card. How.
I have made these files on my windows PC , I created a folder , and copied the gmap.html file, when open the html file , it shows empty page as on my tablet. I copied the "Reference" folder to the same folder of the gmap.html , it is the same. When I moved the "Reference" folder 2 folders up , then open the gmap.html , it now shows the nice arrow with tooltip , but No map. the HTML page also shows a message "connecting to local host" many times then disappear. and still No map. I think it is searching for the *.gmdb: file.

I appreciate if you can just make simple notation of the GreatMaps Folder structure.
--------- Also , please be patient :}
Thanks for thinking to convert this great library to Android.

Jun 22, 2013 at 12:21 PM
i give up ;]
Jun 22, 2013 at 1:29 PM
You mean to close this issue. I know that you've fed up with those simple question (like mine).
Anyway , thanks for your time, support and this great control

Jun 22, 2013 at 1:48 PM
../../References/Web/LeafletJS/locate.js => LeafletJS/locate.js

copy & paste whole LeafletJS, very difficult ;}
Jun 22, 2013 at 4:28 PM
it gives the same blank image.
here is the final folder structure

-----leafletjs Folder

again , shows empty webpage.

Jun 22, 2013 at 4:53 PM
works fine for me ;}
Jun 22, 2013 at 4:55 PM
last try , can you please send me zip file with the directory that contains all the files and the gmdb.
Jun 22, 2013 at 6:22 PM
Edited Feb 20, 2014 at 3:53 PM
Feb 20, 2014 at 3:40 PM
Hi radioman
I am new to the world of Android, but have been asked to do a simple app for Android for which I would very much like to use GMaps. Unfortunately the reference you give above no longer works. Could you please let me know where I can find a sample project.
Also... bear with me... how do I do the development? Do I do a project under Visual C# or do I need a who;e new development environment to do am app for Android?
Feb 20, 2014 at 3:59 PM
check google, anyway the source is in the same place, /Java/Android, you need android sdk for dev

basically it's leafleft in web browser control serving tiles using local http server and tile cache db
Jul 23, 2014 at 3:10 PM
Hi every body.
I used with C# and it works perfect. Now i need to use it in an android application. I found the apk mentioned above but I could not find the source of an example how to use this library for android application. Can you put the source of the example for download?

Sep 5, 2014 at 11:42 PM
It's in the mercurial rep
Nov 25, 2014 at 4:26 PM
..i've just tested it on nexus7, works fine, again steps to make it work:

edit for your needs, build/rebuild the android app, export & install GMap.NET\Java\Android\build\GreatMaps.apk

create folder on device sdcard: GreatMaps
copy there
  • GMap.NET\Java\TileHost\ gmap.html
  • leafletjs dependency directory from References\Web\ LeafletJS
  • Data.gmdb with the prefetched maps
p.s. edit gmap.html for your needs, correct paths such as - "../../References/Web/LeafletJS/leaflet.css" => "LeafletJS/leaflet.css"
// according layers of your choosing should be in the cache file
var baseLayers =
    "OpenStreetMap": glayer1,
    "OpenCycleMap": glayer2,
    "YahooMap": glayer3,
    "Bing": glayer4
Enjoy ;}
Marked as answer by radioman on 11/25/2014 at 8:26 AM