chore: clean up test and scratch files

This commit is contained in:
ElPoyo
2026-06-05 15:04:18 +02:00
parent 671136ac4b
commit 9e3169b225
34 changed files with 0 additions and 20834 deletions
-45
View File
@@ -1,45 +0,0 @@
import 'dart:convert';
import 'dart:io';
import 'package:latlong2/latlong.dart';
import '../lib/utils/polyline_utils.dart';
void main() async {
final origin = "401 route du camping, 69850 Saint Martin en haut";
final destination = "Salle des fêtes, Orliénas";
final requestBody = jsonEncode({
"data": {
"origin": origin,
"destination": destination,
"vehicleTollCategory": 2
}
});
print("Fetching route...");
final request = await HttpClient().postUrl(Uri.parse('https://googlemapscomputeroute-iarazmuuzq-od.a.run.app'));
request.headers.set('Content-Type', 'application/json');
request.write(requestBody);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
print("Status: ${response.statusCode}");
try {
final json = jsonDecode(responseBody);
final routes = json['routes'] as List;
for (int i = 0; i < routes.length; i++) {
final polyStr = routes[i]['encodedPolyline'];
print("Route $i polyline length: ${polyStr.length}");
final pts = safeDecodePolyline(polyStr);
print("Route $i points decoded: ${pts.length}");
if (pts.isNotEmpty) {
print(" Start: ${pts.first.latitude}, ${pts.first.longitude}");
print(" End: ${pts.last.latitude}, ${pts.last.longitude}");
}
}
} catch (e) {
print("Error parsing: $e");
print(responseBody);
}
}
-34
View File
@@ -1,34 +0,0 @@
import 'dart:convert';
import 'dart:io';
void main() async {
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '');
}
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"origin": { "address": "Mon depot" },
"destination": { "address": "25 Imp. du Puits du Suc, Saint-Martin-en-Haut, France" }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
print(responseBody.length > 200 ? responseBody.substring(0, 200) : responseBody);
}
-101
View File
@@ -1,101 +0,0 @@
import 'dart:convert';
import 'dart:io';
// Test la route Saint-Martin -> Paris (autoroute avec péage)
// Pour vérifier que la polyline longue se décode correctement en Dart
void main() async {
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '').trim();
}
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"routeModifiers": { "avoidTolls": false },
"origin": { "address": "401 route du camping, 69850 Saint Martin en haut" },
"destination": { "address": "Paris, France" }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
final json = jsonDecode(responseBody);
final routes = json['routes'] as List;
final polyStr = routes[0]['polyline']['encodedPolyline'] as String;
final dist = routes[0]['distanceMeters'];
print('Distance: ${(dist/1000).round()} km');
print('Polyline longueur: ${polyStr.length} chars');
print('Polyline (50 premiers): ${polyStr.substring(0, 50)}');
// Décoder
final pts = _decodePolyline(polyStr);
print('Points décodés: ${pts.length}');
// Chercher les points invalides
var invalides = 0;
for (final pt in pts) {
if (pt[0].abs() > 90 || pt[1].abs() > 180) {
invalides++;
if (invalides <= 3) print(' *** INVALIDE: ${pt[0]}, ${pt[1]}');
}
}
if (invalides == 0) {
print('✅ Tous les ${pts.length} points sont valides WGS84');
print('Premier: ${pts[0][0].toStringAsFixed(5)}, ${pts[0][1].toStringAsFixed(5)}');
print('Dernier: ${pts.last[0].toStringAsFixed(5)}, ${pts.last[1].toStringAsFixed(5)}');
} else {
print('$invalides points invalides détectés');
}
client.close();
}
List<List<double>> _decodePolyline(String encoded) {
List<List<double>> poly = [];
int index = 0, len = encoded.length;
int lat = 0, lng = 0;
while (index < len) {
int b, shift = 0, result = 0;
do {
if (index >= len) break;
b = encoded.codeUnitAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0;
result = 0;
do {
if (index >= len) break;
b = encoded.codeUnitAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
lng += dlng;
double finalLat = lat / 1e5;
double finalLng = lng / 1e5;
poly.add([finalLat, finalLng]);
}
return poly;
}
-93
View File
@@ -1,93 +0,0 @@
import 'dart:convert';
import 'dart:io';
List<List<double>> decodePolyline(String encoded) {
List<List<double>> poly = [];
int index = 0, len = encoded.length;
int lat = 0, lng = 0;
while (index < len) {
int b, shift = 0, result = 0;
do {
if (index >= len) break;
b = encoded.codeUnitAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0;
result = 0;
do {
if (index >= len) break;
b = encoded.codeUnitAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
lng += dlng;
poly.add([lat / 1e5, lng / 1e5]);
}
return poly;
}
void main() async {
final origin = "401 route du camping, 69850 Saint Martin en haut";
final destination = "Salle des fêtes, Orliénas";
final requestBody = jsonEncode({
"data": {
"origin": origin,
"destination": destination,
"vehicleTollCategory": 2
}
});
// Since we don't have the auth token, let's bypass auth if possible, or just call Google Maps directly!
// Wait, I can't call Google Maps directly without API_MAPS key.
// I will read .env file.
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '');
}
}
if (apiKey.isEmpty) {
print("API_MAPS not found");
return;
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"origin": { "address": origin },
"destination": { "address": destination }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
try {
final json = jsonDecode(responseBody);
final routes = json['routes'] as List;
final polyStr = routes[0]['polyline']['encodedPolyline'];
print("POLYLINE_START");
print(polyStr);
print("POLYLINE_END");
} catch (e) {
print("Error: $e\n$responseBody");
}
}
-45
View File
@@ -1,45 +0,0 @@
const encoded = "qospGlrrB";
function safeDecodePolyline(encoded) {
let index = 0, len = encoded.length;
let lat = 0, lng = 0;
const poly = [];
while (index < len) {
let b, shift = 0, result = 0;
do {
if (index >= len) break;
b = encoded.charCodeAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
let dlat = ((result & 1) !== 0 ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0;
result = 0;
do {
if (index >= len) break;
b = encoded.charCodeAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
let dlng = ((result & 1) !== 0 ? ~(result >> 1) : (result >> 1));
lng += dlng;
poly.push([lat / 1e5, lng / 1e5]);
}
return poly;
}
const pts = safeDecodePolyline(encoded);
console.log("Decoded", pts.length, "points.");
for(let i=0; i<5 && i<pts.length; i++) {
console.log(pts[i]);
}
if(pts.length > 5) {
console.log("...");
for(let i=pts.length-5; i<pts.length; i++) {
console.log(pts[i]);
}
}
-79
View File
@@ -1,79 +0,0 @@
const fs = require('fs');
const https = require('https');
async function main() {
const env = fs.readFileSync('functions/.env', 'utf8');
const apiKey = env.split('\n').find(l => l.startsWith('API_MAPS=')).split('=')[1].replace(/"/g, '').trim();
const data = JSON.stringify({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"origin": { "address": "401 route du camping, 69850 Saint Martin en haut" },
"destination": { "address": "Salle des fêtes, Orliénas" }
});
const options = {
hostname: 'routes.googleapis.com',
path: '/directions/v2:computeRoutes',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Goog-Api-Key': apiKey,
'X-Goog-FieldMask': 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline',
'Content-Length': data.length
}
};
const req = https.request(options, res => {
let body = '';
res.on('data', d => body += d);
res.on('end', () => {
const json = JSON.parse(body);
const encoded = json.routes[0].polyline.encodedPolyline;
console.log("Encoded string length:", encoded.length);
// decode
let index = 0, len = encoded.length;
let lat = 0, lng = 0;
const poly = [];
while (index < len) {
let b, shift = 0, result = 0;
do {
b = encoded.charCodeAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
let dlat = ((result & 1) !== 0 ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0;
result = 0;
do {
b = encoded.charCodeAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
let dlng = ((result & 1) !== 0 ? ~(result >> 1) : (result >> 1));
lng += dlng;
poly.push([lat / 1e5, lng / 1e5]);
}
console.log("Decoded points:", poly.length);
for(let i=0; i<5; i++) console.log(poly[i]);
// Search for exploding coordinates
for(let i=0; i<poly.length; i++) {
if (Math.abs(poly[i][0]) > 90 || Math.abs(poly[i][1]) > 180) {
console.log("EXPLODED AT INDEX", i, "POINT:", poly[i]);
break;
}
}
});
});
req.write(data);
req.end();
}
main();
-36
View File
@@ -1,36 +0,0 @@
import 'dart:convert';
import 'dart:io';
void main() async {
final origin = "401 route du camping, 69850 Saint Martin en haut";
final destination = "652431, 6853241"; // Lambert 93 example
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '');
}
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"origin": { "address": origin },
"destination": { "address": destination }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
print(response.statusCode);
print(responseBody);
}
-35
View File
@@ -1,35 +0,0 @@
import 'dart:convert';
import 'dart:io';
void main() async {
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '');
}
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
// Test with origin = Lambert 93 coordinates
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"origin": { "address": "652431, 6853241" },
"destination": { "address": "Salle des fêtes, Orliénas" }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
print(response.statusCode);
print(responseBody);
}
-34
View File
@@ -1,34 +0,0 @@
import 'dart:convert';
import 'dart:io';
void main() async {
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '');
}
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"origin": { "address": "401 route du camping, 69850 Saint Martin en haut" },
"destination": { "address": "652431, 6853241" }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
print(responseBody);
}
File diff suppressed because one or more lines are too long
-144
View File
@@ -1,144 +0,0 @@
/**
* Test final :
* 1. 03003 → 03087 (tarif ?)
* 2. Google travelAdvisory.tollInfo pour Saint-Martin → Grenoble
* 3. Identifier pourquoi VOREPPE n'est pas détecté par Ulys
*/
const axios = require('axios');
const polylineLib = require('@mapbox/polyline');
const fs = require('fs');
const path = require('path');
let API_MAPS = '';
const envContent = fs.readFileSync(path.join(__dirname, '.env'), 'utf-8');
for (const line of envContent.split('\n')) {
const m = line.match(/^API_MAPS=(.+)/);
if (m) API_MAPS = m[1].trim().replace(/"/g, '');
}
async function testRate(vehicleCategory, tollPassages, label) {
try {
const res = await axios.post(
'https://api-ulys.azure-api.net/tollstation/v1/rate',
{ vehicleCategory: String(vehicleCategory), paymentOption: 2, tollPassages },
{ headers: { 'Content-Type': 'application/json' }, timeout: 8000 }
);
const data = res.data;
const total = Array.isArray(data) ? data.reduce((s, d) => s + (d.price || 0), 0) : 0;
const comment = Array.isArray(data) && data[0] ? (data[0].comments || []).join(', ') : '';
console.log(` [cl${vehicleCategory}] ${label}: ${total}${comment ? '('+comment+')' : ''}`);
return total;
} catch (e) {
console.log(` ERROR: ${e.message}`);
return 0;
}
}
const now = new Date().toISOString();
async function main() {
console.log('=== TEST 1: Combinations de gares A43+A48 pour Saint-Martin → Grenoble ===\n');
// 03003 → 03087 (Isle d'Abeau → Voreppe) - système fermé?
await testRate(1, [
{ toll: { operatorId: '03', tollId: '003' }, passageDate: now },
{ toll: { operatorId: '03', tollId: '087' }, passageDate: now }
], '03003→03087 (Isle d\'Abeau→Voreppe)');
await testRate(2, [
{ toll: { operatorId: '03', tollId: '003' }, passageDate: now },
{ toll: { operatorId: '03', tollId: '087' }, passageDate: now }
], '03003→03087');
// Essayer toutes les paires gares sur A48
const a48gates = [
{ op: '03', toll: '083', name: 'MOIRANS NORD' },
{ op: '03', toll: '084', name: 'MOIRANS' },
{ op: '03', toll: '085', name: 'RIVES' },
{ op: '03', toll: '086', name: 'VOIRON' },
{ op: '03', toll: '087', name: 'VOREPPE' },
{ op: '03', toll: '091', name: 'CHATUZANGE' },
{ op: '03', toll: '092', name: 'BAUME HOSTUN' },
{ op: '03', toll: '093', name: 'ST MARCELLIN' },
{ op: '03', toll: '094', name: 'VINAY' },
{ op: '03', toll: '095', name: 'TULLINS' },
];
console.log('\n03003 (Isle d\'Abeau) → toutes les gares A48:');
for (const g of a48gates) {
await testRate(2, [
{ toll: { operatorId: '03', tollId: '003' }, passageDate: now },
{ toll: { operatorId: g.op, tollId: g.toll }, passageDate: now }
], `03003→${g.toll} ${g.name}`);
}
console.log('\n=== TEST 2: Google Routes API - travelAdvisory.tollInfo ===\n');
const res = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
travelMode: 'DRIVE',
routingPreference: 'TRAFFIC_AWARE',
routeModifiers: { avoidTolls: false },
origin: { address: '25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France' },
destination: { address: 'Grenoble, France' },
}, {
headers: {
'Content-Type': 'application/json',
'X-Goog-Api-Key': API_MAPS,
'X-Goog-FieldMask': 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline,routes.travelAdvisory.tollInfo',
},
timeout: 15000,
});
const r = res.data.routes[0];
console.log(`Distance: ${Math.round(r.distanceMeters/1000)}km`);
console.log(`travelAdvisory:`, JSON.stringify(r.travelAdvisory, null, 2));
console.log('\n=== TEST 3: Diagnostiquer pourquoi VOREPPE n\'est pas dans Ulys ===\n');
// Récupérer la polyline complète et identifier les points proches de VOREPPE
const poly = r.polyline.encodedPolyline;
const coords = polylineLib.decode(poly, 5);
// VOREPPE BARRIERE: 45.28323°N, 5.622°E
const VOREPPE = [45.28323, 5.622];
let minDist = Infinity;
let closestIdx = -1;
for (let i = 0; i < coords.length; i++) {
const [lat, lng] = coords[i];
const dist = Math.sqrt(Math.pow(lat - VOREPPE[0], 2) + Math.pow(lng - VOREPPE[1], 2));
if (dist < minDist) {
minDist = dist;
closestIdx = i;
}
}
const minDistKm = minDist * 111; // approximation 1° ≈ 111km
console.log(`Point le plus proche de VOREPPE (45.283, 5.622):`);
console.log(` Index ${closestIdx}/${coords.length-1}: ${JSON.stringify(coords[closestIdx])}`);
console.log(` Distance: ${minDistKm.toFixed(2)} km`);
if (minDistKm > 2) {
console.log(` -> Le tracé NE PASSE PAS par VOREPPE (trop loin: ${minDistKm.toFixed(1)}km)`);
console.log(' -> Google route par une autre voie que A48 vers Grenoble!');
} else {
console.log(` -> Le tracé passe PRÈS de VOREPPE (${minDistKm.toFixed(2)}km)`);
}
// Vérifier aussi ST QUENTIN (03001): 45.641°N, 5.119°E (d'après le CSV)
const STQUENTIN001 = [45.641, 5.119];
let minDist2 = Infinity;
for (const [lat, lng] of coords) {
const d = Math.sqrt(Math.pow(lat - STQUENTIN001[0], 2) + Math.pow(lng - STQUENTIN001[1], 2));
if (d < minDist2) minDist2 = d;
}
console.log(`\nDistance du tracé à ST QUENTIN 03001 (45.641, 5.119): ${(minDist2*111).toFixed(2)} km`);
// Regarder la zone géographique couverte par la route
const lats = coords.map(c => c[0]);
const lngs = coords.map(c => c[1]);
console.log(`\nBounding box de la route:`);
console.log(` Lat: ${Math.min(...lats).toFixed(4)}${Math.max(...lats).toFixed(4)}`);
console.log(` Lng: ${Math.min(...lngs).toFixed(4)}${Math.max(...lngs).toFixed(4)}`);
}
main().catch(console.error);
-81
View File
@@ -1,81 +0,0 @@
import 'dart:convert';
import 'dart:io';
void main() async {
final envFile = File('functions/.env');
final lines = await envFile.readAsLines();
String apiKey = '';
for (var line in lines) {
if (line.startsWith('API_MAPS=')) {
apiKey = line.split('=')[1].replaceAll('"', '');
}
}
final url = 'https://routes.googleapis.com/directions/v2:computeRoutes';
final client = HttpClient();
final request = await client.postUrl(Uri.parse(url));
request.headers.set('Content-Type', 'application/json');
request.headers.set('X-Goog-Api-Key', apiKey);
request.headers.set('X-Goog-FieldMask', 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline');
final payload = jsonEncode({
"travelMode": "DRIVE",
"routingPreference": "TRAFFIC_AWARE",
"routeModifiers": { "avoidTolls": true },
"origin": { "address": "401 route du camping, 69850 Saint Martin en haut" },
"destination": { "address": "25 Imp. du Puits du Suc, Saint-Martin-en-Haut, France" }
});
request.write(payload);
final response = await request.close();
final responseBody = await response.transform(utf8.decoder).join();
try {
final json = jsonDecode(responseBody);
final routes = json['routes'] as List;
final polyStr = routes[0]['polyline']['encodedPolyline'] as String;
print("Polyline found. Length: ${polyStr.length}");
print("String: $polyStr");
int index = 0, len = polyStr.length;
int lat = 0, lng = 0;
List poly = [];
while (index < len) {
int b, shift = 0, result = 0;
do {
b = polyStr.codeUnitAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0;
result = 0;
do {
b = polyStr.codeUnitAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
lng += dlng;
double finalLat = lat / 1e5;
double finalLng = lng / 1e5;
if (finalLat.abs() > 90.0 || finalLng.abs() > 180.0) {
print("EXPLODED at index $index: $finalLat, $finalLng");
break;
}
poly.add([finalLat, finalLng]);
}
print("Decode complete. Points:");
for (var pt in poly) {
print(pt);
}
} catch (e) {
print("Error: $e");
}
}
File diff suppressed because one or more lines are too long