The two preferences mentioned by nmaler are in place. In addition, you do not need a (local) server, data: -URI also works fine.
For example, if you set geo.wifi.uri(at about:config) to:
data:,{"location":{"lat":1.2,"lng":3.4},"accuracy":4000}
and then test by running the following from the JS console:
navigator.geolocation.getCurrentPosition(pos => console.log(pos.coords));
then you will see that the parody succeeded:
Coordinates { latitude: 1.3, longitude: 11, altitude: 0, accuracy: 4000, ... }
: -URL JavaScript (, ), . , encodeURIComponent , pos - , % # ( , , ):
var pos = {
location: {
lat: 1.2,
lng: 3.4,
},
accuracy: 4000,
};
var geoWifiUrl = `data:,${encodeURIComponent(JSON.stringify(pos))}`;