<script> var dojoConfig = { parseOnLoad: true, packages: [{ "name": "extras", "location": location.pathname.replace(/\/[^/]+$/, '') + "/extras" }] }; </script>
This usually happens when you try to reference something in the library before it's been loaded. We mention this in the Migrating to 3.0 doc.
When I added the point clustering js to my project with other js files, the error "esri is not defined" occurred. How to fix this bugs? Thanks!
Try loading the .json file directly in your browser. If you still get a 404, and you're sure that the path to the file is correct, you probably need to configure IIS to server JSON: http://stackoverflow.com/q/332988/1934
Rather than running the sample by double-clicking it, you need to use a web server (like IIS or Apache). Your web server can be local. The important part is that you run JS API samples over http:// rather than file://.
the layers_point_clustering.html file can't work in my browser after the file double clicked.my aim is the file can work in my browser.
Does this link work in your browser: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/layers/layers_point_clustering.html
We made an update and missed adding the extras directory and ClusterLayer.js file to the download. I fixed this yesterday. Please re-download: http://www.arcgis.com/sharing/content/items/1a6528fd3c774cfbbdf46df66c42958f/data
i don't see extras/ClusterLayer.js in the downloaded code too.And i can't find it in the dojo library.where it is?thanks
Now then, I think there is a small fault in the extras/ClusterLayer.js file included in Esri's sample. There is a line of code that says:alert('Sorry, that cluster contains more than 1000 points. Zoom in for more detail.');I submit it should say:alert('Sorry, that cluster contains more than ' + this._maxSingles + ' points. Zoom in for more detail.');As maxSingles is an option provided to the user during configuration of a new ClusterLayer.Thanks,Mark
alert('Sorry, that cluster contains more than 1000 points. Zoom in for more detail.');
alert('Sorry, that cluster contains more than ' + this._maxSingles + ' points. Zoom in for more detail.');
Indeed, simply copying the sample code and trying to run it locally produces the same problem. Any assistance available?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.