Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Using this plugin on a page with mulitple maps generates Document update conflicts #22

Open
hrishiballal opened this issue Oct 13, 2016 · 1 comment

Comments

@hrishiballal
Copy link

hrishiballal commented Oct 13, 2016

When using this plugin on a page with more than one map (both maps have same bounds and tiles), on initial sync, it generates a lot of document update conflicts. This is because it is trying to put tiles from two sources at the same time (I think).

To get around it I use the pouchdb.upsert plugin and change the put code to following:

        this._db.putIfNotExists(tileUrl, doc).then(function(res) {
            // success, res is {rev: '1-xxx', updated: true}
        }).catch(function(err) {
            // error
        });

I am not sure if this sort of thing should be in the core library but wanted to raise this.

@albfan
Copy link

albfan commented Jun 28, 2023

probably the put code modified link is not valid anymore.

Any chance to upload here at least the diff to test locally?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants