saex wrote:
> 0 down vote favorite
> share [fb] share [tw]
>
>
> I'm trying to display locally stored maps with a api to show maps.
>
> I need to know the string path to a map file stored on drawable
> folder, because i'm using a map api that needs to receive a string
> path, and my maps must be stored drawable folder (assets folder can't
> be used for this because the maps are higher than 1MB)
>
> This is the code i'm trying, but this code is incorrect because the
> map is not being displayed:
>
>         MapView mapView = new MapView(this);
>         mapView.setClickable(true);
>         mapView.setBuiltInZoomControls(true);
>         String mapName="bremen";
>         String fileName = "android.resource://" +
> this.getPackageName() + "/drawable/"+mapName;
>         //mapView.setMapFile("/sdcard/path/to/mapfile.map");
>         mapView.setMapFile(fileName);
>         setContentView(mapView);
>
> Wich is the correct string path file to the file bremen.map stored on
> my drawable folder?
>
> Thanks

you need to copy your file (bremen.map) to sdcard and use the full
path when calling setMapFile()

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to