Last change
on this file was
1,
checked in by myroslav, 18 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
877 bytes
|
Line | |
---|
1 | # Controller Python Script "save_location" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind state=state |
---|
7 | ##bind subpath=traverse_subpath |
---|
8 | ##parameters= |
---|
9 | ##title= |
---|
10 | # |
---|
11 | |
---|
12 | latitude = context.REQUEST.get('latitude', 0) |
---|
13 | longitude = context.REQUEST.get('longitude', 0) |
---|
14 | maplatitude = context.REQUEST.get('maplatitude', 0) |
---|
15 | maplongitude = context.REQUEST.get('maplongitude', 0) |
---|
16 | mapzoom = context.REQUEST.get('mapzoom', 0) |
---|
17 | maptype = context.REQUEST.get('maptype', 0) |
---|
18 | |
---|
19 | if not (maplatitude and maplongitude): mapcenter=() |
---|
20 | else: mapcenter = (float(maplatitude), float(maplongitude)) |
---|
21 | |
---|
22 | context.restrictedTraverse('@@LocationView').editLocation(latitude, longitude) |
---|
23 | context.restrictedTraverse('@@MapView').editMapOptions(mapcenter, mapzoom, maptype) |
---|
24 | |
---|
25 | return state.set(portal_status_message="geoLocation property updated") |
---|
26 | |
---|
Note: See
TracBrowser
for help on using the repository browser.