Coder Social home page Coder Social logo

disyinformationssysteme / cordova-spatialite-storage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from storesafe/cordova-sqlite-storage

23.0 23.0 17.0 87.19 MB

A Cordova/PhoneGap plugin to open and use sqlite databases on Android/iOS/Windows Universal(8.1)/Amazon Fire-OS/WP(7/8) with HTML5/Web SQL API

License: Other

JavaScript 4.67% HTML 0.04% CSS 0.06% PowerShell 0.02% Shell 0.02% Java 2.54% C 12.63% C++ 17.71% Objective-C 0.35% C# 61.68% CoffeeScript 0.26% Python 0.01%
cordova cordova-plugin database plugin spatialite sqlite

cordova-spatialite-storage's People

Contributors

aarononeal avatar c-goetz avatar cgo-disy avatar cultrarius avatar davibe avatar dwinterbourne avatar ef4 avatar gillardo avatar gitter-badger avatar gulian avatar huserben avatar j3k0 avatar joenoon avatar lcsanchez avatar lugovsky avatar marcucio avatar mineshaftgap avatar nadyaa avatar nleclerc avatar nolanlawson avatar nourshamrok avatar ollide avatar omjokine avatar rafaelbeckel avatar rahmadid avatar steveoh avatar til-schneider avatar vjrantal avatar vldmrrr avatar vojto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-spatialite-storage's Issues

window.sqlitePlugin.openDatabase does not create new database

Hi,

I tried the following
db = window.sqlitePlugin.openDatabase({name: 'file:///storage/emulated/0/Download/zzz.sqlite'}, this.runQuery);
but it reports
OPEN database: file:///storage/emulated/0/Download/zzz.sqlite failed, aborting any pending transactions
It does open if the database exists. Should it not create a new database if it does not exist?

Also how do I refer to an existing database with in the www folder of the cordova android app,
I tried
db = window.sqlitePlugin.openDatabase({name: 'file:////Roads.sqlite'}, this.runQuery); but again does not connect even though it exists.

Regards

Marco Giana

Problems on create database in Android

Hi, i use this plugin and SQLCipher(https://github.com/litehelpers/Cordova-sqlcipher-adapter) in Android app, but, when it's tempted create new database in app, an error occurs, description of error: java.illegalargument.exception: URI is not absolute.
Creation of the database is in this way
window.sqlitePlugin.openDatabase({name: 'database1.db', key: '123', location: 'default', androidLockWorkaround: 1},success,error); I used Promise

Get started with cordova-spatialite-storage

Hi,
I am developing a cordova app for android working with spatial data. For processing spatial data I am trying to use cordova-spatialite-storage plugin. Following plugin's
documentation, first of all, I added plugin to my project, then placed my Db.sqlite in my device (file:///storage/emulated/0/Download/DB.sqlite). at last, I executed a simple query as follows:
query = 'SELECT Geometry FROM myTable LIMIT ?';
var args = [20];
var querySuccess = function(results) { } var queryError = function(error) {
alert(error)
}
var spatialiteURI = "file:///storage/emulated/0/Download/DB.sqlite";
var db = window.sqlitePlugin.openDatabase({name: spatialiteURI}); db.transaction(function(tx) { tx.executeSql(query, args, querySuccess, queryError); })

But the only thing I've got is alert(error) in queryError function (please see attached picture).
It's worth mentioning, I am using Framework7 as javascript framwork in my project.

Can you please help me what's wrong with my code?Thank you for any help you can offer.

20200516_001714

IOS BUILD FAILED Cordova/NSData+Base64.h' file not found

Hi,
I am new to github so I am not sure if this is the right place to write but I don't see way to create issue.
I am writing cordova map application which is heavily using cordova-spatial-storage plugin. On Android works like a charm but have problem on IOS. It doesn't compile and I get error mentioned in title.
I have
macOS Sierra 10.12.13
Xcode 8.2.1
cordova-ios 4.1.1
cordova-cli 6.4.0
and trying to compile it from Visual Studio 2015 installed on win10 machine. As I did some searches bug is caused by some changes in cordova and many plugins face it, including main branch of sqlite plugin.
Is there a chance to have a upgrade this plugin to latest cordova ?

Androïd 7.0

Hi,

I can't make it run under Androïd 7.0. The problem is that it doesn't INSERT anything. I can open and read but I can't INSERT.

I may have written wrong stuff so it doesn't work but I wonder if the issue comes from the same problem as litehelpers had to strive with :
litehelpers androïd 7.0

Can you test it under Androïd 7.0 ?

Thank you.

Best Regards,

Max

ionic 3: spatialite query not working as expected

Hi everyone, @Cultrarius
i'm facing issue in running query.

Problem

Query retuns all the rows in success it should return only 1 record, i can successfully run the query in PostGis(Postgres).

Spatial-lite Query
tx.executeSql("SELECT geom_wkt FROM features WHERE ST_Contains(features.geom_wkt, ST_GeomFromText('POINT(-13558733.646749694 4510524.920627141)', 3857))",[],(tx, res)=>{ console.log(res,tx); },(tx, error)=>{ console.log(error); });

Table Structure
| row_id | geom_wkt | ctrd_point |

Example data in ctrd_point

POINT (-13548660.73716953 4512826.116309432)
Example data in geom_wkt

MULTIPOLYGON (((-13548685.1414 4510686.1853, -13549643.7651 4510677.834399998, -13549644.0297 4510722.523100004, -13549648.2205 4511680.982299998, -13548688.3625 4511703.584399998, -13548685.1414 4510686.1853)))

Thanks!

Failed to fetch plugin

Hello, I was trying to install this plugin but Ive got this error, Am I missing something ?

Error: Failed to fetch plugin https://github.com/DisyInformationssysteme/Cordova-spatialite-storage via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! git rev-list -n1 master: fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 master: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 master: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 master:
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "https://github.com/DisyInformationssysteme/Cordova-spatialite-storage" "--save"
npm ERR! node v6.11.2
npm ERR! npm  v3.10.10
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 master
npm ERR! fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Samaali Radouane\Desktop\TMEAPP\node_modules\npm-debug.log

Query Stopped Working with Version 1.2.0

SELECT transform(MakePoint(-97.895904,26.322807,4326),26914) as my_geom FROM <any_table>

This query works in the spatiality GUI and it worked with version 1.1.0 of this plugin, but starting with version 1.2.0 it returns an empty object for every row. results.rows.item(0) is an empty object.

Not working with @ionic-native/sqlite

I tryed using the plugin with @ionic-native/sqlite in my angular 2 material application. Everything works fine with the normal cordova-sqlite-storage plugin, but when I remove it and add yours my create call returns null.

Is this plugin not supposed to be used with @ionic-native? Is there an alternative?

Low-probability data loss risk issues

I discovered and resolved some low-probability data loss risk issues on cordova-sqlite-storage:

A couple other items to watch for:

Recommended solution: merging the changes from https://github.com/brodybits/cordova-sqlite-legacy-build-support would include the solutions for storesafe#666 and storesafe#716.

I would be happy to answer any questions. I would be happy to recommend this project for SpatiaLite support if we can include the solutions for storesafe#666 and storesafe#716 in this plugin version.

Plugin update to be compatible with Android 64 bits

Hi all,

I saw that the last commit adds 64 bit compatibility with Android devices, adding the .so libraries to the x86_64 and arm64-v8a folders.

When I compile my code and "unzip" the apk, I see a lib folder, with only the 32 bit libraries.

Am I missing something? Do I need to tweak the plugin.xml file?

Thanks in advance.

sqlBatch Error

Hello all,
We began developing our app using the Cordova-sqlite-storage plugin and we rely on the sqlBatch function that that plugin supplies to push a large number of features into our database all at once. I recently switched out that plugin for this one because we have found that we really need our database to be spatially-aware in order to optimize the speed of our mapping component. We have been focusing our efforts on an iOS release right now and when I test our app on my iPhone, XCode indicates an error on the line in our javascript with the sqlBatch function. I'm pretty sure I'm passing all the data in the correct format as it worked previously with the regular sqlite plugin, but now it's failing. So, my question is this: Does this plugin support sqlBatch functionality? If not, is it something that was removed when making this plugin or was it not in the sqlite plugin when this was forked? Is it something that will be added at some point in the future or should I just find a way to work around not having it?
Thanks!

Usage in Cordova

Hi,

up to now, I am using litehelpers/Cordova-sqlite-storage in my project but I would like to take advantage of the spatial functionality. I was very glad to find a "spatial fork" of the plugin I am using and tried just replacing the sqlite plugin by the spatialite plugin.

Unfortunately this did not the trick :( When running "_db.executeSQL(..)" there is no reaction at all: Neither a positive response nor an error thrown. using the transaction function I get the error "Invalid database handle".
_db is received as result of window.sqlitePlugin.openDatabase({name: "tgmapper2.db", location: 1, androidDatabaseImplementation: 2}); Might be, there is some very small error in thinking? Could anyone help me?

Best regards and thanks in advance
stihl-sicher

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.