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.

  1. 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).
  2. Copy myfile.jsonp to myfile.nan.jsonp and remove all records in the "items" section, i.e. changing from "items":[{"status":...}]} to "items":[]}. Save.
  3. In myfile.ini.js change // var pointsUrl = []; to var pointsUrl = ["Http://[your server]/myfile.pts.json"];. Save.
  4. 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

Paris, France
Waqwaq - mapping cultural geographies · r1 · 30 Aug 2009 · 23:58:12 · VladAtanasiu
Waqwaq: Mapping cultural geographies ·
Copyright © by the contributing authors. 2009-2014