File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -459,6 +459,21 @@ export async function parseSharedMapLinkAsync(
459459 console . info ( "[share.debug] parsed_from_consent_url" , parsedFromConsent ) ;
460460 return parsedFromConsent ;
461461 }
462+
463+ // Couldn't parse directly, fetch the extracted Maps URL to get coordinates from HTML
464+ console . info ( "[share.debug] consent_url_no_direct_coords_fetching" ) ;
465+ const extractedMapsText = await fetchMapPageText ( actualMapsUrl , options ) ;
466+ console . info ( "[share.debug] extracted_maps_text_length" , extractedMapsText ?. length ?? 0 ) ;
467+ const parsedFromExtractedText = parseGoogleCoordinatesFromText ( extractedMapsText ?? "" ) ;
468+ if ( parsedFromExtractedText ) {
469+ console . info ( "[share.debug] parsed_from_extracted_maps_html" , parsedFromExtractedText ) ;
470+ return {
471+ provider : "google" ,
472+ lat : parsedFromExtractedText . lat ,
473+ lon : parsedFromExtractedText . lon ,
474+ rawUrl : extracted ,
475+ } ;
476+ }
462477 }
463478 }
464479 }
You can’t perform that action at this time.
0 commit comments