1313
1414from lookaround .lookaround .auth import Authenticator
1515from lookaround .lookaround .geo import wgs84_to_tile_coord
16- from lookaround .lookaround import get_coverage_tile , fetch_pano_segment , get_pano_segment_url
16+ from lookaround .lookaround import _get_coverage_tile_raw_json , get_coverage_tile , fetch_pano_segment , get_pano_segment_url
1717
1818from util import CustomJSONEncoder
1919from geo import haversine_distance
@@ -70,7 +70,7 @@ def relay_road_tile(tint, z, x, y):
7070 url = auth .authenticate_url (
7171 f"https://cdn3.apple-mapkit.com/ti/tile?style=0&size=1&x={ x } &y={ y } &z={ z } &scale=1&lang=en"
7272 f"&poi=1&tint={ tint_param } &emphasis=standard" )
73- print (url )
73+ # print(url)
7474 response = requests .get (url )
7575 return send_file (
7676 io .BytesIO (response .content ),
@@ -91,8 +91,8 @@ def closest_pano_to_coord(lat, lon):
9191 if distance < smallest_distance :
9292 smallest_distance = distance
9393 closest = pano
94- print (x ,y )
95- return jsonify (closest )
94+ # print(x,y)
95+ return jsonify (date = closest . date , lat = closest . lat , lon = closest . lon , panoid = str ( closest . panoid ), region_id = str ( closest . region_id ), unknown10 = closest . unknown10 , unknown11 = closest . unknown11 , heading = closest . heading )
9696
9797
9898
@@ -102,6 +102,11 @@ def tile_of_coord(lat, lon):
102102
103103 return jsonify (x = x ,y = y )
104104
105+ @app .route ("/rawtile/<int:x>/<int:y>/" )
106+ def rawtile (x , y ):
107+ panos = _get_coverage_tile_raw_json (x , y )
108+
109+ return panos
105110
106111 @app .route ("/fullTileInfo/<int:x>/<int:y>/" )
107112 def full_tile_coverage_incl_neighbors (x , y ):
@@ -124,7 +129,6 @@ def relay_full_pano(panoid, region_id, zoom):
124129 image = None
125130
126131 TILE_SIZE = round (heic_array [0 ].width * (256 / 5632 ))
127- print ("TILE_SIZE:" , TILE_SIZE )
128132 WIDTH_SIZE = round (heic_array [0 ].width * (1024 / 5632 ))
129133 widths , heights = zip (* (i .size for i in heic_array ))
130134 total_width , max_height = (sum (widths )- WIDTH_SIZE ), max (heights )
@@ -148,7 +152,6 @@ def relay_full_pano(panoid, region_id, zoom):
148152
149153 @app .route ("/panodbg/<int:panoid>/<int:region_id>/<int:zoom>/" )
150154 def relay_pano_dbg (panoid , region_id , zoom ):
151- print ("Starting" )
152155 heic_array = []
153156 for i in range (4 ):
154157 heic_bytes = fetch_pano_segment (panoid , region_id , i , zoom , auth )
0 commit comments