0

I own a map that was created with an older version of maptiler that I published on one of my websites here: http://gta5online.com/map-interactive/ (just below the map you can see the link for fullscreen too)

Now I have the folder which includes different folders and files like map tiles, icons, infobox js file an .ai file, html link document (loads the map in default browser on click) and so on.

is there a easy way to open this map inside an app either by including the files or taking the info from the web page and loading it into the app. i would prefer the first option.

I searched but nothing like my situation was concrete enough for this task.

sorry I'm a noob.

Cherubim
  • 5,287
  • 3
  • 20
  • 37
serdox
  • 19
  • 10
  • What're those maps? HTML page or bare image? – frogatto Oct 31 '15 at 15:30
  • its made using map tiles and icons, js file, html document (opens page on default browser) – serdox Oct 31 '15 at 16:05
  • its basically a folder that you could move to another pc click the html document and it would open up the map inside a browser. load all files. no install needed. – serdox Oct 31 '15 at 16:09

1 Answers1

0

Its quite easy you can use webview Webview.loadurl()

For more detail how to display progress while loading a url to webview in android?

Nice website by the way

Community
  • 1
  • 1
Ashish Rawat
  • 5,541
  • 1
  • 20
  • 17
  • hey thanks for the answer. but does this webview function open the default browser on the phone or does the user stay inside the app? i would like it to be an app instead of just a browser link etc. is there a basic layout where i could insert the files and make it open inside a basic app using android studio? – serdox Oct 31 '15 at 15:04
  • you have both option, by default it open inside the app. You don't have to copy anything in mobile, just enable the cache and make your website based on responsive design. – Ashish Rawat Oct 31 '15 at 15:59
  • nah i need an standalone app. i would like to wrap up those files around the needed android (sdk?) files to publish it and with time adding a floating ad banner and a navigation with three different sections like map - icons - cheats. – serdox Oct 31 '15 at 16:14
  • Then you have to use webview with loaddatawithweburl and copy all your images and data in app folderhttp://developer.android.com/reference/android/webkit/WebView.html – Ashish Rawat Nov 01 '15 at 02:42
  • now i had copied the map folder into the project and all i have to do is to load that local html file from that folder into the main activity with webview i guess. do i need webview for this if the html document loads the files from inside the local map folder. i created a blank activity. – serdox Nov 01 '15 at 05:26
  • yes you can ! Also all your resources path has to be in relative to html path . – Ashish Rawat Nov 01 '15 at 06:13
  • path would be "interactive/map.html" – serdox Nov 01 '15 at 06:36
  • when i try to run the app it says it needs ca. 1500mb ram. the allocated is 1000mb only. – serdox Nov 01 '15 at 06:37
  • the app runs now but blank. does the map folder need to be in a specific place. i just copy paste it in the main app folder. – serdox Nov 01 '15 at 07:14
  • read this http://myexperiencewithandroid.blogspot.in/2011/09/android-loaddatawithbaseurl.html – Ashish Rawat Nov 02 '15 at 06:30
  • hey i tried some instructions. i created a new question: – serdox Nov 02 '15 at 14:43
  • http://stackoverflow.com/questions/33480171/errors-for-simple-webview-app-in-android-studio – serdox Nov 02 '15 at 14:44
  • can you see and help there please. – serdox Nov 02 '15 at 14:44