Last active
April 28, 2016 01:31
-
-
Save zhuzhe1983/6a80a7c1c4ede1a8ec0da85756b4a9d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('img').each(function(i,o){ | |
var src = $(o).attr('src'); | |
var arr_src = src.split('/'); | |
var z = arr_src[9]; | |
var y = arr_src[10]; | |
var x = arr_src[11]; | |
if( x && y && z ){ | |
src = "http://webrd03.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x="+x+"&y="+y+"&z="+z; | |
src = "https://b.tile.thunderforest.com/transport/"+z+"/"+x+"/"+y+".png" | |
src = "http://a.tile.openstreetmap.org/"+z+"/"+x+"/"+y+".png" | |
$(o).attr('src',src); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment