[Geomedia-l] Bookmarking in Webpub
Farrell W Jones
fjones at lsu.edu
Tue Jul 24 15:15:24 CDT 2007
I found a way to bookmap a map within Webpub. Currently, Webpub has a
command that lets you bookmark the entire site. When you use this
command in IE, it allows you to add the site to your favorites.
However, the bookmark (or favorite as IE calls it) will only return you
the default map and at its default extents.
I have written a command with a Javascript function that will get the
mapid and the extents (xmin, ymin, xmax, ymax) of the currently
displayed map in Webpub. Using the fact that the default.asp file does
a request for the querystring items map, xmin, xmax, ymin, and ymax, the
Javascript function builds a URL of the form
http://webpub.site.xxx/.../?map=MAP&xmin=XMIN&xmax=XMAX&ymin=YMIN&ymax=Y
MAX
Where MAP, XMIN, XMAX, YMIN, YMAX are taken from the globals of the
Webpub site. The Javascript function executes a method that IE has to
add the URL with a title to your favorites list.
Firefox and Opera DO NOT have such a method for adding to bookmarks.
For these browsers, I display the URL in a prompt window where the user
can copy the URL and paste it into the bookmaps of these browsers.
I did write some additional code in default.asp to check to ensure the
map parameter is not a bogus number. If it is, the webpub site will
produce an unpleasant error. If a bogus number is given, 0 is
substituted for it which causes Webpub to display the default map. I
did not check the extents are for being legitimate. (This check will be
done in some future work.)
To see the function in action, go to
http://campusmap.lsu.edu/map
With popups enabled. Click on the bookmark command icon in about the
middle of the toolbar. It should display a tooltip that states it is
for bookmarking the current map.
Farrell W. Jones ___________________ mailto:fjones at lsu.edu
Associate Director _________________ phone:225-578-6134 fax:225-578-5040
LSU CADGIS Research Laboratory _____ http://www.cadgis.lsu.edu
More information about the GeoMedia-l
mailing list