android - Minimum Distance required to add PolyLine between two points -
polyline line = googlemap.addpolyline(new polylineoptions().add(mypos, itempos).color(color.blue));
for polyline created above, app crashes. distance between mypos , itempos 0.019 miles. there minimum distance required draw line between 2 points using polyline?
@jb15613 believe correct that.
you can use api v3 draw line between 2 points:
var line = new google.maps.polyline({ path: [new google.maps.latlng(37.4419, -122.1419), new google.maps.latlng(37.4519, -122.1519)], strokecolor: "#000000", strokeopacity: 1.0, strokeweight: 10, geodesic: true, map: map });
the ‘geodesic’ /geometric library if wish have shortest path. need account facet earth curved. please add libraries parameter:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=geometry"></script>
Comments
Post a Comment