>> No. I think SQL.js is long way to be useful. Nothing is working at this
>> moment.
> I'm not sure I understand the relevance of SQL.js to us then. Can you
> explain
> your intent here?
sql.js is a port of SQLite to JavaScript. It means or in theory that
all SQLite3 SQL commands can be access using javascript. If we extend
SQL.js to Spatialite.js so we can also use javascript to spatialite
spatial SQL commands.
>> >> With Spatialite JS, we can use Leaflet and OpenLayers Map Canvas to
>> >> render spatialite geometries in Desktop web browser.
>> >
>> > How do you envisage this would work
>>
>> The same way as QuickConnect and PhoneGap Hybrid Javascript framework
>> for iOS and Android but on desktop.
> Sorry, I meant "how are you planning to make calls from leaflet / OpenLayers
> into some spatialite-in-js product?". What would the integration / API look
> like?
Using SQL commands in Javascript, if you have Hybrid Javascript
framework. you can access your spatialite file using the static
library (e.g. open, transact, etc.).
e.g. Select name, street, AsGeoJSON(geom) from Street_table where
street = 'Swanston';
You will get a GeoJSON representation of Swanton Street.
OpenLayers and Leaflet are Javascript mapping libraries.
Openlayers API and Leaflet API readily accepts GeoJSON.
Noli