Comments (11)
@aurangzaibumer777 Are you asking about getting the list of latlng points of a curve drawn on google maps? If not, can you give me little more details to understand your question better?
from curve-fit.
yes, you're right. i need to have list of latlng that google map draws when geodesic is set to true.
like this https://i.stack.imgur.com/EArBf.png
for suppose if i want a geo desic polyline from one point to another (london to istanbul, turkey), the polyline ARC/CURVE will be created by google if i give it both latlng of source and destination and set geodesic property to TRUE but can i have those drawn arc points (which will be set of latlngs or list of latlngs) that google map creates
thanks
from curve-fit.
actually i want geodesic polyline to animate like this
https://smdaudhilbe.wordpress.com/2014/11/30/how-to-animate-line-gradually-growing-from-starting-point-to-ending-point/
for that, i need set of points so i could pass it to object animator in order to animate the line from one point to another.
from curve-fit.
yes, you're right. i need to have list of latlng that google map draws when geodesic is set to true.
like this https://i.stack.imgur.com/EArBf.png
for suppose if i want a geo desic polyline from one point to another (london to istanbul, turkey), the polyline ARC/CURVE will be created by google if i give it both latlng of source and destination and set geodesic property to TRUE but can i have those drawn arc points (which will be set of latlngs or list of latlngs) that google map creates
thanks
To get a list of LatLng points of a Curve, register a callback interface to be invoked when the curve is drawn on google maps.
curveManager.setOnCurveDrawnCallback(this);
Use getPoints()
method of a Curve
reference which returns a list of LatLng points.
@Override
public void onCurveDrawn(Curve curve) {
List<LatLng> latLngList = curve.getPoints();
}
To get a list of LatLng points of a geodesic polyline, call getPoints()
on a Polyline
reference.
Check the below link for more info.
I hope the above is useful to you.
from curve-fit.
but the library of your curve draws a different curve than the geodesic
can't it be possible to draw a simple geodesic polyline and get points? the getpoints of polyline gives the source and destination points only, not all the points
from curve-fit.
I wanted to draw curves similar to this (https://drive.google.com/file/d/1BQTDpvN7KaRfWJ4NJt1lsStLT8e5uYSK/view?usp=sharing).
Setting the geodesic
option to true
did not help me much when I was working on a project. So I decided to use the Bezier cubic equation to draw a curve between the 2 points.
The curve drawn by the library, consists of several small polylines (200 points). AFAIK, setting the geodesic
option to true
does not make much difference here.
You can try one more trick. Use setAlpha
option and set the alpha value to zero and you will get a straight line in most cases. After that, try to get a list of points of a curve (Make sure it satisfies your requirement). If you want a perfectly straight line, use setComputePointsBasedOnScreenPixels
option and set it to true
(Read the limitation of this method before using it).
from curve-fit.
no, i actually want to have a geodesic curve and i need an animation like i showed you with a reference link
from curve-fit.
the same geodesic curve being drawn by google map.
in iOS, we get the same points using GMSGeodesicPolyline, in Android, we got nothing or maybe we need some more digging.
from curve-fit.
no, i actually want to have a geodesic curve and i need an animation like i showed you with a reference link
If you want a geodesic curve/line drawn by the google map, try to use polyline directly. Let me know if you find any solution to your problem.
from curve-fit.
no, i actually want to have a geodesic curve and i need an animation like i showed you with a reference link
If you want a geodesic curve/line drawn by the google map, try to use polyline directly. Let me know if you find any solution to your problem.
unfortunately i have no way but to use the google map polyline but i need to animate it (just like in the reference link)
from curve-fit.
Closing because of inactivity.
from curve-fit.
Related Issues (8)
- Not compatible with Android Maps SDK 3.0 beta HOT 2
- Adjust curvature HOT 3
- Random NPE HOT 12
- CurveOptions width format? HOT 3
- Curve click error HOT 4
- Confused HOT 7
- show just once 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 curve-fit.