geo_field.module, line 308, wkt field does not specify a #maxlength, and therefore defaults to 128 characters. This prevents you from adding anything but the most basic shapes.
To fix:
add
'#maxlength' => 10000,
to the $element['wkt'] array
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | geo-411628.patch | 707 bytes | ultimike |
Comments
Comment #1
edalcin commentedAnd, please, where can I find the $element['wkt'] array?
Thanks in advance!
Comment #2
edalcin commentedI found it in "function geo_field_wkt_process" and "function geo_field_latlon_process". Then I added '#maxlength' => 10000, in both. Is it correct?
Thanks in advance!
Comment #3
ultimikeHere's a patch to update the maxlength.
-mike
Comment #4
zzolo commentedI would suggest actually changing this field to a textarea since the text of WKT is potentially very large to infinite. This is how we implemented the widget in the OpenLayers CCK module http://drupal.org/project/openlayers.
Comment #5
allie mickaI'm strongly considering deprecating the WKT input entirely. It was mainly available in the interest of providing a proof-of-concept for Geo data, but with an increased availability of sensible widgets, I'm reluctant to present new users with "WKT" or "Well Known Text" options. Well Known by whose standards? ;)
Comment #6
gregglesWhile I agree that WKT is not an easy to use text format, for those who know WKT and who deal with geo data all day it would be useful. I see this question much like the HTML vs. WYSIWYG problem and think that we should have fancy input widgets by default which an individual user can click to disable to get back to a giant WKT textarea.
Comment #7
zzolo commentedI think greggles make a valid point. I don't feel too strongly on this subject, but OpenLayers handles WKT really well and the widget we built is fairly dependent on it.
Comment #8
allie mickaBetter yet, why not a textarea?
Committed, thanks! Though I'm still likely to move the WKT support elsewhere rather than confronting users with the choice right off the bat.
Comment #10
salvatore_severo commentedThere is already a limit on 128 chars? I've just tried, and I think so.