OpenLayers Cluster Strategy and reproject from 4326 to 3857 / 900913
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js"></script>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/theme/default/style.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.js"></script>
<div id="header">OpenLayers Cluster Strategy and reproject from 4326 to 3857 / 900913</div>
<div id="map" class="map" />
CSS
html, body {
width:100%;
height:100%;
margin: 0px !important;
}
#map {
height:85%;
width: 90%;
margin: auto !important;
}
#header {
margin: 10px 0px 10px 0px;
text-align: center;
}
JavaScript
var geojsonObject = {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-93.404419,
44.926079]
},
"properties": {
"storeNumber": 4,
"storeName": "x1",
"storeAddress": "xxx",
"city": "HOPKINS",
"state": "MN",
"postalCode": 55305,
"storeType": "SWAS",
"issueCount": 5
}
}, {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-93.042715,
44.848022]
},
"properties": {
"storeNumber": 6,
"storeName": "xx2",
"storeAddress": "xx1w",
"city": "INVER GROVE HEIGHTS",
"state": "MN",
"postalCode": 55077,
"storeType": "SWAS",
"issueCount": 12
}
}, {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-121.288006,
38.752124]
},
"properties": {
"storeNumber": 7,
"storeName": "xx2",
"storeAddress": "xx2w",
"city": "ROSEVILLE",
"state": "MN",
"postalCode": 55113,
"storeType": "SWAS",
"issueCount": 3
}
}, {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-93.277723,
44.767742]
},
"properties": {
...