Comments (4)
Yes, there is the following method:
setThemePath(themePath, {onSuccess, onError}*)
That method works in both modes, and allows you to change only the renderer and not the whole map as ''setOfflineTileLayer'' does. The path you should provide is the absolute path to the render theme you want to use. What I can not tell you right now is if it will work properly or not, because all themes that i have used until now are the ones provided by mapsforge.
Tell me how it works when you try it.
from mapsforge-cordova-plugin.
I tried this, but it does not work
mapsforge.cache.setThemePath("themes/Elevelo_Cycling.xml",{ onSuccess: function(result) {
console.log("theme ok");
},
onError: function() {
console.log("theme error")
}
});
No error, no success
from mapsforge-cordova-plugin.
Yeah, i've fixed it for the next version. Today i was busy so i couldnt upload it, but hopefully tomorrow it will be uploaded.
In the new version you will be able to place your custom themes under the renderthemes
in assets folder and then for use it you just invoke it like this: mapsforge.cache.setThemePath("Elevelo_Cycling.xml");
and it should work. The other way is to place the theme anywhere in the device and provide the full path as usual (i.e: I used /mnt/sdcard/Elevelo_Cycling.xml
when i had it in the sdcard and it worked).
About the callbacks, i made a huge mistake, because I was using the error callback only for parameter checks, and then i was logging any other exception through the android logger but i wasn't invoking the callback. It is also fixed now, so sorry for any inconveniences about that.
from mapsforge-cordova-plugin.
After last commit, it should work as I mentioned in my previous message.
from mapsforge-cordova-plugin.
Related Issues (14)
- Code review, more docs and examples HOT 1
- Adding plugin via "Visual Studio Tools for Apache Cordova" HOT 3
- Map file not found HOT 3
- Any news about iOS Support? HOT 2
- MapView occupies entire screen
- not working in android 6.0 undefined file path
- Uncaught ReferenceError: mapsforge is not defined HOT 2
- UI freezes while tiles are generated HOT 5
- Tile cache HOT 2
- callback syntax HOT 2
- Examples HOT 7
- Next changes
- setThemePath error message HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapsforge-cordova-plugin.