Using the MapGuide Viewer version 6.5 SP1, some Zoom Goto's don't work and
return "Unable to locate matching feature(s)" when the object exists and should have been found.
(After these bugs were found, we learned there are two 6.5 SP1 versions released, 6.5.6.11 and 6.5.6.12.
These bugs are reproducible on with the 6.5.6.11 version.
As the two versions are supposed to be functionally identical, the bug should be in both versions.)
Failing Zoom Goto categories appear to fail for all values except the IMS ID which incorrectly returns
"The location does not fall within this map window." for some values.
There may be two Zoom Goto bugs, but the workaround described here resolves both zoom goto problems.
These problems occurred with the version 6.5SP1 Viewer in conjunction with the original version 6.5 Server (not SP1).
Workaround
The best workaround we've found is to append a non-breaking space character as the first character
to be returned by the select statement, by appending a leading chr(160) as shown in this example:
select chr(160) + parcel + ' ',lat,lon,lat,lon from landbase
where parcel like trim(ucase('%s%%')) order by parcel
chr(160) is appropriate for DBF queries. SQL Server queries should use char(160) as the
SQL Server function name is different.
Discussion
Experimenting and testing shows that zoom gotos fail when the contents of the zoom goto's SELECT statement first returned field in any of the returned records begins with one or more numeric characters. The zoom goto works if the first SELECT fields begins with an alphabetic character (among many others) for all returned records.
When more than one record matches the zoom goto request,
the contents of this field are displayed for the user to choose the map object they want to zoom to.
By "first returned field" we mean the string data returned by everything after "select" and before the first comma as indicated with bold in the following sample zoom goto SQL statements.
select parcel + ' ',lat,lon,lat,lon from landbase
where parcel like trim(ucase('%s%%')) order by parcel
select street_all,lat,lon,lat,lon from stinters
where street_all like ucase('%s%%') order by street_all
select str(street_no) + ' ' + street_dir + ' ' + street_nam,lat,lon,lat,lon from adparcel
where street_nam like trim(ucase('%s%')) order by street_nam,street_no
If a non-breaking space character, literal alphabetic character, underscore, or any of many other characters (except blanks and nulls) is added ahead of the string, the zoom goto works but displays the unwanted character.
HOWEVER, unlike other characters that make it work, the non-breaking space still appears as just a space (and a narrow one at that since it's a proportional font).
For example, these SQL statements make the zoom gotos work when the string would otherwise start with a numeric character:
(Of course we don't want to see leading X's or even underscores in the displayed result list.)
select chr(160) + parcel + ' ',lat,lon,lat,lon from landbase
where parcel like trim(ucase('%s%%')) order by parcel
select 'X' + parcel + ' ',lat,lon,lat,lon from landbase
where parcel like trim(ucase('%s%%')) order by parcel
select '_'+street_all,lat,lon,lat,lon from stinters
where street_all like ucase('%s%%') order by street_all
select str(street_no) + ' ' + street_dir + ' ' + street_nam,lat,lon,lat,lon from adparcel
where street_nam like trim(ucase('%s%')) order by street_nam,street_no
This SP1ZoomGotoBug.mwf MWF file demonstrates the problems for
these Zoom Goto categories below and possibly other Zoom Goto categories as well. Indicated values are just sample values to try.
If you try the these MWF Zoom Goto's with the version 6.5SP1 Viewer they fail.
If you try them with the version 6.5 Viewer, they work.
This SP1ZoomGotoBugFIX.mwf MWF file demonstrates the workaround
of appending a non-breaking space character, decimal 160 or hexadecimal A0 entered as chr(160), ahead of the
these Zoom Goto categories.
This sample MWF works with both base 6.5 Viewer and the version 6.5SP1 Viewer.
- Owner Name -- "SMITH" fails. (The returned strings all start with numeric parcel code characters.)
- IMS ID (Sanitary Sewer Manhole ID) -- "8419-01" and many others work. "50-17" incorrectly returns "The location does not fall within this map window."
"1703-03" has failed the same way but sometimes works.
- St. Intersection (Enter one name only) -- "STONE" fails. (The returned list of intersection streets includes some streets starting with numeric characters.
I.E. "1ST ST / STONE AV")
- Street Name (DSD Situs Address) -- "STONE" fails. (The returned string starts with the street number. I.E. 201 N STONE AV
- Street Number (DSD Situs Address) -- "201" fails.
Some of the Zoom Goto's work while others fail. Here are a few Zoom Gotos that work in either MWF map with both the version 6.5 and version 6.5 SP1 Viewer:
- Parcel Code (9 or less char. No dashes.) -- "11720012A" works. (Not sure why this works since it begins with numeric characters.)
- Libraries (Enter * for a complete listing) -- Entering "*" without quotes works. (All returned values start with alphabetic characters.)
- School Name -- "Dietz" works.
- Street Name (Street Network) -- "STONE" works.
- Township Range Section - (TTRRSS) -- "131313" works. (The actual returned string begins with an alphabetic character, "E131313")