[mapserver-users] Dynamic Reference Map
Emerson, Gabe
gemerson at WelshCo.com
Fri Jul 18 13:23:32 PDT 2008
Hello everyone. My apologies if this has been solved already, but I've
read through the previous posts on this topic and haven't found a
solution that works for me.
I'm trying to replace the default reference map image and extent on the
fly, using Javascript in my template file. Basically, I want to check if
the map is zooming out past a certain scale and/or leaving the area
covered by the default reference map, and display a reference map of the
entire state (the default is the local metro area).
I'm using the 5.2.0 version of mapserv that comes with ms4w 2.2.7
(although ms4w's default index page claims it's still 2.2.6 with mapserv
5.0). From what I've read in the docs and mailing list archives, I
should be able to do what I want in one of two ways:
-Include in the url: map_reference_image='/images/mnref.gif'
-Or alternatively: map_reference=IMAGE+'/images/mnref.gif'
The first method gives me this error:
loadReferenceMap(): Unknown identifier. Parsing error near
(/images/mnref.gif):(line 1)
And the second method gives me this:
loadReferenceMap(): Unknown identifier. Parsing error near (IMAGE):(line
1)
I've tried these with every combination of quotes, escaped quotes, no
quotes, etc, without luck. What I CAN do is turn the reference map on
and off with map_reference=STATUS+off in the url, but that seems to be
the only reference object parameter that I can change.
According to what I've read I'm pretty sure this is possible, there was
even a code update to make the first method work in an earlier version.
Hopefully I'm just missing something obvious and someone can point out
my newb mistake.
Thanks!
Gabe Emerson
Research Department
Welsh Companies
4350 Baker Road, Suite 400
Minnetonka, MN 55343-8695
952-897-7700, ext. 1306
gemerson at welshco.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080718/eafed0b4/attachment.htm>
More information about the MapServer-users
mailing list