Does anyone have an example to point me in the right direction to utilize Clustering with the ESRI JS API working with a State Plane wkid: 2236? I want to provide a solution for an internal application just like the demo on ESRI JS website. Though, all our data and the application I'm supposed to update is defined wkid:2236. I've tried modding the demo code though either I'm overlooking something or it's not possible. If this isn't possible any suggestions?
I had overlooked the "spatialReference" option within the constructor. This gets me to the point of displaying the cluster symbols on the map. Though, when I click the symbol I received the following error and I included the call stack. Any ideas?
CHANGES TO ESRI POINT CLUSTERING EXAMPLE
var initExtent = new esri.geometry.Extent({ "xmin": **432163.89125**, "ymin": **1451074.4432**, "xmax": **710435.747749999**, "ymax": **1626999.3528**, "spatialReference": { "wkid": **2236** } });
...
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("**http://gisserver/ArcGIS/rest/services/BaseMap/MapServer/**");
...
var photos = esri.request({
"url": "**js/testdata.json**",
"handleAs": "json"
});
...
clusterLayer = new extras.ClusterLayer({
"data": photoInfo.data,
"distance": 100,
"id": "clusters",
"labelColor": "#fff",
"labelOffset": 10,
**"spatialReference":"2236"**,
"resolution": map.extent.getWidth() / map.width,
"singleColor": "#888",
"singleTemplate": popupTemplate
});
ERROR
Unhandled exception at line 34, column 167548 in http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'toJson'
CALL STACK
أكثر...
I had overlooked the "spatialReference" option within the constructor. This gets me to the point of displaying the cluster symbols on the map. Though, when I click the symbol I received the following error and I included the call stack. Any ideas?
CHANGES TO ESRI POINT CLUSTERING EXAMPLE
var initExtent = new esri.geometry.Extent({ "xmin": **432163.89125**, "ymin": **1451074.4432**, "xmax": **710435.747749999**, "ymax": **1626999.3528**, "spatialReference": { "wkid": **2236** } });
...
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("**http://gisserver/ArcGIS/rest/services/BaseMap/MapServer/**");
...
var photos = esri.request({
"url": "**js/testdata.json**",
"handleAs": "json"
});
...
clusterLayer = new extras.ClusterLayer({
"data": photoInfo.data,
"distance": 100,
"id": "clusters",
"labelColor": "#fff",
"labelOffset": 10,
**"spatialReference":"2236"**,
"resolution": map.extent.getWidth() / map.width,
"singleColor": "#888",
"singleTemplate": popupTemplate
});
ERROR
Unhandled exception at line 34, column 167548 in http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'toJson'
CALL STACK
toJson [arcgis] Line 34 Script
updateHighlight [PopupBase.js] Line 19 Script
onSelectionChange [Popup.js] Line 19 Script
select [PopupBase.js] Line 19 Script
_updateFeatures [PopupBase.js] Line 19 Script
setFeatures [PopupBase.js] Line 19 Script
_2b5 [arcgis] Line 15 Script
setFeatures [Popup.js] Line 19 Script
_addSingles [eval code] Line 275 Script
onClick [eval code] Line 126 Script
advice [arcgis] Line 15 Script
_504 [arcgis] Line 15 Script
_onClickHandler [arcgis] Line 34 Script
Anonymous Function [arcgis] Line 15 Script
updateHighlight [PopupBase.js] Line 19 Script
onSelectionChange [Popup.js] Line 19 Script
select [PopupBase.js] Line 19 Script
_updateFeatures [PopupBase.js] Line 19 Script
setFeatures [PopupBase.js] Line 19 Script
_2b5 [arcgis] Line 15 Script
setFeatures [Popup.js] Line 19 Script
_addSingles [eval code] Line 275 Script
onClick [eval code] Line 126 Script
advice [arcgis] Line 15 Script
_504 [arcgis] Line 15 Script
_onClickHandler [arcgis] Line 34 Script
Anonymous Function [arcgis] Line 15 Script
أكثر...