MapGuide Open Source:  Home |  Download |  Internals

Ticket #3 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

MapTips fail when properties have null values

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

Description

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

02/22/07 17:32:47 changed by anonymous

  • status changed from new to assigned.
  • owner set to anonymous.
  • milestone set to 1.2.

02/27/07 13:50:37 changed by tomfukushima

  • external_id set to 911516.

04/10/07 12:49:25 changed by traianstanev

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

04/10/07 21:09:59 changed by pagameba

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.

04/13/07 16:36:59 changed by trevorwekel

  • status changed from assigned to new.
  • owner changed from anonymous to trevorwekel.

04/13/07 16:37:23 changed by trevorwekel

  • status changed from new to assigned.

04/13/07 18:28:37 changed by trevorwekel

  • status changed from assigned to closed.
  • resolution set to fixed.

04/13/07 18:30:31 changed by trevorwekel