Skip to content

Instantly share code, notes, and snippets.

@gregrahn
Last active August 29, 2015 14:05
Show Gist options
  • Save gregrahn/16453e6cc314bbdd2f05 to your computer and use it in GitHub Desktop.
Save gregrahn/16453e6cc314bbdd2f05 to your computer and use it in GitHub Desktop.
download and merge all the tiles to make a high resolution LinkedIn InMap
# 1) get your inmap from http://inmaps.linkedinlabs.com/
# 2) zoom all the way in and note the url for the individual tiles (I used Charles Proxy to do this,
# but right/control-click, "Inspect Element", "Network" tab, then reload page, also works.)
# 3) download your tiles
# 4) merge the tiles into column-wise strips
# 5) merge the column-wise strips into the final high resolution image
# download the individual tiles
# my inmap happended to be 15 tiles wide and 12 tiles tall
# yours may vary in size so adjust accordingly
for c in {0..15}
do
for r in {0..12}
do
curl -ROL http://s3.amazonaws.com/linkedin_inmaps/<key>/map/map_files/12/${c}_${r}.gif
done
done
# append tiles into column-wise images using ImageMagick's convert tool
for i in {0..15}
do
echo $i
convert -append ${i}_0.gif ${i}_1.gif ${i}_2.gif ${i}_3.gif ${i}_4.gif ${i}_5.gif ${i}_6.gif ${i}_7.gif ${i}_8.gif ${i}_9.gif ${i}_10.gif ${i}_11.gif ${i}_12.gif c${i}.gif
done
# append column-wise images into high-res image
convert +append c0.gif c1.gif c2.gif c3.gif c4.gif c5.gif c6.gif c7.gif c8.gif c9.gif c10.gif c11.gif c12.gif c13.gif c14.gif c15.gif high-res-inmap.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment