![]() # World size tiles for zoom 5, 512x512 are 17x15 "Converts pixel coordinates in given zoom level of pyramid to EPSG:900913" "Converts given lat/lon in WGS84 Datum to XY in Spherical Mercator EPSG:900913" paste( im, ( map_tile_width * x * tilesize_width, ( map_tile_height - 1 - y) *( tilesize_height - 100))) # Special usecase - add another line of tiles at the end for better world map editing paste( im, ( x * tilesize_width, ( map_tile_height - 1 - y) *( tilesize_height - 50 * scale))) #If you want to download all tiles manually crop(( 0, 0, tilesize_width, tilesize_height -( 50 * scale))) Url = '' + apikey + '&scale=' + str( scale) + '¢er=' + str( final_lat) + ',' + str( final_long) + '&zoom=' + str( zoom) + '&format=' + format_image + '&maptype=' + maptype + '&style=' + style + '&size=' + str( size_tile_x) + 'x' + str( size_tile_y) #Get coordinnates for next center of the mapįinal_lat, final_long = PixelsToLat( pixel_x + size_tile_x * x, pixel_y +(( size_tile_y - 50) * y), zoom) ![]() Pixel_x, pixel_y = LatLonToPixels( lat, lng, zoom) new( 'RGB', ( width_final, height_final)) Height_final = map_tile_height *( tilesize_height - 50 * scale) Width_final = map_tile_width *( tilesize_width + 1) #Special usecase add another line of tiles at the end for better world map editing Width_final = map_tile_width * tilesize_width # A script which when given a longitude, latitude and zoom level downloads aĭef generateImage( lat, lng, map_tile_width, map_tile_height, zoom, scale, apikey, format_image, maptype, style, size_tile_x, size_tile_y): ![]() # Based on older script by Hayden Eskriett
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |