using JSON object in ontology browser server side script
[sgn.git] / cgi-bin / cview / map.pl
blob7a83bb537e9f94e7e734455977a6495a9d686cbf
2 use strict;
3 use warnings;
5 use CXGN::Page;
6 use CXGN::DB::Connection;
8 use CatalystX::GlobalContext qw( $c );
10 my $page = CXGN::Page->new();
11 my ( $map_id, $map_version_id, $size, $hilite, $physical, $force, $map_items ) =
12 $page->get_encoded_arguments(
13 qw(
14 map_id
15 map_version_id
16 size
17 hilite
18 physical
19 force
20 map_items
21 ));
23 my $dbh = CXGN::DB::Connection->new;
25 my $referer = $c->request->referer;
27 $c->forward_to_mason_view(
28 '/cview/map/index.mas',
29 dbh => $dbh,
30 map_version_id => $map_version_id,
31 map_id => $map_id,
32 hilite => $hilite,
33 physical => $physical,
34 size => $size,
35 referer => $referer,
36 force => $force,
37 map_items => $map_items,
38 tempdir => $c->tempfiles_subdir('cview'),
39 basepath => $c->path_to(),
42 =head1 NAME
44 map.pl - display top level map web page
46 =head1 DESCRIPTION
48 A script that displays a web page with an overview graph of a map, an abstract and some statistics about the map, using map_id or map_version_id as a parameter.
50 Older versions of this script accepted other parameters, such as the mysterious legacy_id or the more cumbersome map short name. Support for these has been scrapped. Sorry!
52 As well, older versions supported a parameter called "physical", which then, through some inextricable hack displayed a physical map. This parameter has been deprecated but is still supported.
54 On the other hand, a new parameter was added, called "force", which, if set to true, will force the cached images and stats to be re-calculated. Normally, the map overview image and associated image map and the map statistics are cached.
56 Parameters summary:
58 =over 15
60 =item map_id
62 The map_id of the map to display.
64 =item map_version_id
66 the map_version_id of the map to display. Note that map_id and map_version_id are mutually exclusive.
68 =item hilite
70 a space separated, url-encoded string that gives the markers to be highlighted.
72 =item size
74 the size of the map to display. 0 denotes the standard size (smallest), 10 denotes the largest size.
76 =item force
78 if set to true, force the image and map stats caches to be re-calculated.
80 =back
82 =head1 AUTHOR(S)
84 Early versions were written by Robert Ahrens, with later additions by Lukas Mueller and John Binns <zombieite@gmail.com>.
86 Currently maintained by Lukas Mueller <lam87@cornell.edu>.
88 =cut