I use Angular-openlayers-directive by tombatossals . Is there a way to center the map depending on the markers?
Asked
Active
Viewed 286 times
0

radek.
- 368
- 1
- 3
- 16
1 Answers
0
Create Bounds from markers (first marker Coordinates and Last Marker Coordinates) and use it like as-
center {
extent: [ 0, 0, 51.505, -0.09 ]
}
For More reference see this link https://github.com/tombatossals/angular-openlayers-directive/blob/master/doc/02-center-attribute.md

Shailendra Singh Deol
- 637
- 3
- 5
-
@shailedra How to get the coordinates of of a point using this directive? http://stackoverflow.com/questions/36435689/how-to-get-coordinates-on-double-click-on-openstreetmap – jain Apr 06 '16 at 03:13
-
@dilpeshjain What are you using, marker coordinates or direct address to show on map?. – Shailendra Singh Deol Apr 06 '16 at 06:17
-
@ShailendraSinghDeol I need the coordinates of the point where I click ,using this directive. – jain Apr 06 '16 at 09:10