PHP/Mapscript + dBox rubber-band?

Dave Nuttall dnuttall at DNLT.COM
Thu Jan 10 06:01:35 EST 2008


Greetings Readers,

I've been having fun learning with PHP/Mapscript and trying to figure out
what causes a somewhat bizarre response from a home-brewed interface.

My experiment has taken liberties with an example from the HostGIS distro
where the rubber-band zoom or query is the highest interest item.

My base *.map has two polygon layers. A valid "visual" for the layers would
be the 48 states (CONUS).

Each polygon layer draws the outlines with a black perimeter and
solid pattern for the interior.

The layer with 47 states paints all the polygons with the same interior
pattern, while the "highlighted" or featured polygon paints with a
contrasting shade.

I get precisely the expected output when I test with "shp2img", i.e. the
highlighted/featured polygon in the approximate middle and surrounded by the
appropriate and contrasting polygons. 

My home-brew combination based on the HostGIS example tries to use a
combination of PHP/Mapscript and what seems to be the appropriate JS,
apparently dBox.

My dilemma is that when the map displays via the full application, 
the result has the featured polygon at the approximate middle/center, but
the entire map is shaded according to the surrounding specs, which implies
the "featured" layer in the *.map is either being ignored or overwritten.  I
have experimented with reversing the order in the *.map and that does not
change anything.

I queried the HostGIS folks and was told that I should consider one of the
new frameworks and that the example distributed is "old" so no real
advantage gained from that collaboration.

Since I TOO am somewhat older than most folks likely to be fooling with this
stuff, I have to reject the idea that "old needs to be replaced by newer"!!!
 But seriously, my sense is that something in the dbox.msdraw() code needs
to be changed, else stuff like Mr. Lime's Itasca 5.0 demo would have similar
issues.

My experiment is on a VMware partition behind my home firewall, but I can
open ports 80 and 22 if some responsible person wants a "look-see", etc.

If your answer is "use CGI", or a CGI-centric framework, I say in advance:
Thank you, they're OK but I have my reasons for trying to figure this out
using PHP-Mapscript and DHTML/JS and achieve XHTML-compliance.

Thanks.
Dave Nuttall
San ANtonio, Texas



More information about the mapserver-users mailing list