Skip to content

Instantly share code, notes, and snippets.

@caiguanhao
Created March 20, 2014 11:58
Show Gist options
  • Save caiguanhao/9662204 to your computer and use it in GitHub Desktop.
Save caiguanhao/9662204 to your computer and use it in GitHub Desktop.
Styles values in Baidu Maps URL are meaningless and there are no docs about them. So you better guess them.
#!/bin/bash
mkdir -p m
for l1 in a b c d e f g h i j k l m n o p q r s t u v w x y z
do
for l2 in a b c d e f g h i j k l m n o p q r s t u v w x y z
do
echo -ne " Trying $l1$l2... \r"
curl "http://online$((RANDOM%9+1)).map.bdimg.com/tile/"\
"?qt=tile&x=12320&y=2567&z=16&styles=$l1$l2" -L -s -o m/$l1$l2.png
done
done
@caiguanhao
Copy link
Author

styles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment