"Convert selection to geolocation" parses wrong data
I've been using the "Convert Selection to Geolocation" feature quite a lot, but recently it has stopped to work correctly. For example, if I apply it on the following selection:
Halvemaanpassage 1, 3011DJ Rotterdam
The result is:
[Halvemaanpassage 1, 3011DJ Rotterdam](geo:1,3011)
As you can see, the address number is used for lat and the zipcode for lon (also confirmed with other addresses). Using the DevTools I do see that the correct latitude and longitude are part of the response, but perhaps the response signature has changed?
Can you elaborate on your configuration? What URL parsing rules do you have under the relevant settings section (a screenshot could be nice)?
It looks like it's the default configuration, here's the config in data.json of the plugin:
"urlParsingRules": [
{
"name": "OpenStreetMap Show Address",
"regExp": "https:\\/\\/www.openstreetmap.org\\S*query=([0-9\\.\\-]+%2C[0-9\\.\\-]+)\\S*",
"preset": true,
"ruleType": "latLng"
},
{
"name": "Generic Lat,Lng",
"regExp": "([0-9\\.\\-]+), ([0-9\\.\\-]+)",
"ruleType": "latLng",
"preset": true
}
],
The OpenStreetMap part has been there since the beginning and the second one has been later according to my Git history; both look to be default looking at settings.ts
I think I found (part of) the issue: the "Generic Lat,Lng" parsing rule seems to be used first. If I change the regular expression for that one to something else, the OpenStreetmap lookup works as expected.