MapComponent

54 views
Skip to first unread message

Bryan Buchanan

unread,
Sep 27, 2016, 8:48:01 PM9/27/16
to CodenameOne Discussions
In the Developer Guide, it says "The MapComponent uses a somewhat outdated tiling API which is not as rich as modern native maps." Can you elaborate on that, and whether it is still usable with a custom TiledProvider to use across all platforms (Android, iOS, UWP) ?

Shai Almog

unread,
Sep 28, 2016, 12:11:08 AM9/28/16
to CodenameOne Discussions
We recommend most developers use the native maps implementation moving forward. Ideally we'll also add a fallback there that would use the web version of the API which is better maintained by Google. Most map providers are moving away from tiling API's for maps so doing that would be prudent.

Bryan Buchanan

unread,
Sep 28, 2016, 12:21:38 AM9/28/16
to CodenameOne Discussions
My understanding (which may be incorrect) is that all the tooling around OpenStreetMap serves tiles. Do you know if it's possible to use custom data sources (i.e. your own  OpensStreetMap data server) with native maps ?

Shai Almog

unread,
Sep 29, 2016, 2:58:16 AM9/29/16
to CodenameOne Discussions
No the native maps work differently (vectors).

Bryan Buchanan

unread,
Sep 29, 2016, 4:46:21 AM9/29/16
to CodenameOne Discussions
OK - having done a bit of research, it appears I can run my own vector tile server:https://github.com/tilezen/vector-datasource/wiki/Mapzen-Vector-Tile-Service, and there is an OpenGL rendering library: https://github.com/tangrams/tangram-es

Is it feasible for me to think about using this in CN1 ?

Steve Hannah

unread,
Sep 29, 2016, 10:58:13 AM9/29/16
to codenameone...@googlegroups.com
On the Codename One side, that would have to be embedded as a peer component, and it would be a fair bit of work.  I simpler approach for client-side rendering, might be to port this library (http://wiki.openstreetmap.org/wiki/Kothic_JS) into Codename One.   That library looks quite small, and CN1 should support most of the necessary 2D drawing primitives to do the rendering in a cross-platform way. 

It all depends on what you're trying to achieve.  The native maps libs are quite good, so, in my mind, you'd have to have a good reason for trying avoid them.   Any other approach is likely to give "poorer" results than the native maps.


--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/c96919c8-37a0-4ad5-b46f-eae9a8a08b1a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages