method to extend bounds to certain latlng point
is there any plan to include a method that extends existing bounds to a new point similar to what google and leaflet have with ther latlngbounds.extend methods?
cheers Qiong
ah I guess it would be possible to extend the polygon of the parameter that is passed to getbounds and thereby extend the resulting bounds object, am I correct?
Best Qiong
Do you have an example how Google and Leaflet are doing it? I'm not quite sure if I understood what exactly you are meaning ;)
sure: the API provided by google is here: https://developers.google.com/maps/documentation/javascript/reference?csw=1#LatLngBounds
basically you can invoke .extend(LatLng) on a Bounds object and then the LatLngBounds object is extended by that point.
What I do when I run code written by using your library I would use the following instead:
var routePolygon = new Array();
routePolygon.push(new LatLng(lat, lng));
geolib.getBounds(routePolygon)
instead of
LatLngBounds.extend(LatLng);
basically I already figured out how to do it, but it would be nice if the library would work in the same way as Google / Leaflet.
I am working on a couple of other useful additions to the library, so at one point (probably in a month or so, cause I'm going on vacation) I could contribute a couple of additions to the library.
Thanks & Best Regards Qiong