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

CommentFileSizeAuthor
#3 geo-411628.patch707 bytesultimike

Comments

edalcin’s picture

And, please, where can I find the $element['wkt'] array?

Thanks in advance!

edalcin’s picture

I 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!

ultimike’s picture

Component: Code » Geo Field module
StatusFileSize
new707 bytes

Here's a patch to update the maxlength.

-mike

zzolo’s picture

I 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.

allie micka’s picture

Status: Active » Needs review

I'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? ;)

greggles’s picture

While 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.

zzolo’s picture

I 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.

allie micka’s picture

Status: Needs review » Fixed

Better 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

salvatore_severo’s picture

There is already a limit on 128 chars? I've just tried, and I think so.