So i would really like to modify this example: http://openlayers.org/en/v3.0.0/examples/tissot.html?q=circle
Problem is that when I try to apply it to my map it doesn't work, probably because I use OSM style which is not spherical:
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
}),
new ol.layer.Vector({
source: vectorSource
})
],
renderer: 'canvas',
target: 'map',
view: new ol.View({
center: ol.proj.transform([2.1833, 41.3833], 'EPSG:4326', 'EPSG:3857'),
zoom: 2
})
});
And for the question: how to create circular polygon? As I can see, there are two choices:
Somehow convert geom.Circle in geom.Polygon, which I can't do, based on my noob level
Create my own function to do that, something like openlayers 2:
OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, sides, rotation) {
var angle = Math.PI * ((1/sides) - (1/2)); if(rotation) { angle += (rotation / 180) * Math.PI; } var rotatedAngle, x, y; var points = []; for(var i=0; i
Has anyone got to the same point in their GIS master life? Which one is better? or is there a hidden path, that only Wise and Strong ones can see? Help me please!