Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3 closed defect (fixed)

MapTips fail when properties have null values

Reported by: pagameba Owned by: trevorwekel
Priority: medium Milestone: 1.2
Component: AJAX Viewer Version: 1.1.0
Severity: major Keywords:
Cc: External ID: 911516


Maptips fail to appear when the expression references a property that is null for the current feature. Another feature that does not have null values in the properties will produce a map tip.

Is this behaviour by design or a potential bug? Is there a way to work around null values in the data by replacing them with an empty string?

Change History (8)

comment:1 by anonymous, 17 years ago

Milestone: 1.2
Owner: set to anonymous
Status: newassigned

comment:2 by tomfukushima, 17 years ago

External ID: 911516

comment:3 by traianstanev, 17 years ago

There are a couple of workarounds for this. One is to use empty string in the data as you mention. Another is to have two identical theme rules, with one filtering by ISNULL on the property that is NULL. None of these are optimal solutions. If we update the expression evaluation to replace null strings by empty strings, what do you suggest we do for properties which are not strings -- replace NULL integer values by 0? I don't even know if an integer value can be nullable...

comment:4 by pagameba, 17 years ago

Hi Traian, unfortunately this won't work because the use case I was given includes several fields, some or all of which may have null values, across many layers. There are just too many combinations to manage.

I believe the issue is primarily for string fields, but you raise a good point. Since the intention is to create an output string anyway, perhaps it is sufficient to put an empty string for all types?

Another option would be to introduce an IFNULL conditional operator of some kind that would allow the user to provide the default value if the attribute is null? But empty strings would at least prevent things from failing.

comment:5 by trevorwekel, 17 years ago

Owner: changed from anonymous to trevorwekel
Status: assignednew

comment:6 by trevorwekel, 17 years ago

Status: newassigned

comment:7 by trevorwekel, 17 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.