Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Discussion Board for collaboration regarding Qlik GeoAnalytics.
Hi ASC-Mike,
You should change the datetype of the fields, using GeoMakePoint. Storing the fields as text is causing the issue.
Solution:
// Step 1: Load minimal test data
GeoCustomer2Test:
LOAD distinct
GeoCustomerSID,
GeoMakePoint(40.7128,-74.0060) AS CustomerGeoPoint, // New York coordinates directly as string
GeoMakePoint(34.0522,-118.2437) AS WarehouseGeoPoint // Los Angeles coordinates directly as string
INLINE [
GeoCustomerSID
1
2
];
[RoutesResultTable]:
Load * Extension GeoOperations.ScriptEval('
SELECT _autoIndex_, Distance, Duration, Status, LowResLine, dataset.WarehouseGeoPoint, dataset.CustomerGeoPoint FROM
Routes(criteria="fastest", transportation="car", destField="WarehouseGeoPoint", geometryType="point")
DATASOURCE dataset INTABLE crs="auto", pointField="CustomerGeoPoint"
', GeoCustomer2Test);