Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer clustering doesnt work #398

Open
mateuszkib opened this issue Mar 21, 2018 · 1 comment
Open

Layer clustering doesnt work #398

mateuszkib opened this issue Mar 21, 2018 · 1 comment

Comments

@mateuszkib
Copy link

mateuszkib commented Mar 21, 2018

Hello!
I'm trying to use the layer directive to create markers. I need it to cluster markers. Is it possible to group markers with this directive?.

JS :
var features = {"type": "Feature", "id": "POL", "properties": {"name": "Poland"}, "geometry": {"type": "Polygon", "coordinates": [[[15.016996, 51.106674], [14.607098, 51.745188], [14.685026, 52.089947], [14.4376, 52.62485], [14.074521, 52.981263], [14.353315, 53.248171], [14.119686, 53.757029], [14.8029, 54.050706], [16.363477, 54.513159], [17.622832, 54.851536], [18.620859, 54.682606], [18.696255, 54.438719], [19.66064, 54.426084], [20.892245, 54.312525], [22.731099, 54.327537], [23.243987, 54.220567], [23.484128, 53.912498], [23.527536, 53.470122], [23.804935, 53.089731], [23.799199, 52.691099], [23.199494, 52.486977], [23.508002, 52.023647], [23.527071, 51.578454], [24.029986, 50.705407], [23.922757, 50.424881], [23.426508, 50.308506], [22.51845, 49.476774], [22.776419, 49.027395], [22.558138, 49.085738], [21.607808, 49.470107], [20.887955, 49.328772], [20.415839, 49.431453], [19.825023, 49.217125], [19.320713, 49.571574], [18.909575, 49.435846], [18.853144, 49.49623], [18.392914, 49.988629], [17.649445, 50.049038], [17.554567, 50.362146], [16.868769, 50.473974], [16.719476, 50.215747], [16.176253, 50.422607], [16.238627, 50.697733], [15.490972, 50.78473], [15.016996, 51.106674]]]}};

angular.extend($scope, { center: { lat: 43.88, lon: 7.57, zoom: 2 }, clusters: { source: { type: 'GeoJSON', geojson: { object: features, projection: 'EPSG:4326' } }, clustering: true, clusteringDistance: 20, style: getStyle }, // Default to circles icon: false });

HTML :
<openlayers ol-center="center" height="400px"> <ol-layer ol-layer-properties="clusters"></ol-layer> </openlayers>

@juristr
Copy link
Collaborator

juristr commented Mar 23, 2018

Most probably because the example are no more up to date with upgraded made on this library, especially with regards to the ol versiob used.

Unfortunately I don't have any time to work on this project myself any more. You would have to look at the error messages and see what exactlt happens and where it breaks. I'm more than happy to merge in any PRs 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants