[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH 14/24] New automatic suggestion mechanism
From: |
Maxime Petazzoni |
Subject: |
[Maposmatic-dev] [PATCH 14/24] New automatic suggestion mechanism |
Date: |
Sun, 10 Jan 2010 15:54:08 +0100 |
The administrative city input field now features an automatic
suggestion drop down list from which the user can choose the city he
wants.
The Javascript has been greatly rewritten to make better usage of JQuery
and for cleaner, more concise code.
---
www/media/Go-next.png | Bin 6596 -> 0 bytes
www/media/Go-next.svg | 62 -------
www/media/go-next.png | Bin 0 -> 2989 bytes
www/media/osm_map.js | 175 ++++++++++++++++++-
www/media/style.css | 71 +++++---
www/templates/maposmatic/index.html | 338 +++++-----------------------------
6 files changed, 268 insertions(+), 378 deletions(-)
delete mode 100644 www/media/Go-next.png
delete mode 100644 www/media/Go-next.svg
create mode 100644 www/media/go-next.png
diff --git a/www/media/Go-next.png b/www/media/Go-next.png
deleted file mode 100644
index
009e5f4f4e953e5a4ec063f481810c9967a0cff5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 6596
zcmai3^;Z<!)8Abh>2457>F$)JrAu;My1S(tB&E9qNkQ19I~D~==~QazPF?)^`~&ZM
z?wOf0bIzT6Cx7`Q=xC|n<I>;)004Y7RVBTDGT=YL#{9=6Y(!`O381&0iXxzKlJ4N2
zf(address@hidden@lbu^{qOqXe*{$IDEQ9-mXF$NFxD~-4kinWd_hYf06?vz
zrlepHuyRrq7+`plhv+-&*xzGgA;KX7l9CbYyh;41i1SH$+YO6cxpuC0yHyJYhvOnO
zOC0Sbi{RSM&M52S>jQm6%1NuKC#N_!u4LqKlIk)address@hidden<Nso&&Tk=*31)P8Xn
z3k%V&z^k==xBcSa(}zF3XJ;0ncbM4RP5q!}|address@hidden&
z=ZIC0*GibltrvzpJ)address@hidden;?oxG9OcvVb<cTZ>ocDj3n>}F;w=C*WLTLd4
z!t-cwE83gT0rAvwjiz*uCzWRvOa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63mACf*?OevI8RR|gM(zAsv-u!V8Be^~?^y8SKa6D&6<1y0*6
z<Q}0=L_}1*7GG-pj?^S4vmRKByXfHbt}hJb=7L(!>mTw^KG79YfPddv7XgwiP;XQ^
z77|3)address@hidden|QGBWhs6q}c>Bg~qQ~$++%#z_9fsaf~TKTW4
zgRm&GeeUpb4uB4B1bGW(93wrz+oMV%2bDz5>address@hidden&H$UYk`K9Jo6suMPLJ&i+0
address@hidden&PIqA-CEqV%JTV|67KRan0S1%`-W#`2
z)b*LP6P5KsrjMi=3dw^=qGxqqyyWkN;address@hidden;?~-AE)qlxiFHbZ;kXFB{)MSMf
zNZX(A&UNvaL%r91w=b<address@hidden<E^M!a)TyfeM3gTSz!?l4S?<(kSz#`g1B
z1{c5x#$M+CQ|TI;address@hidden@%m1_7~huSs&address@hidden;
zW}QjvYlE3PA&address@hidden@address@hidden)mqz&vaqWKAsDPE?RJ&*?t`&GKbkK
z;8|address@hidden<fqo<R3CeEa&address@hidden;;KuT4B|nsv33G-=E`VdZC}Vy^KP!-
zBj$S=L4qL-m0ueE(y_Zop>ds~+e{G4FRCcW-rP#}#-E4kUj6fP4G-|g8LZEa>sYU~
zJ1xY%CIhaN3Y=J>-gqWXF(-*93d|oB;8<xt+^x1Mj$08C?F$ibCDMGU)NLPQ9!b3h
address@hidden@Hd0rxr(a#5bjuBJyoZFc{)L=ww4PmW4;!<om<mI1C`YWkl`v4Yj(TPtXR7`
zxJdv3FUXBf>+at<yjrKw-JAj%ZzU#jG64`~cZ#Gntpq8HJfwL&5N4cu;F=pLSBf)?
zMkA&3yQ{greC#QS07(#~>2|WisbnlX;04qa3*A}ox89)Y7$Dp0uEm7uBZ621Rv{FK
znS7!$ljk%v_B`j6;UJa&S3{kl=RZV^(E1_FYgTW-Sk7WsPfz&mUV?xvlW|M^fzyWt
z$r+odRx)H!+|S|<C*DUBpG9r-9e1kjpe$fK`(address@hidden
zV}+ZU9}`&erJQub_K1`TI_NN*p1)Ln4_==BDQ+5!9eK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8lMy=a)$v%Zfop*_h36H=
z=RYIxmpX%cZZfoZ2CUYfx_dPxsYWI+rf9shfm{q2<2iH!aI+pkx*X_7;1<@R1&Uca
zjkSkTuu`>3X?ZgCeF#-Dp<2T&HJh~-n|3Mqv{l_mfcWjVPaV19P&TUY#-o6+-?(&=
address@hidden(L-!mGIylO1Wt~*86{X5&`Mfs#He~n|hH|5j+w2WK)p6JRX_Ido{f?s+)
z{GI-fjck}KZ=S`-OXH}-6N0=4g$W=DZj7hvi1d2~K_Em~dM3e;)=FhttwMJg#0aCC
zIhAUs!!NG5F6N|ult9y5H{>5^SZQS%i_F55?n&G+HvCrqi+hAhP>)`emLgkz{m{3|
zMhcnnN4l9-<81)address@hidden&YB){>@P0${kGQ(68b}l2=cWjx1$(
zO?9{o*s_M;xWZB*|8`<M6Tfkdo9SCRbMrn#tu`|-l0)address@hidden
z-jAaC(Zd^eraW~j3HQRV4iqbDa~ddvrt}T;SO}QhU+L=xht_7zvZe;address@hidden
address@hidden&(pn2eCJv)_`5?8H;e24T3jjw&yEJ|g*;l-`C%gv>KS*Wqo?qXFRt%!y$u
z545N|64h_7U_PQRjegVcO6xcN&VMIc^;address@hidden;tD}N43mZFQ<address@hidden
zdgAxzJTKQE6s;fqIlAbnX;SK~drPr<(address@hidden
z(45!Kgonj|vFQg(Uc0fjwVJdLvy}L^Mjc}jX9o3(xuTDD=BAS55T+W|rl28Oaiid2
zysCSLIbcvz5X|xf4L`77dLMU^+;D#>QIHU4${QXOGRJAd<JhSld-?9bLs0*PA45(Q
zhZl&a&CJh_#)address@hidden&R~Qpg+QXH&d)5=F&%>U~n-klhvN`v+%#qOa<JAXzirq4o
address@hidden@2!w=p|(~1D)U;address@hidden|DZSm-Dc
zg99fgVn95w6F9!e3%0MP2b7LHz}7z>ZmJ1aXVKS)?JxD>e(AK$AuNe)H0VN870|AP
address@hidden)N$fL{8);hBG}EpuB*1LiL?d=t&P%1Z=2C}l
z(OHUs{`76ErbCpi-?Bg`=2Yl?<address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liA*hi<oZ
z-i$KoJ;ZlVUQQ=<4RG5JJLsDvjYI-{(h+o_mg-r{YoD!3clNzdTXy<<UU05CvWd~N
zk2p1--fmFIIFK|lc#&e`_V?ee)1Gex{Z4v!;address@hidden>$l6d
address@hidden|#IjDZr;;P8I56pPlX&{#-{x!Z{d?T~%n;Y`
zDMO_~IacZo&f129s0U^nPtYeF2|=TGxSY$F3i(Odp5h~%<odjw<dl?J0Ko7sivaIk
address@hidden|Y$IY5km1f4Inpq;$7RHA=3ot=fA8*A>{%r+H<ciW%cZ)address@hidden<&WJ2xd?mt5
zOcU*B>;G1D>E3Z58?JBCd7SFtC=xnmrtxcCJKJ&7sphMR-*o|F%)aPlbl!>QHG4lY
zrURw|%-R$Q)FLYQ8`8=mOt+Z1p8Rhb0P?Owy4~<&?RfV0R^{5h7tex2>;7^uw1p*>
address@hidden@Nf3u1ZM(KSEU^<address@hidden
zpZ65;A^Xl09?o5OL#kGK(YeFUPpf3sJrQ{ptz=*!G;address@hidden>@L>xFb>
zsr-lZzCV^$IUh+7G6p^+`|bPBnl{(!U)<address@hidden<rUV(Gz*D
z&{8#lFin|8VdWgfb?G{N$Aqz$dOk;sWj~isX=P`;*)#vZqcW4P$~;W$pf<|*^oN<I
zfaZI?AiQ|3OwOcdfLE$K&LbH2u`n-)U{k|JEjXxlrQVxgsN%v0&C==#cSWk4%{=I4
ztVDm)O*U4k7`0d&IoV2&`EpCsTQ~^k3+vn9f%$<$l*!eTx<address@hidden;4di+&JjQ
zg~?w3I#B3Fx>qb%Qs<$4+r_FyQ~$gcHr`OsZ1A3O^{M31d925rt>i(RaT+!FBh-t|
zatRp`RKy4Byjvqnh5n4=LrQ(&5M^u%m7ifOyH)95Ub9xt?VaMBlyk8w6<99&{&address@hidden
zV-F~7byF^f)<Xo?2c>ZLm$B%Lm)71zbg(Uy%RS75RrJu__?UlULi>MkiT_ZG-#*KK
Z(address@hidden
diff --git a/www/media/Go-next.svg b/www/media/Go-next.svg
deleted file mode 100644
index b1f69a8..0000000
--- a/www/media/Go-next.svg
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="go-next.svg"
sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions"
inkscape:version="0.43+devel" sodipodi:version="0.32" id="svg11300"
height="48" width="48"
inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
inkscape:export-xdpi="90.000000" inkscape:export-ydpi="90.000000" version="1.0"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs id="defs3">
- <linearGradient id="linearGradient2591">
- <stop style="stop-color: rgb(115, 210, 22);" offset="0" id="stop2593"/>
- <stop style="stop-color: rgb(78, 154, 6);" offset="1.0000000"
id="stop2595"/>
- </linearGradient>
- <linearGradient id="linearGradient8662" inkscape:collect="always">
- <stop id="stop8664" offset="0" style="stop-color: rgb(0, 0, 0);
stop-opacity: 1;"/>
- <stop id="stop8666" offset="1" style="stop-color: rgb(0, 0, 0);
stop-opacity: 0;"/>
- </linearGradient>
- <linearGradient id="linearGradient8650" inkscape:collect="always">
- <stop id="stop8652" offset="0" style="stop-color: rgb(255, 255, 255);
stop-opacity: 1;"/>
- <stop id="stop8654" offset="1" style="stop-color: rgb(255, 255, 255);
stop-opacity: 0;"/>
- </linearGradient>
- <radialGradient gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.04673, -3.74943e-16, 2.8534e-16, 1.55761, -19.518,
3.45209)" r="17.171415" fy="2.8969381" fx="19.701141" cy="2.8969381"
cx="19.701141" id="radialGradient8656" xlink:href="#linearGradient8650"
inkscape:collect="always"/>
- <radialGradient gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1, 0, 0, 0.536723, 2.51101e-15, 16.8731)"
r="15.644737" fy="36.421127" fx="24.837126" cy="36.421127" cx="24.837126"
id="radialGradient8668" xlink:href="#linearGradient8662"
inkscape:collect="always"/>
- <radialGradient inkscape:collect="always" xlink:href="#linearGradient2591"
id="radialGradient2597" cx="22.291636" cy="32.797512" fx="22.291636"
fy="32.797512" r="16.9562" gradientTransform="matrix(0.843022, 1.87188e-16,
-2.26523e-16, 1.02017, 4.4993, 1.38199)" gradientUnits="userSpaceOnUse"/>
- </defs>
- <sodipodi:namedview inkscape:window-y="25" inkscape:window-x="0"
inkscape:window-height="885" inkscape:window-width="1280"
inkscape:showpageshadow="false" inkscape:document-units="px"
inkscape:grid-bbox="true" showgrid="false" inkscape:current-layer="layer1"
inkscape:cy="27.398876" inkscape:cx="34.827552" inkscape:zoom="11.313708"
inkscape:pageshadow="2" inkscape:pageopacity="0.0" borderopacity="0.25490196"
bordercolor="#666666" pagecolor="#ffffff" id="base" fill="#4e9a06"
stroke="#4e9a06"/>
- <metadata id="metadata4">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- <dc:creator>
- <cc:Agent>
- <dc:title>Jakub Steiner</dc:title>
- </cc:Agent>
- </dc:creator>
- <dc:source>http://jimmac.musichall.cz</dc:source>
- <cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"/>
- <dc:title>Go Next</dc:title>
- <dc:subject>
- <rdf:Bag>
- <rdf:li>go</rdf:li>
- <rdf:li>next</rdf:li>
- <rdf:li>right</rdf:li>
- <rdf:li>arrow</rdf:li>
- <rdf:li>pointer</rdf:li>
- <rdf:li>></rdf:li>
- </rdf:Bag>
- </dc:subject>
- </cc:Work>
- <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
- <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
- <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
- <cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
- <cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/>
- <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
- <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
- </cc:License>
- </rdf:RDF>
- </metadata>
- <g inkscape:groupmode="layer" inkscape:label="Layer 1" id="layer1">
- <path transform="matrix(1.27119, 0, 0, 1.27119, -8.11938, -15.1018)" d="M
40.481863 36.421127 A 15.644737 8.3968935 0 1 1 9.1923885,36.421127 A
15.644737 8.3968935 0 1 1 40.481863 36.421127 z" sodipodi:ry="8.3968935"
sodipodi:rx="15.644737" sodipodi:cy="36.421127" sodipodi:cx="24.837126"
id="path8660" style="overflow: visible; marker: none; opacity: 0.299465; color:
rgb(0, 0, 0); fill: url(#radialGradient8668) rgb(0, 0, 0); fill-opacity: 1;
fill-rule: evenodd; stroke: none; stroke-width: 1; stroke-linecap: butt;
stroke-linejoin: miter; stroke-miterlimit: 10; stroke-dasharray: none;
stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display:
inline;" sodipodi:type="arc"/>
- <path sodipodi:nodetypes="cccccccc" id="path8643" d="M 8.5541875,15.517348
L 8.5541875,32.511768 L 21.538,32.511768 L 21.538,41.056806 L
41.497835,24.150365 L 21.41919,7.1251168 L 21.41919,15.522652 L
8.5541875,15.517348 z " style="overflow: visible; marker: none; opacity: 1;
color: rgb(0, 0, 0); fill: url(#radialGradient2597) rgb(0, 0, 0); fill-opacity:
1; fill-rule: evenodd; stroke: rgb(58, 115, 4); stroke-width: 1;
stroke-linecap: round; stroke-linejoin: round; stroke-miterlimit: 10;
stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility:
visible; display: inline;"/>
- <path sodipodi:nodetypes="cccccc" id="path8645" d="M 21.962385,8.2485033 L
21.962385,16.054978 L 9.1452151,16.054978 L 9.1452151,25.095691 C
26.895215,27.095691 25.778752,17.640403 40.528752,24.140403 L
21.962385,8.2485033 z " style="overflow: visible; marker: none; opacity:
0.508021; color: rgb(0, 0, 0); fill: url(#radialGradient8656) rgb(0, 0, 0);
fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1;
stroke-linecap: round; stroke-linejoin: round; stroke-miterlimit: 10;
stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility:
visible; display: inline;"/>
- <path style="overflow: visible; marker: none; opacity: 0.481283; color:
rgb(0, 0, 0); fill: none; fill-opacity: 1; fill-rule: evenodd; stroke: rgb(255,
255, 255); stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter;
stroke-miterlimit: 10; stroke-dasharray: none; stroke-dashoffset: 0pt;
stroke-opacity: 1; visibility: visible; display: inline;" d="M
9.537702,16.561892 L 9.537702,31.546332 L 22.523069,31.546332 L
22.523069,38.941498 L 40.001083,24.145807 L 22.507108,9.3654066 L
22.507108,16.566789 L 9.537702,16.561892 z " id="path8658"
sodipodi:nodetypes="cccccccc"/>
- </g>
-</svg>
\ No newline at end of file
diff --git a/www/media/go-next.png b/www/media/go-next.png
new file mode 100644
index
0000000000000000000000000000000000000000..1409806232cf42aa0b67e83a0acc33240aea6f7c
GIT binary patch
literal 2989
zcmV;e3sUrnP)<h;3K|address@hidden;+S_h00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2igG&
z2{IE)vvM5(01GWiL_t(|+U=Wra9m{>#(&?r>~1zmFSMnF-jX(LX-lA#ViByvO-d7r
zItYUoq>lQBh~ubWOGlib(nRgR0E6Smi28>*$^e6<DT)e$&`M#dMX`WwleS5AbK7K-
zy`OVl|H!2qXxiQEZZ=8JGxJS0XV30_=XuWizR&lbbHIfQ7cN}5aN)v*3l}b2xNzaZ
zg$oxhT)address@hidden;address@hidden;nAaJu0N&K~H(~dc=0L8=QmSXRc
znjOns0g48-)PcQ~wL3Pr0u%u&mn{UP&Jj^BRMa-y<_a**s9s&k)mL7Gu4!IGep6A?
zu+0@<9AWAj6$|EY<Mr$Cc}xXTzqq#HXIEWSXSf24M+HzI0yC$Vv*}}(F|Evx68UnI
address@hidden>7$DH{<XWjRbM^|A4qwal449pHw9<-Ah0>4ytk0Sdez0626kL~kUC
z&address@hidden&}dBX!2xdIf5e-T8$b{yVo>7lbXj;`xm`Jq*;T)qee3q;fY
zUQyey(G{RT0U(26AOg+7K3X~>09;bNgmr6{p=p$h$a9r7^<address@hidden;QJRB&
zIF7Jv$$UPt{z430GXx&5tljYdh;jwUV+_1s0Dw?mf+KBVEZgC{d9%1?!^L>L1|n*E
zMNPx6t2RC2bp^;*1R$q;uRoUJe=WTvQ#LbalymJz*D|address@hidden
address@hidden>address@hidden&=apM-1MWRt^hel!0BPx4o$&6`l2aJ)8LBB
zFJ#eza{*T9%6_e)X2<%XFDS?Q!HSyt?jp^3CcsTKSK#-W96A;vX*p+HHP4;tXGWP9
address@hidden<a5otw?ADh0gPOUD0T!$hWiG(qa;address@hidden)_Wz6
address@hidden|z{oPHC_dYb)B0vD{xaFF3Uoz}WWa!9;JiC0*y-3=kinMJf-<J_dKYf40&{4pl
z;~`RKh=6pImzc~u$B$Bq_RbKmzi|address@hidden>o6D-c!IQVzld1-oriNi^7>0&v=$Pi<
z82sNb^nvY$HoVO|)iyJ2Uvpr)Cv9KD82AlCAJ~6T?yTqA7fW%XBZ6f+%$_xaD?eOK
ziO+*l>T4DKho7E%{f|address@hidden&#|TO)r_kc4TZPj-he>tWpeJBNk7vfB)O`
z_D2!q4TZ6}sqx!^$>D+qQ-fto-iGaDKE{fa<#3{-pIE}e=k>6DeKm7t&address@hidden
z#)j3CLI6i(Acs#v*pATF9U&68Fb$nc*Q{XC!nptynl7&address@hidden@mQlm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*E8rXgKb3@;u6esVE${{5ix`y9t
zfP!dW|6or?Q1Dc$)O&l=li!SuXC&q<z?%o&Da!g`>9WOSdvmwP)bV+A5a{jhp{uiN
za2{%B)B5;U>h5*MI~C?EKq8SSN)ERjLC?a&`8)<5Qv(q?gB^s!eE>FaSM#22KV?sG
zYSEYla1`stV}c^~h|^q0-#=6=oD9xarJ%%PVCWi-?a&@*CmM+$ihdk*YxACMMWTKv
z$rk^&)address@hidden>>rSN$T3{8=;EP|~8l8FQet>Pp$H~+Ej
zpQJtcG^rwBj6|z5ke`tVL-j+QhBi%8_`L>74O}`5w6<YeHi#UQNcSh2U*6dQ=<g#x
z{qML4V-$#RmF4Tv$RAY%5s*>bkfCe%JUU7#Vvz{#Z9yCn5c^NDmN#z?9(<;M6!Noq
zJ)address@hidden
address@hidden(KlbMzJUU32kpa<X`hPT0#!Uc~
z#b6BLoUtyXKZmT;fX&o3g(E^|address@hidden(CQF>A35}%Ma~(U&_gb<TH_<lL$ruiB}m$
zNj74Pi~yxTL5XRgX$s4->1Yd(NF)$(y5gZDUkL8|address@hidden)MONx{Cr2s
z`|`iw_Zo;mB9Ww{Er4ZNh}cKM&HJ~6-hQ?zjr?4Q9b20$j{>L(Fh+KX)X5?oi^k{-
address@hidden|oyP2_ykPjD>O{&S45DcxoqJ4dIws#D)Cz8=;gZm!e
zp6m}K3cScncK|sFIce{V6A^m5Lxg*J07%6`KWTaK;fEpNOs3;7@)%~Sz+pYYcXkHb
ziA5qHq>address@hidden)address@hidden;ZIHMvwK)w@>address@hidden&!s
zsJumh<eAu<Y$%R%ys!1&address@hidden
zIf_9ch|jeKNQP&3-dho3r*;PqKJ(Rh+kt2XQ7RdxrlPeX@@3V=uNhZ<zCmBBokgmY
z9K<MiGp-O`d0g7jS=K8VV`?gRJ9<2>h!y05Ob#N9B^nA&address@hidden|<T}T*
j=P5!LE?l^9F{$u>dTD&address@hidden
literal 0
HcmV?d00001
diff --git a/www/media/osm_map.js b/www/media/osm_map.js
index 89d3b86..b11c833 100644
--- a/www/media/osm_map.js
+++ b/www/media/osm_map.js
@@ -72,7 +72,7 @@ function updateMap()
}
/* Main initialisation function. Must be called before the map is manipulated.
*/
-function init()
+function mapInit()
{
map = new OpenLayers.Map ('map', {
controls:[new OpenLayers.Control.Navigation(),
@@ -93,3 +93,176 @@ function init()
updateMap();
}
+function switchToAdminMode() {
+ $('#mapform tbody').children('tr.bybbox').hide();
+ $('#mapform tbody').children('tr.byadmin').show();
+ $('#map_language_label').hide();
+ $('#map_language_entry').hide();
+}
+
+function switchToBBoxMode() {
+ $('#mapform tbody').children('tr.byadmin').hide();
+ $('#mapform tbody').children('tr.bybbox').show();
+ $('#map_language_label').show();
+ $('#map_language_entry').show();
+ if (map == null)
+ mapInit();
+}
+
+$(document).ready(function() {
+ $('#id_mode_0').bind('click', function(e) { switchToAdminMode(); });
+ $('#id_mode_1').bind('click', function(e) { switchToBBoxMode(); });
+
+ if ($('#id_mode_1').is(':checked'))
+ switchToBBoxMode();
+ else
+ switchToAdminMode();
+
+ suggest('#id_administrative_city', '#suggest',
+ '#id_administrative_osmid', '#id_go_next_btn',
+ { selectedClass: 'selected',
+ timeout: 150
+ });
+});
+
+function suggest(input, results, osm_id, button, options) {
+ var $input = $(input).attr('autocomplete', 'off');
+ var $results = $(results);
+ var $osm_id = $(osm_id);
+ var $button = $(button);
+ var timeout = false;
+
+ // Setup the keyup event.
+ $input.keyup(processKey);
+
+ // Disable form validation via the Enter key
+ $input.keypress(function(e) { if (e.keyCode == 13) return false; });
+
+ function appendValidResult(id, name) {
+ $results.append('<li class="suggestok" id="rad' + id + '">'
+ + name + '</span></li>');
+ return $('#rad' + id);
+ }
+
+ function handleNominatimResults(data, textResult) {
+ closeSuggest();
+
+ if (data.length)
+ $results.show();
+
+ $.each(data, function(i, item) {
+ if (typeof item.ocitysmap_params != 'undefined' &&
+ item.ocitysmap_params['admin_level'] == 8) {
+ var e = appendValidResult(item.ocitysmap_params['id'],
item.display_name);
+
+ e.bind('click', function(e) { setResult($(this)); });
+ e.bind('onmouseover', function(e) { setSelectedResultTo($(this)); });
+ } else {
+ $results.append('<li class="suggestoff">'
+ + item.display_name + '</li>');
+ }
+ });
+ }
+
+ function processKey(e) {
+ clearResult();
+
+ switch (e.keyCode) {
+ case 27: // ESC
+ closeSuggest();
+ break;
+ case 9: // TAB
+ case 13: // OK
+ selectCurrentResult();
+ return false;
+ break;
+ case 38: // UP
+ prevResult();
+ break;
+ case 40: // DOWN
+ nextResult();
+ break;
+ default:
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ timeout = setTimeout(function() {
+ $.getJSON("/nominatim/", {q: $input.val()},
+ handleNominatimResults);
+ }, options.timeout);
+ }
+ }
+
+ function clearResult() {
+ $osm_id.val('');
+ $button.attr('disabled', 'disabled');
+ $button.hide();
+ }
+
+ /* Returns the currently selected result. */
+ function getCurrentResult() {
+ var children = $results.children('li.' + options.selectedClass);
+ if (children.length)
+ return children;
+ return false;
+ }
+
+ /* Set the form to the currently selected result. */
+ function selectCurrentResult() {
+ var elt = getCurrentResult();
+ if (elt)
+ setResult(elt);
+ }
+
+ /* Set the form to the given result. */
+ function setResult(elt) {
+ $osm_id.val(elt.attr('id').substring(3));
+ $input.val(elt.html());
+ closeSuggest();
+ $button.removeAttr('disabled');
+ $button.show();
+ }
+
+ function setSelectedResultTo(elt) {
+ $results.children('li').removeClass(options.selectedClass);
+ if (elt)
+ elt.addClass(options.selectedClass);
+ }
+
+ function prevResult() {
+ var current = getCurrentResult();
+ var new_result;
+
+ if (current) {
+ var prev_valid = current.siblings('li.suggestok');
+ if (prev_valid.length)
+ new_result = prev_valid;
+ } else {
+ new_result = $results.children('li.suggestok:last');
+ }
+
+ setSelectedResultTo(new_result);
+ }
+
+ function nextResult() {
+ var current = getCurrentResult();
+ var new_result;
+
+ if (current) {
+ var next_valid = current.siblings('li.suggestok');
+ if (next_valid.length)
+ new_result = next_valid;
+ } else {
+ new_result = $results.children('li.suggestok:first');
+ }
+
+ setSelectedResultTo(new_result);
+ }
+
+ /* Empty and close the suggestion box. */
+ function closeSuggest() {
+ $results.empty();
+ $results.hide();
+ }
+}
+
diff --git a/www/media/style.css b/www/media/style.css
index 7985b20..c6b4e98 100644
--- a/www/media/style.css
+++ b/www/media/style.css
@@ -259,65 +259,82 @@ a.selectedletter {
#mainfrm tr.label {
font-weight: bold;
- padding-top: 1em;
}
#mainfrm input[type=text] {
- background: #fff6bf;
- border: 2px #ccc solid;
+ border: 1px black solid;
}
-#mapfrm td.image
-{
- text-align: right;
- padding-right: 3em;
- vertical-align: middle;
+#id_go_next_btn {
+ display: none;
+ margin-left: 3em;
}
-#mapfrm input[type=image].btn-enabled {
- display: block;
+#mainfrm input#id_maptitle,
+#mainfrm input#id_administrative_city {
+ width: 600px;
+ font-size: 13pt;
}
-#mapfrm input[type=image].btn-enabled:hover {
- cursor: auto;
-}
+/* Suggest */
+#suggest {
+ margin: 0;
+ margin-top: -3px;
+ position: absolute;
-#mapfrm input[type=image].btn-disabled {
+ width: 600px;
+ list-style: none;
+ background: white;
+ border: 1px black solid;
+ font-size: 13pt;
display: none;
}
-#mapfrm input[type=image].btn-disabled:hover {
- cursor: default;
+#suggest li {
+ padding: 1px;
}
-#mainfrm input.btn-disabled {
- display: none;
+#suggest li.selected {
+ background: #36c;
+ color: white;
+}
+
+#suggest li.suggestok:hover {
+ background: #36c;
+ color: white;
+ cursor: pointer;
}
-#mainfrm input#id_maptitle {
- width: 300px;
+#suggest li.suggestoff {
+ color: grey;
+}
+
+#suggest li.suggestoff:hover {
+ background: #dedede;
+ cursor: help;
+}
+
+#suggest span.suggestid {
+ display: none;
}
#mainfrm tr.bybbox {
display: none;
}
-#map_language_label, #map_language_entry {
+#map_language_label,
+#map_language_entry {
display: none;
}
#map {
- border: 1px solid black;
+ border: 1px black solid;
width: 600px;
height: 350px;
}
#map_bb {
- margin-top: 1em;
-}
-
-#map_bb input {
- width: 5em;
+ display: none;
}
#map .olControlAttribution {
diff --git a/www/templates/maposmatic/index.html
b/www/templates/maposmatic/index.html
index 4cb7652..33f180e 100644
--- a/www/templates/maposmatic/index.html
+++ b/www/templates/maposmatic/index.html
@@ -32,296 +32,20 @@
{{ form.media }}
{% endblock %}
-{% block extrajs %}
-var elemFound = 0;
-var unusableToken = 0;
-var languageList;
-
-function pageinit()
-{
- document.getElementById('id_mode_0').setAttribute('onclick',
- "area_selection_mode_switch('admin-mode')");
- document.getElementById('id_mode_1').setAttribute('onclick',
- "area_selection_mode_switch('bbox-mode')");
-
- if (document.getElementById('id_mode_1').checked)
- area_selection_mode_switch('bbox-mode');
- else
- area_selection_mode_switch('admin-mode');
-
- $('#id_administrative_city').keyup(function (e)
- {
- /* disable autoposting (keycode '13'
== return)
- * doing a search instead */
- if (e.which == 13)
- {
- validate_city_search();
- return false;
- }
- /* reset form */
- else
- {
-
$("#result_nominatim_search").empty();
- toggle_form_validation("false");
- language_selector_hide();
- $('ul.errorlist').remove();
- }
- });
-
- /* the keypress event is responsible of posting our form. We need to
- * catch this too in order to avoid submission. (issue encountered
- * with Chrome browser)
- */
-
- $('#id_administrative_city').keypress(function (e)
- {
- if (e.which == 13)
- {
- return false;
- }
- });
-
- language_selector_hide();
- languageList = $('#id_map_language').html();
-}
-
-
-function area_selection_mode_switch(mode)
-{
- var arr = document.getElementById('mapform').getElementsByTagName('tr');
- for (i=0; i < arr.length; i++) {
- if (arr[i].className.startsWith('byadmin')) {
- arr[i].style.display = 'none';
- if (mode == 'admin-mode')
- arr[i].style.display = 'table-row';
- }
- if (arr[i].className.startsWith('bybbox')) {
- arr[i].style.display = 'none';
- if (mode == 'bbox-mode')
- arr[i].style.display = 'table-row';
- }
- }
-
- if (mode == 'bbox-mode') {
- /* re-activate form */
- toggle_form_validation("true");
- reset_osmid_field();
- language_selector_cancel_filter();
- language_selector_show();
- if (map == null) init();
- }
- else
- {
- /* de-activate form */
- toggle_form_validation("false");
- language_selector_hide();
- /* and empty list of previous Nominatim results */
- $("#result_nominatim_search").empty();
- $("#id_administrative_city").attr("value", "");
- }
-
- language_selector_cancel_filter();
-}
-
-function reset_osmid_field()
-{
- $("#id_administrative_osmid").attr("value", "");
-}
-
-function language_selector_filter(country)
-{
- var nonhidden = null;
- $('#id_map_language').html(languageList);
- $('#id_map_language').find('option').each(function() {
- var ischoosen = $(this).val().match(".._" + country.toUpperCase() + "\..*")
!= null || $(this).val() == 'C';
- if (! ischoosen) {
- $(this).remove();
- }
- else {
- if (nonhidden == null)
- nonhidden = $(this);
- }
- });
-
- nonhidden.attr('selected', 'selected');
-}
-
-function language_selector_show()
-{
- $('#map_language_label').show();
- $('#map_language_entry').show();
-}
-
-function language_selector_hide()
-{
- $('#map_language_label').hide();
- $('#map_language_entry').hide();
-}
-
-function language_selector_cancel_filter()
-{
- $('#id_map_language').html(languageList);
-
- $('#id_map_language').find('option').each(function() {
- if ($(this).val() == 'C') {
- $(this).attr('selected', 'selected');
- }
- });
-}
-
-function update_hidden(obj)
-{
- toggle_form_validation("true");
-
- $("#id_administrative_osmid").attr("value", obj.attr("value"));
- $("#id_administrative_city").attr("value", obj.attr("display_name"));
-}
-
-String.prototype.startsWith = function(str) { return this.indexOf(str) === 0; }
-
-
-function validate_city_search()
-{
-
- toggle_form_validation('false');
- language_selector_cancel_filter();
- $("#result_nominatim_search").empty();
- $("#result_nominatim_search").append("<tr><td colspan=\"2\"><img
src=\"/smedia/loading.gif\" alt=\"Loading\"/></td></tr>");
-
- var searchPat = $("#id_administrative_city").attr("value") ;
-
- elemFound = 0;
- unusableToken = 0;
-
- $.getJSON("/nominatim", {'q': searchPat},
- function(data){
- $("#result_nominatim_search").empty();
-
-
- $.each(data, function(i,item){
- if (typeof item.ocitysmap_params != "undefined")
- {
- if (item.ocitysmap_params['admin_level'] == 8)
- {
- var rad_identifier = "radio" + item.ocitysmap_params["id"];
- $("#result_nominatim_search").append("<tr><td
class=\"nomsrch_bullet\"><input type=\"radio\" id=\""+ rad_identifier + "\"
/></td><td class=\"nomsrch_entry\"><label for=\""+rad_identifier
+"\">"+item.display_name+"</label></td></tr>");
- $("#" +
rad_identifier).attr("name","administrative_tmp_osmid");
- $("#" +
rad_identifier).attr("value",item.ocitysmap_params['id']);
-
- $("#" + rad_identifier).attr("display_name",
item.display_name);
-
- $("#" + rad_identifier).click(function ()
- {
- update_hidden($(this));
-
language_selector_filter(item.country_code);
-
language_selector_show();
- });
-
- elemFound = elemFound + 1;
- }
- }
- else
- {
- var msg = "{% trans "This place cannot be rendered by
MapOSMatic, administrative boundary missing. Please contribute !" %}";
- $("#result_nominatim_search").append("<tr
class=\"nomsrch\"><td class=\"nomsrch_bullet\"><img
src=\"/smedia/icon_alert.png\" "+
- "alt=\"Work In Progress\"/><span>"+ msg + "</span>" +
- "</td><td class=\"nomsrch_entry\"><label
class=\"place_unavailable\""
- + ">" +item.display_name + "</label><span>" + msg +
"</span></td></tr>");
- unusableToken = unusableToken + 1;
- }
- });
-
- if (elemFound == 0)
- {
- toggle_form_validation("false");
- if (unusableToken == 0)
- $("#result_nominatim_search").append("<tr><td
colspan=\"2\"><b>{% trans 'No results found.' %}</b></td></tr>");
- }
- });
-}
-
-function toggle_form_validation(enableForm)
-{
-
- if (enableForm == "true")
- {
- $("#id-go-next-btn").removeAttr("disabled");
- $("#id-go-next-btn").attr("class", "btn-enabled");
- $("#id-go-next-btn").attr("title", "{% trans "Generate" %}");
- }
- else
- {
- $("#id-go-next-btn").attr("disabled", "true");
- $("#id-go-next-btn").attr("class", "btn-disabled");
- $("#id-go-next-btn").attr("title", "{% trans "Please fill in the form
before trying to proceed" %}");
- }
-}
-{% endblock %}
-
{% block menu-home %}class="activelink"{% endblock %}
-{% block extrabody %}onload='pageinit()'{% endblock %}
-
{% block page %}
<h1>MapOSMatic</h1>
-<h2>{% trans "Introduction" %}</h2>
-
-<div style="float: right; margin-left: 3em;">
- <table style="text-align: center"><tbody>
- <tr>
- <td><a href="/smedia/chavagne.png"><img style="width: 200px;"
src="/smedia/chavagne-small.png"></a></td>
- <td><a href="/smedia/chavagne_index.png"><img style="width: 200px;"
src="/smedia/chavagne_index-small.png"></a></td>
- </tr>
- <tr>
- <td>
- {% trans "City Map" %}<br />
- <a href="/smedia/chavagne.png">PNG</a> - <a
href="/smedia/chavagne.pdf">PDF</a> - <a
href="/smedia/chavagne.svg">SVG</a>
- </td>
- <td>
- {% trans "Streets index" %}<br />
- <a href="/smedia/chavagne_index.png">PNG</a> - <a
href="/smedia/chavagne_index.pdf">PDF</a> - <a
href="/smedia/chavagne_index.svg">SVG</a>
- </td>
- </tr>
- </table>
-</div>
-
-<p>
-{% blocktrans %}MapOSMatic is a free software web service that
-allows you to generate maps of cities using
-<a href="http://www.openstreetmap.org">OpenStreetMap</a> data. A city map
-is made of two pages:{% endblocktrans %}
-</p>
+<h2 id="submitmapform">{% trans "Generate your own map" %}</h2>
-<ul>
- <li>{% blocktrans %}The map itself, splitted in squares allowing to easily
look for streets;{% endblocktrans %}</li>
- <li>{% blocktrans %}An index of the streets with references to the squares
on the map.{% endblocktrans %}</li>
-</ul>
-
-<p>
-{% blocktrans %}The generated maps are available in PNG, PDF and
-SVG formats and are ready to be printed.{% endblocktrans %}
-</p>
-
-<p>
-{% blocktrans %}As the data used to generate maps is coming from
-OpenStreetMap, you can freely (under the <a
-href="http://wiki.openstreetmap.org/wiki/License">terms of
-OpenStreetMap license</a>) reuse, sell, modify, ... the generated
-maps.{% endblocktrans %}
-</p>
-
-<p><a href="{% url about %}">{% trans "More details" %} »</a></p>
-
-<h2 style="margin-top: 3em;"><a name="submitmapform" href="#submitmapform">{%
trans "Generate your own map" %}</a></h2>
<form id="mainfrm" method="post" action="{% url main %}#submitmapform"
class="submitmap">
<table id="mapform">
<tr class="label">
<td>{% trans "Area selection mode:" %}</td>
- <td style="vertical-align: bottom" rowspan="8" class="image">
- <input id="id-go-next-btn" type="image" src="/smedia/Go-next.png"
- value="{% trans "Generate" %}" disabled="true"
- title="{% trans "Please fill in the form before trying to
proceed" %}"
- class="btn-disabled" />
+ <td rowspan="8">
+ <input id="id_go_next_btn" type="image" src="/smedia/go-next.png"
+ value="{% trans "Generate" %}" disabled="disabled"
+ title="{% trans "Please fill in the form before trying to
proceed" %}" />
</td>
</tr>
<tr class="field">
@@ -333,8 +57,7 @@ maps.{% endblocktrans %}
<tr class="byadmin label"><td>{% trans "City name:" %}</td></tr>
<tr class="byadmin field"><td>
{{ form.administrative_city }}
- <input type="button" onclick="javascript:validate_city_search();"
- value="{% trans "search" %}" />
+ <ul id="suggest"></ul>
{{ form.administrative_osmid }}
{{ form.administrative_osmid.errors }}
{{ form.administrative_city.errors }}
@@ -352,10 +75,6 @@ maps.{% endblocktrans %}
{{ form.bbox.errors }}
</td></tr>
- <tr class="byadmin field">
- <td><table id="result_nominatim_search"></table></td>
- </tr>
-
<tr class="label" id="map_language_label">
<td>{% trans "Map Index Language:" %}</td>
</tr>
@@ -367,8 +86,50 @@ maps.{% endblocktrans %}
</table>
</form>
+<h2>{% trans "About MapOSMatic" %}</h2>
+
+<div style="float: right; margin-left: 3em;">
+ <table style="text-align: center"><tbody>
+ <tr>
+ <td><a href="/smedia/chavagne.png"><img style="width: 200px;"
src="/smedia/chavagne-small.png"></a></td>
+ <td><a href="/smedia/chavagne_index.png"><img style="width: 200px;"
src="/smedia/chavagne_index-small.png"></a></td>
+ </tr>
+ <tr>
+ <td>
+ {% trans "City Map" %}<br />
+ <a href="/smedia/chavagne.png">PNG</a> - <a
href="/smedia/chavagne.pdf">PDF</a> - <a
href="/smedia/chavagne.svg">SVG</a>
+ </td>
+ <td>
+ {% trans "Streets index" %}<br />
+ <a href="/smedia/chavagne_index.png">PNG</a> - <a
href="/smedia/chavagne_index.pdf">PDF</a> - <a
href="/smedia/chavagne_index.svg">SVG</a>
+ </td>
+ </tr>
+ </table>
+</div>
+
<p>
-{% blocktrans %}<em>MapOSMatic</em> covers the whole world but we need
+{% blocktrans %}MapOSMatic is a free software web service that
+allows you to generate maps of cities using
+<a href="http://www.openstreetmap.org">OpenStreetMap</a> data. A city map
+is made of two pages:{% endblocktrans %}
+</p>
+
+<ul>
+ <li>{% blocktrans %}The map itself, splitted in squares allowing to easily
look for streets;{% endblocktrans %}</li>
+ <li>{% blocktrans %}An index of the streets with references to the squares
on the map.{% endblocktrans %}</li>
+</ul>
+
+<p>
+{% blocktrans %}The generated maps are available in PNG, PDF and
+SVG formats and are ready to be printed.{% endblocktrans %}
+</p>
+
+<p>
+{% blocktrans %}As the data used to generate maps is coming from
+OpenStreetMap, you can freely (under the <a
+href="http://wiki.openstreetmap.org/wiki/License">terms of
+OpenStreetMap license</a>) reuse, sell, modify, ... the generated
+maps. <em>MapOSMatic</em> covers the whole world but we need
contributors to translate and adapt the few parts of <em>MapOSMatic</em>
that are country specific.{% endblocktrans %}
</p>
@@ -394,4 +155,5 @@ length), this page will contain links to the generated
map.{% endblocktrans %}
</p>
+<p><a href="{% url about %}">{% trans "More details" %} »</a></p>
{% endblock %}
--
1.6.3.3.261.g85c6
- [Maposmatic-dev] [PATCH 04/24] Make the ITEMS_PER_PAGE settings local., (continued)
- [Maposmatic-dev] [PATCH 04/24] Make the ITEMS_PER_PAGE settings local., Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 05/24] Add an 'All' link in the letter selection., Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 06/24] Update translation files, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 07/24] French terminoly improvements, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 08/24] New header background, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 09/24] Complete site-wide UI overhaul., Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 10/24] Updated translations to follow the small changes made during the redesign., Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 11/24] Small typographic fix, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 12/24] Add a link on the header, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 13/24] HTML fixes, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 14/24] New automatic suggestion mechanism,
Maxime Petazzoni <=
- [Maposmatic-dev] [PATCH 15/24] Restored the two columns layout., Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 16/24] Put the map generation form on its own page, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 17/24] PO file update for UI changes. French is translated, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 18/24] More work on the form behavior, added info note for unselectable items, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 19/24] Cleanup and comment the suggest JS code, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 20/24] Removed JQuery from the main page, it's not needed there, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 21/24] Finished the form behavior with language preselection, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 22/24] PO files update, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 23/24] Fix layout and stylesheet for browser compatibility, Maxime Petazzoni, 2010/01/10
- [Maposmatic-dev] [PATCH 24/24] Improve suggest box behavior and usability, Maxime Petazzoni, 2010/01/10