Technical tips
Large datasets
To draw datasets with thousands of records use the density map without the location symbols. With so much data you won't be able to distinguish the individual locations anyway, so the density map is an efficient solution.
- You start with three files:
myfile.jsonp
with the regular data, myfile.pts.json
with the data for the density map (see MapWorkflow if none) and myfile.ini.js
with your file settings (copied from ./data/_template.ini.js
if none).
- Copy
myfile.jsonp
to myfile.nan.jsonp
and remove all records in the "items" section, i.e. changing from "items":[{"status":...}]}
to "items":[]}
. Save.
- In
myfile.ini.js
change // var pointsUrl = [];
to var pointsUrl = ["Http://[your server]/myfile.pts.json"];
. Save.
- Post the files on a webserver and make a map of
myfile.nan.jsonp
- no data markers will show. Click the button in the "Density" section to generate the density map.
Faster mapping
Here some tips how you can squeeze some milliseconds from the time needed to draw the maps:
- Always fill the "boundingbox" field in the dataset header and spare the code figuring it out by itself.
- Communicate with the application through an iframe instead of via the URL to avoid a page refresh.
- Leave out those fields in the "items" section that are empty for all records - less data will be shuttled.
- Use
./scripts/iso3166-1_a2.js
instead of ./nuts2003.js
- its less lighter.
--
VladAtanasiu - 30 Aug 2009