Text being cut off when importing CSV into TileMill
I am trying to import a .shp with very lengthy text into my map in TileMill. When I view the attribute table in QGIS, all my text shows up but once it is imported into TileMill, my text is gets cut off after 80 characters. Is there a way to fix this? I have pretty lengthy text in the CSV that is joined to my .shp so that the "full" of the tooltips provides information (in paragraph form) about particular projects we are doing in various countries.
Any help on how to fix this, or a better way to pull information into my tooltips would be greatly appreciated!
Thanks
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Tom MacWright on 06 Feb, 2012 08:32 PM
Hey Emma,
Is this showing up in the interactivity, or just in the 'view datasource' table? The table's values are truncated in order to keep huge values like the ones you have from making it really wide.
Tom
3 Posted by Emma on 06 Feb, 2012 08:40 PM
Hey Tom,
I want the text to show up in the interactivity boxes, not just the datasource table
Emma
4 Posted by emma Folkman on 07 Feb, 2012 05:29 PM
Hi Tom,
It is being cut off in the interactivity. I have attached the CSV I am
using so you can see the large amount of text I am working with. I am
thinking there may be a better way to get the text into the "teaser"/"full"
descriptions but we are looking to keep the updating aspect of the map
simple and not involve managing/changing too many documents every time a
new project arises.
The CSV is broken into country, region, ISO number, the project names and
sectors, and then the heavy text is project title and project
description. What I am trying to accomplish is to have the teaser contain
the project titles (ParagrahHeadingsHIV, ParagraphHeadingsWatSan, etc) to
show up in the "teaser" when you scroll over each country and then for the
"full" pop-out to contain the project titles with the project descriptions
(HIV, WatSan, OD, etc) listed under them.
Suggestions are appreciated!
Thanks
Emma
5 Posted by Marc Levy, YSA on 08 Feb, 2012 12:22 AM
I have a very similar need. We are mapping service projects wherein the teaser would contain project titles but full HTML would contain project descriptions along with contact information for each project. Is there any way around the 80 character limit? This is kind of a severe limit, given what we're trying to accomplish. We're not using QGIS (at least not so far), FWIW.
Thanks for any input.
6 Posted by Matt on 21 Feb, 2012 07:56 PM
Unfortunately dbf's are a bit antiquated. If you must use the shapefile format (which uses dbf files), the only way around this is to break up the paragraphs into columns that are under the limit.
The better solution might be to use SQLite. These files do not have such a limit, are very flexible for manipulating data, and work well with TileMill. You can easily create one from your shapefile using QGIS. After joining the CSV data, instead of saving as a SHP, save as SQLite. Importing this file into TileMill is similar, but requires you to enter the table name, which, if it was created in QGIS, will simply be the name of the file (without ".sqlite").
Matt
Matt closed this discussion on 19 Jun, 2012 03:10 PM.