CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
187 stars 68 forks source link

extends Projection #536

Open StalkerExplorer opened 1 year ago

StalkerExplorer commented 1 year ago

How i can extends Projection? What's need constructor class? I can see, long and boolean variable. Can you help me, with a short example code java?

mtehver commented 1 year ago

Good question, unfortunately the short answer is that you can not. Projections are native class wrappers, but without any virtual overridable functions on Java side. The constructor you are referring is intended for internal use and is basically used to connect native object to the wrapped Java object.

SDK makes some assumptions regarding monotonicity when converting between coordinate systems, thus we support only the 2 most common projections currently. If you need to use specific projections for you data, but want to display the map in WebMercator, then you can use Proj4J library on Android.