javikr
javikr

Reputation: 87

How to use custom maps images in an iPhone app

I've searching about using custom maps (for example: a campus university map) in the iPhone App, using coordinates to get my actual position, etc.

I've found one way to do that: - Using de google code project: "Route-me" with the OpenStreetMap and map2sqlite.

The question is: ¿How I can put my own map layer (the campus university map, PNG file) into the World map to execute map2sqlite for getting the DB in the "route-me" project.

I've investigated into the OpenStreetMap site, but I didn't found the way to do that, only to add paths into the map, but not other image maps (tiles).

Thank you so much! Javier.

Upvotes: 1

Views: 1636

Answers (1)

MacTeo
MacTeo

Reputation: 2686

MapTiler is your friend, you will also need this little script to change tiles number and then pass everything to map2sqlite

for I in `find . -type f -maxdepth 3 -mindepth 2 -name *.png` 
    do OLDNAME=`basename $I .png` 
    DIRNAME=`dirname $I` 
    SEP1=${I#./} 
    SEP2=${SEP1%%/*} 
    NEWNAME=$((2**$SEP2-$OLDNAME-1)) 
    mv "$I" "$DIRNAME"/"$NEWNAME.png" 
done

then you can also compress the png images with pngcrush

Upvotes: 1

Related Questions