gis - Assign new ol.View.Extent with coordnation points -
i'm new gis concepts might noob question. i'm using openlayers 3 map. want restrict panning specific area.
the code came across should don't know values assign minx, miny, maxx, , maxy variables.
var view = new ol.view({ center: new ol.proj.transform([-116.284636, 43.619528], 'epsg:4326', 'epsg:3857'), zoom: 11, extent: [minx, miny, maxx, maxy] });
i've gotten coordinates click evt.coordinate variable don't know how correlate parameters of extent.
left top '0' => "-12972739.566503541" '1' => "5427487.630417225" right top '0' => "-12913118.684441104" '1' => "5426723.260134374" bottom right '0' => "-12908838.210857134" '1' => "5364962.141279951" bottom left '0' => "-12983440.750463465" '1' => "5367713.874298218"
can explain how take coordinates , create new extent?
thanks
minx = bottomleft[0] miny = bottomleft[1] maxx = topright[0] maxy = topright[1]
Comments
Post a Comment