├── index.html ├── media ├── index.html └── site │ ├── index.html │ ├── Twitter │ ├── index.html │ └── twitter_map_icon.png │ ├── elabel │ ├── index.html │ └── elabel_v3.js │ ├── arcgislinkv3 │ ├── index.html │ └── arcgislink_compiled.js │ ├── geoxmlv3 │ ├── index.html │ └── images │ │ ├── index.html │ │ ├── ge.png │ │ ├── m1.png │ │ ├── m2.png │ │ ├── m3.png │ │ ├── m4.png │ │ ├── m5.png │ │ ├── geo.gif │ │ ├── rssb.png │ │ ├── folder.png │ │ ├── icon40.png │ │ ├── icon40s.png │ │ ├── blue_large.png │ │ ├── shadow_large.png │ │ ├── msmarker.shadow.png │ │ └── pushpin_shadow.png │ ├── googlemaps │ ├── index.html │ ├── googlemaps.css.php │ └── googlemapsv3.js │ ├── moodalbox │ ├── index.html │ ├── js │ │ ├── index.html │ │ ├── modalbox1.2hackv3.js │ │ └── modalbox1.3hackv3.js │ ├── css │ │ ├── index.html │ │ └── moodalbox.css │ └── img │ │ ├── index.html │ │ ├── loading.gif │ │ └── closelabel.gif │ ├── googleearthv3 │ ├── index.html │ └── googleearth.js │ └── geolocation │ ├── images │ └── gpsloc.png │ └── js │ └── geolocationmarker.js ├── models ├── index.html └── fields │ ├── index.html │ └── mediakey.php ├── README.md ├── .gitattributes ├── plugin_googlemap3_proxy.php ├── update └── extension.xml ├── plugin_googlemap3.css.php ├── plugin_googlemaps.css.php ├── .gitignore ├── layouts └── dirform.php ├── language ├── en-GB │ └── en-GB.plg_system_plugin_googlemap3.sys.ini ├── sv-SE │ └── sv-SE.plg_system_plugin_googlemap3.sys.ini ├── fr-FR │ └── fr-FR.plg_system_plugin_googlemap3.sys.ini ├── it-IT │ └── it-IT.plg_system_plugin_googlemap3.sys.ini └── es-ES │ └── es-ES.plg_system_plugin_googlemap3.sys.ini ├── plugin_googlemap3_twitteroauth.php ├── plugin_googlemap3_kmlprxy.php ├── plugin_googlemap3_twitter_kml.php ├── plugin_googlemap3.php └── plugin_googlemap3_OAuth.php /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /models/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /models/fields/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/Twitter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/elabel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/arcgislinkv3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/geoxmlv3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/googlemaps/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/moodalbox/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/moodalbox/js/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/googleearthv3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/moodalbox/css/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/moodalbox/img/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/ge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/ge.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/m1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/m1.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/m2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/m2.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/m3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/m3.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/m4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/m4.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/m5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/m5.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/geo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/geo.gif -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/rssb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/rssb.png -------------------------------------------------------------------------------- /media/site/moodalbox/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/moodalbox/img/loading.gif -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/folder.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/icon40.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/icon40s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/icon40s.png -------------------------------------------------------------------------------- /media/site/Twitter/twitter_map_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/Twitter/twitter_map_icon.png -------------------------------------------------------------------------------- /media/site/geolocation/images/gpsloc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geolocation/images/gpsloc.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/blue_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/blue_large.png -------------------------------------------------------------------------------- /media/site/moodalbox/img/closelabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/moodalbox/img/closelabel.gif -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/shadow_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/shadow_large.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/msmarker.shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/msmarker.shadow.png -------------------------------------------------------------------------------- /media/site/geoxmlv3/images/pushpin_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jmosmap/plugin_googlemaps/HEAD/media/site/geoxmlv3/images/pushpin_shadow.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # plugin_googlemaps 2 | This is the Joomla plugin Google maps by Reumer based on Google Maps API version 3. 3 | 4 | You can put the {mosmap} with parameters anywhere in content in Joomla: intro text or main text of an article, components and modules. You can see examples and documentation on my demo site: http://tech.reumer.net. 5 | 6 | Look at the wiki page for more information: https://github.com/jmosmap/plugin_googlemaps/wiki/Welcome 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /plugin_googlemap3_proxy.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Google Maps 5 | Plugin Googlemap for showing Google Maps in your Joomla website 6 | plugin_googlemap3 7 | plugin 8 | system 9 | 3.3 10 | 0 11 | 12 | https://github.com/jmosmap/plugin_googlemaps/releases/download/J25_J3x.v3.3/plugin_googlemaps-J25_J3x.v3.3.zip 13 | 14 | Mike Reumer 15 | 16 | 17 | 18 | 19 | Google Maps 20 | Plugin Googlemap for showing Google Maps in your Joomla website 21 | plugin_googlemap3 22 | plugin 23 | system 24 | 3.3 25 | 0 26 | 27 | https://github.com/jmosmap/plugin_googlemaps/releases/download/J25_J3x.v3.3/plugin_googlemaps-J25_J3x.v3.3.zip 28 | 29 | Mike Reumer 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /media/site/moodalbox/css/moodalbox.css: -------------------------------------------------------------------------------- 1 | /* moodalbox CSS */ 2 | 3 | div#mb_overlay { 4 | position: absolute; 5 | left: 0; 6 | width: 100%; 7 | background-color: #000; 8 | cursor: pointer; 9 | z-index:999; 10 | } 11 | 12 | div#mb_center, div#mb_bottom { 13 | position: absolute; 14 | left: 50%; 15 | overflow: hidden; 16 | background-color: #DDD; 17 | z-index:1000; 18 | } 19 | 20 | div#mb_center { 21 | background-color: #FFF; 22 | z-index:1000; 23 | } 24 | 25 | div#mb_contents { 26 | width: 400px; 27 | height: 400px; 28 | z-index:1000; 29 | border: 10px solid #DDD; 30 | overflow: auto; 31 | background-color: #FFF; 32 | visibility: hidden; 33 | } 34 | 35 | .mb_loading { 36 | background: #DDD url(../img/loading.gif) no-repeat center center; 37 | z-index:1000; 38 | } 39 | 40 | #mb_error { 41 | z-index:1000; 42 | font-size: 1.2em; 43 | color: #CD0000; 44 | font-weight: bold; 45 | text-align: center; 46 | padding: 0.5em; 47 | font-family: Verdana, Helvetica, sans-serif; 48 | } 49 | 50 | #mb_error em { 51 | font-size: 0.8em; 52 | } 53 | 54 | div#mb_bottom { 55 | z-index:1000; 56 | font-family: Verdana, Helvetica, sans-serif; 57 | font-size: 10px; 58 | color: #666; 59 | line-height: 1.4em; 60 | text-align: left; 61 | border: 10px solid #DDD; 62 | border-top-style: none; 63 | } 64 | 65 | a#mb_close_link { 66 | z-index:1000; 67 | display: block; 68 | float: right; 69 | width: 66px; 70 | height: 22px; 71 | background: transparent url(../img/closelabel.gif) no-repeat center; 72 | margin: 5px 0; 73 | } 74 | 75 | div#mb_caption { 76 | z-index:1000; 77 | margin-right: 71px; 78 | } -------------------------------------------------------------------------------- /models/fields/mediakey.php: -------------------------------------------------------------------------------- 1 | element['readonly'] ? ' readonly="' . (int) $this->element['readonly'] . '"' : ''; 53 | $html= str_replace('readonly="readonly"',$readonly, $html); 54 | 55 | return $html; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /media/site/elabel/elabel_v3.js: -------------------------------------------------------------------------------- 1 | // ELabel_v3.js 2 | // 3 | // This Javascript is original provided by Mike Williams 4 | // Community Church Javascript Team 5 | // http://www.bisphamchurch.org.uk/ 6 | // http://econym.org.uk/gmap/ 7 | // 8 | // This work is licenced under a Creative Commons Licence 9 | // http://creativecommons.org/licenses/by/2.0/uk/ 10 | // 11 | // Version 2.0 Adapted for Google Maps API version 3 by Mike Reumer 12 | 13 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7.8=u C.D.R();9 7(c,d,l,i,3,m){1.c=c;1.d=d;1.l=l||"";1.i=i||u C.D.S(0,0);6(3){6(3<0){3=0}6(3>b){3=b}}1.3=3;1.m=m||v;1.g=v}7.8.T=9(){j w=1.z=E.F(\'a\');w.U=1.l;j a=1.4=E.F("a");a.G(w);a.5.V=\'W: X;n: H;\';j I=1.Y();I.Z.G(1.4);6(1.3){6(e(a.5.o)==\'f\'){a.5.o=\'J(k:\'+1.3+\')\'}6(e(a.5.q)==\'f\'){a.5.q=1.3/b}6(e(a.5.r)==\'f\'){a.5.r=1.3/b}6(e(a.5.k)==\'f\'){a.5.k=1.3/b}}6(1.g){1.A()}};7.8.10=9(){1.4.11.12(1.4);1.4=K};7.8.13=9(){s u 7(1.c,1.d,1.l,1.i,1.3,1.m)};7.8.B=9(){j L=1.14();j p=L.15(1.c);j h=16(1.4.17/2);1.4.5.18=(p.x+1.i.19)+"M";1.4.5.1a=(p.y+1.i.1b-h)+"M";1.4.5.1c=\'1d\';1.z.N=1.d};7.8.O=9(){6(1.4){1.4.5.n=\'H\'}1.g=v};7.8.A=9(){6(1.4){1.4.5.n=\'g\'}1.g=t};7.8.1e=9(){6(1.4){6(1.4.5.n=="g"){1.O()}P{1.A()}}};7.8.1f=9(){6(1.1g()){1.Q(K)}P{1.Q(1.1h)}};7.8.1i=9(){s 1.g};7.8.1j=9(){s t};7.8.1k=9(d){1.d=d;1.z.N=d;1.B(t)};7.8.1l=9(c){1.c=c;1.B(t)};7.8.1m=9(3){6(3){6(3<0){3=0}6(3>b){3=b}}1.3=3;6(1.3){6(e(1.4.5.o)==\'f\'){1.4.5.o=\'J(k:\'+1.3+\')\'}6(e(1.4.5.q)==\'f\'){1.4.5.q=1.3/b}6(e(1.4.5.r)==\'f\'){1.4.5.r=1.3/b}6(e(1.4.5.k)==\'f\'){1.4.5.k=1.3/b}}};7.8.1n=9(){s 1.c};',62,86,'|this||percentOpacity|div_|style|if|ELabel|prototype|function|div|100|point|html|typeof|string|hidden||pixelOffset|var|opacity|classname|overlap|visibility|filter||KHTMLOpacity|MozOpacity|return|true|new|false|span|||span_|hide|draw|google|maps|document|createElement|appendChild|visible|panes|alpha|null|overlayProjection|px|innerHTML|show|else|setMap|OverlayView|Size|onAdd|className|cssText|position|absolute|getPanes|overlayLayer|onRemove|parentNode|removeChild|copy|getProjection|fromLatLngToDivPixel|parseInt|clientHeight|left|width|top|height|display|block|toggle|toggleDOM|getMap|map_|isHidden|supportsHide|setContents|setPoint|setOpacity|getPoint'.split('|'),0,{})) -------------------------------------------------------------------------------- /plugin_googlemap3.css.php: -------------------------------------------------------------------------------- 1 | initialise(); 52 | $user = JFactory::getUser(); 53 | $session = JFactory::getSession(); 54 | 55 | class plugin_googlemap3_css { 56 | function doExecute(){ 57 | // Get config 58 | $plugin = JPluginHelper::getPlugin('system', 'plugin_googlemap3'); 59 | 60 | $jversion = JVERSION; 61 | $params = new JRegistry(); 62 | $params->loadString($plugin->params); 63 | 64 | // Plugin code 65 | $mapcss = $params->get('mapcss', ''); 66 | 67 | // Clean already send output 68 | while (@ob_end_clean()); 69 | 70 | // Set correct header 71 | header('Content-type: text/css; charset=utf-8'); 72 | 73 | echo $mapcss; 74 | } 75 | } 76 | 77 | // Instantiate the application. 78 | $web = new plugin_googlemap3_css; 79 | 80 | // Run the application 81 | $web->doExecute(); 82 | 83 | ?> 84 | 85 | -------------------------------------------------------------------------------- /plugin_googlemaps.css.php: -------------------------------------------------------------------------------- 1 | initialise(); 51 | $user = JFactory::getUser(); 52 | $session = JFactory::getSession(); 53 | 54 | class plugin_googlemap3_css { 55 | function doExecute(){ 56 | // Get config 57 | $plugin = JPluginHelper::getPlugin('system', 'plugin_googlemap3'); 58 | 59 | $jversion = JVERSION; 60 | // In Joomla 1.5 get the parameters in Joomla 1.6 and higher the plugin already has them, but need to be rendered with JRegistry 61 | if (substr($jversion,0,3)=="1.5") 62 | $params = new JParameter($plugin->params); 63 | else { 64 | $params = new JRegistry(); 65 | $params->loadString($plugin->params); 66 | } 67 | 68 | // Plugin code 69 | $mapcss = $params->get('mapcss', ''); 70 | 71 | // Clean already send output 72 | //while (@ob_end_clean()); 73 | 74 | // Set correct header 75 | header('Content-type: text/css; charset=utf-8'); 76 | 77 | echo $mapcss; 78 | } 79 | } 80 | 81 | // Instantiate the application. 82 | $web = new plugin_googlemap3_css; 83 | 84 | // Run the application 85 | $web->doExecute(); 86 | 87 | ?> 88 | 89 | -------------------------------------------------------------------------------- /media/site/googlemaps/googlemaps.css.php: -------------------------------------------------------------------------------- 1 | initialise(); 56 | $user = JFactory::getUser(); 57 | $session = JFactory::getSession(); 58 | } else { 59 | // Joomla 1.6.x/1.7.x/2.5.x 60 | /** 61 | * Import the platform. This file is usually in JPATH_LIBRARIES 62 | */ 63 | require_once JPATH_BASE . '/configuration.php'; 64 | require_once JPATH_LIBRARIES . '/import.legacy.php'; 65 | if (!defined('JVERSION')) 66 | @define( 'JVERSION', "2.5" ); 67 | if (!defined('JDEBUG')) 68 | @define( 'JDEBUG', '0' ); 69 | $mainframe = JFactory::getApplication('site'); 70 | $mainframe->initialise(); 71 | $user = JFactory::getUser(); 72 | $session = JFactory::getSession(); 73 | } 74 | 75 | class plugin_googlemap3_css { 76 | function doExecute(){ 77 | // Get config 78 | $plugin = JPluginHelper::getPlugin('system', 'plugin_googlemap3'); 79 | 80 | $jversion = JVERSION; 81 | // In Joomla 1.5 get the parameters in Joomla 1.6 and higher the plugin already has them, but need to be rendered with JRegistry 82 | if (substr($jversion,0,3)=="1.5") 83 | $params = new JParameter($plugin->params); 84 | else { 85 | $params = new JRegistry(); 86 | $params->loadString($plugin->params); 87 | } 88 | 89 | // Plugin code 90 | $mapcss = $params->get('mapcss', ''); 91 | 92 | // Clean already send output 93 | while (@ob_end_clean()); 94 | 95 | // Set correct header 96 | header('Content-type: text/css; charset=utf-8'); 97 | 98 | echo $mapcss; 99 | } 100 | } 101 | 102 | // Instantiate the application. 103 | $web = new plugin_googlemap3_css; 104 | 105 | // Run the application 106 | $web->doExecute(); 107 | 108 | ?> 109 | 110 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | *.publishproj 131 | 132 | # NuGet Packages Directory 133 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 134 | #packages/ 135 | 136 | # Windows Azure Build Output 137 | csx 138 | *.build.csdef 139 | 140 | # Windows Store app package directory 141 | AppPackages/ 142 | 143 | # Others 144 | sql/ 145 | *.Cache 146 | ClientBin/ 147 | [Ss]tyle[Cc]op.* 148 | ~$* 149 | *~ 150 | *.dbmdl 151 | *.[Pp]ublish.xml 152 | *.pfx 153 | *.publishsettings 154 | 155 | # RIA/Silverlight projects 156 | Generated_Code/ 157 | 158 | # Backup & report files from converting an old project file to a newer 159 | # Visual Studio version. Backup files are not needed, because we have git ;-) 160 | _UpgradeReport_Files/ 161 | Backup*/ 162 | UpgradeLog*.XML 163 | UpgradeLog*.htm 164 | 165 | # SQL Server files 166 | App_Data/*.mdf 167 | App_Data/*.ldf 168 | 169 | ############# 170 | ## Windows detritus 171 | ############# 172 | 173 | # Windows image file caches 174 | Thumbs.db 175 | ehthumbs.db 176 | 177 | # Folder config file 178 | Desktop.ini 179 | 180 | # Recycle Bin used on file shares 181 | $RECYCLE.BIN/ 182 | 183 | # Mac crap 184 | .DS_Store 185 | 186 | 187 | ############# 188 | ## Python 189 | ############# 190 | 191 | *.py[cod] 192 | 193 | # Packages 194 | *.egg 195 | *.egg-info 196 | dist/ 197 | build/ 198 | eggs/ 199 | parts/ 200 | var/ 201 | sdist/ 202 | develop-eggs/ 203 | .installed.cfg 204 | 205 | # Installer logs 206 | pip-log.txt 207 | 208 | # Unit test / coverage reports 209 | .coverage 210 | .tox 211 | 212 | #Translations 213 | *.mo 214 | 215 | #Mr Developer 216 | .mr.developer.cfg 217 | -------------------------------------------------------------------------------- /media/site/geolocation/js/geolocationmarker.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | /** 16 | * @name GeolocationMarker for Google Maps v3 17 | * @version version 1.0 18 | * @author Chad Killingsworth [chadkillingsworth at missouristate.edu] 19 | * Copyright 2012 Missouri State University 20 | * @fileoverview 21 | * This library uses geolocation to add a marker and accuracy circle to a map. 22 | * The marker position is automatically updated as the user position changes. 23 | */ 24 | 25 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 6(J,F,E){t o={\'Z\':z,\'1h\':\'1g\',\'1M\':z,\'22\':q,\'1f\':{\'1n\':\'/1q/1E/1J/y/1Q/1T.1V\',\'1e\':m d.c.19(18,18),\'1v\':m d.c.19(17,17),\'1F\':m d.c.15(0,0),\'1N\':m d.c.15(8,8)},\'1R\':z,\'7\':m d.c.14(0,0),\'1b\':\'1c 1d\',\'R\':2};b(F){o=3.r(o,F)}t p={\'Z\':z,\'v\':0,\'1r\':\'1s\',\'1t\':.4,\'1x\':\'1z\',\'1B\':.4,\'1D\':1,\'R\':1};b(E){p=3.r(p,E)}3.j=m d.c.1G(o);3.l=m d.c.1L(p);3.f=h;3.7=h;3.g=h;3.n(\'H\',h);3.n(\'I\',({1Z:q,20:24}));3.l.x(\'g\',3.j);b(J){3.u(J)}}6.5=m d.c.A;6.5.n=9(B,X){b(/^(?:7|f)$/i.S(B)){1i\'\\\'\'+B+\'\\\' 1j a 1k-1l 1m.\';}D b(/g/i.S(B)){3.u((X))}D{d.c.A.5.n.1o(3,1p)}};6.5.j=h;6.5.l=h;6.5.11=9(){k 3.g};6.5.T=9(){k(3.U(\'I\'))};6.5.1u=9(V){3.n(\'I\',V)};6.5.1w=9(){k 3.7};6.5.W=9(){b(3.7){k 3.l.W()}D{k h}};6.5.1y=9(){k 3.f};6.5.O=9(){k(3.U(\'H\'))};6.5.1A=9(f){3.n(\'H\',f)};6.5.w=-1;6.5.u=9(g){3.g=g;3.1C(\'g\');b(g){3.Y()}D{3.j.P(\'7\');3.l.P(\'10\');3.l.P(\'v\');3.f=h;3.7=h;N.y.1H(3.w);3.w=-1;3.j.u(g)}};6.5.1I=9(o){3.j.12(3.r({},o))};6.5.1K=9(p){3.l.12(3.r({},p))};6.5.13=9(7){t M=m d.c.14(7.s.1O,7.s.1P),G=3.j.11()==h;b(G){b(3.O()!=h&&7.s.f>3.O()){k}3.j.u(3.g);3.j.x(\'7\',3);3.l.x(\'10\',3,\'7\');3.l.x(\'v\',3,\'f\')}b(3.f!=7.s.f){d.c.A.5.n.16(3,\'f\',7.s.f)}b(G||3.7==h||!3.7.1S(M)){d.c.A.5.n.16(3,\'7\',M)}};6.5.Y=9(){t Q=3;b(N.y){3.w=N.y.1U(9(7){Q.13(7)},9(e){d.c.1W.1X(Q,"1Y",e)},3.T())}};6.5.r=9(L,K){21(t C 23 K){b(6.1a[C]!==q){L[C]=K[C]}}k L};6.1a={\'g\':q,\'7\':q,\'v\':q};',62,129,'|||this||prototype|GeolocationMarker|position||function||if|maps|google||accuracy|map|null||marker_|return|circle_|new|set|markerOpts|circleOpts|true|copyOptions_|coords|var|setMap|radius|watchId_|bindTo|geolocation|false|MVCObject|key|opt|else|opt_circleOpts|opt_markerOpts|mapNotSet|minimum_accuracy|position_options|opt_map|source|target|newPosition|navigator|getMinimumAccuracy|unbind|self|zIndex|test|getPositionOptions|get|positionOpts|getBounds|value|watchPosition_|clickable|center|getMap|setOptions|updatePosition_|LatLng|Point|call||34|Size|DISALLOWED_OPTIONS|title|Current|location|size|icon|pointer|cursor|throw|is|read|only|property|url|apply|arguments|media|strokeColor|1bb6ff|strokeOpacity|setPositionOptions|scaledSize|getPosition|fillColor|getAccuracy|61a0bf|setMinimumAccuracy|fillOpacity|notify|strokeWeight|plugin_googlemap3|origin|Marker|clearWatch|setMarkerOptions|site|setCircleOptions|Circle|draggable|anchor|latitude|longitude|images|optimized|equals|gpsloc|watchPosition|png|event|trigger|geolocation_error|enableHighAccuracy|maximumAge|for|flat|in|1000'.split('|'),0,{})) -------------------------------------------------------------------------------- /layouts/dirform.php: -------------------------------------------------------------------------------- 1 | _mp->mapnm."' action='".$this->protocol.$this->googlewebsite."/maps' method='get' target='_blank' onsubmit='javascript:googlemap".$this->_mp->mapnm.".DirectionMarkersubmit(this);return false;' class='mapdirform'>"; 17 | 18 | $dirform.=$this->_mp->txtdir; 19 | 20 | if ($type=='Marker') { 21 | $dirform.="_mp->txtto=='')?"type='hidden' ":"type='radio' ")." ".(($this->_mp->dirdefault=='0')?"checked='checked'":"")." name='dir' value='to'>".(($this->_mp->txtto!='')?$this->_mp->txtto." ":"")."_mp->txtfrom=='')?"type='hidden' ":"type='radio' ").(($this->_mp->dirdefault=='1')?"checked='checked'":"")." name='dir' value='from'>".(($this->_mp->txtfrom!='')?$this->_mp->txtfrom:""); 22 | $dirform.="
".$this->_mp->txtdiraddr.""; 23 | 24 | if (!empty($this->_mp->address)) 25 | $dirform.="_mp->address."\"/>"; 26 | else 27 | $dirform.="_mp->latitude:$this->_mp->deflatitude).", ".(($this->_mp->longitude!='')?$this->_mp->longitude:$this->_mp->deflongitude)."'/>"; 28 | } 29 | 30 | if ($type=='Form') { 31 | $dirform.=(($this->_mp->txtfrom=='')?"":"
").$this->_mp->txtfrom."_mp->txtfrom=='')?"type='hidden' ":"type='text'")." class='inputbox' size='".$this->_mp->inputsize."' name='saddr' id='saddr' value=\"".(($this->_mp->formdir=='1')?$this->_mp->address:(($this->_mp->formdir=='2')?$this->_mp->toaddress:""))."\" />"; 32 | 33 | $dirform.=(($this->_mp->txtto=='')?"":"
").$this->_mp->txtto."_mp->txtto=='')?"type='hidden' ":"type='text'")." class='inputbox' size='".$this->_mp->inputsize."' name='daddr' id='daddr' value=\"".(($this->_mp->formdir=='1')?$this->_mp->toaddress:(($this->_mp->formdir=='2')?$this->_mp->address:""))."\" />"; 34 | } 35 | 36 | if (($this->_mp->txt_driving!=''||$this->_mp->txt_avhighways!=''||$this->_mp->txt_transit!=''||$this->_mp->txt_bicycle!=''||$this->_mp->txt_walking!='')&&$this->_mp->formdirtype=='1') 37 | $dirform.="
"; 38 | 39 | $dirform.=$this->_processMapv3_templatedirform_dirtype($this->_mp->txt_driving, $this->_mp->dirtype, "D", ""); 40 | $dirform.=$this->_processMapv3_templatedirform_dirtype($this->_mp->txt_avhighways, $this->_mp->avoidhighways, "D", "h"); 41 | $dirform.=$this->_processMapv3_templatedirform_dirtype($this->_mp->txt_avtoll, $this->_mp->avoidtoll, "D", "t"); 42 | $dirform.=$this->_processMapv3_templatedirform_dirtype($this->_mp->txt_transit, $this->_mp->dirtype, "R", "r"); 43 | $dirform.=$this->_processMapv3_templatedirform_dirtype($this->_mp->txt_bicycle, $this->_mp->dirtype, "B", "b"); 44 | $dirform.=$this->_processMapv3_templatedirform_dirtype($this->_mp->txt_walking, $this->_mp->dirtype, "W", "w"); 45 | $dirform.=$this->_processMapv3_templatedirform_checktype($this->_mp->txt_optimize, $this->_mp->diroptimize, "diroptimize"); 46 | $dirform.=$this->_processMapv3_templatedirform_checktype($this->_mp->txt_alternatives, $this->_mp->diralternatives, "diralternatives"); 47 | 48 | $dirform.="
"; 49 | 50 | if ($this->_mp->dir=='2') 51 | $dirform.= ""; 52 | 53 | if ($this->_mp->lang!='') 54 | $dirform.= ""; 55 | 56 | $dirform.=""; 57 | 58 | echo $dirform; 59 | 60 | ?> -------------------------------------------------------------------------------- /language/en-GB/en-GB.plg_system_plugin_googlemap3.sys.ini: -------------------------------------------------------------------------------- 1 | ; $Id: en-GB.plg_system_plugin_googlemap3.sys.ini 2011-01-20 00:05:36 2 | ; Copyright (C) 2011 Tech Reumer. All rights reserved. 3 | ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php 4 | ; Note : All ini files need to be saved as UTF-8 5 | 6 | GOOGLE MAPS="Google Maps" 7 | PLUGIN_GOOGLE_MAP3_INSTALLATION="

Plugin Googlemap - A Joomla plugin

This is version 3.3 of the plugin Google maps for Joomla 1.5+ native, Joomla 2.5+ and Joomla 3.x and support for Google Maps API version 3 (Google Terms).

Install

Just go to Joomla menu Extensions submenu Install/Uninstall (1.5+) or Extensions submenu extension manager tab install (2.5+/3.x) in your administration console. Upload and install the plugin with zip-file, for Joomla 1.5+ use file with J15 in the name and for Joomla 2.5+/3.x use file with J25_J30 in the name.
Then go to Joomla menu Extensions submenu Plugin Manager and publish the Plugin Google Maps.

After publishing the plugin go to the parameters of the plugin by clicking on the name of the plugin. Here you can set the defaults of the parameters and if you want to use Google Maps API version 3 the Google API key (Google APIs Console) because of the usage limits and billing.

Always enable the plugin, because with the extra plugin parameter Published you can set if the mostag must be removed or that the mostag is replace with a Google map.

How to use the plugin in content

You can put the {mosmap} with parameters anywhere in content in Joomla: intro text or main text of an article, components and modules. You can see examples and documentation on my demo site: tech.reumer.net.

Check the html of the content item so there are no html like <br />, <span> or &nbsp; between { } or in the html a return.
If you work with pure html code, be sure that there isn't any '\\r\\n' tags in the mosmap string between { } in your database code.
The plugin works for one line!

It can be once, twice or more to display multiple, inline maps on a single content page for different locations and configurations.

Usage: {mosmap width='500'|height='400'|lat='52.052312'|lon='4.447141'|
zoom='3'|mapType='Satellite'|text='sv DWO'|tooltip='DWO'|
marker='1'|align='center' }
(goto html view of an article and remove the returns between the line or <br /> so its one line)

You can change any of the parameters:

  • width, height to whatever you want although if its too small, you won't see very much.
  • lon and lat for the coordinates
  • zoom can be between 0 (world) and 19 (detailed).
  • mapType can be Normal (default), Satellite, Hybrid or Terrain.
  • text is for the marker, that will show on the map with a balloon. If you don't want to see the text, just set text=" and it will not display, the text is the data displayed above the location pin. Usually it would be used to display an address or hyperlink. A hyperlink is possible use the format: <a href=linkAddress target=linkTarget title=linkTitle>linkName</a>. Don't use (double) quotes!
  • marker is for opening the infowindow (1 default) or close the infowindow (0) initially.
  • dir for adding get directions form for a route at maps.google.com to the coordinates.
  • tooltip is for the marker to have a tooltip when the mouse is on the marker (don't use HTML)
  • address is for a address to search for the coordinates
  • kml is for a url to a kmlfile to load as a overlay on the map for multiple markers or a route

For all parameters see here

 

You can set the single Google key or Multiple urls and Google keys at the parameters by the plugin in the administrator of Joomla. You can register for a Google API Key Google API Console.

" 8 | -------------------------------------------------------------------------------- /language/sv-SE/sv-SE.plg_system_plugin_googlemap3.sys.ini: -------------------------------------------------------------------------------- 1 | ; $Id: en-GB.plg_system_plugin_googlemap3.sys.ini 2011-01-20 00:05:36 2 | ; Copyright (C) 2011 Tech Reumer. All rights reserved. 3 | ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php 4 | ; Note : All ini files need to be saved as UTF-8 5 | ; Swedish translation by Hans Osvalds, hans@osvalds.se 6 | 7 | GOOGLE MAPS="Google Maps" 8 | PLUGIN_GOOGLE_MAP3_INSTALLATION="

Plugin Googlemap - Ett Joomla insticksprogram

Det här är version 3.3 av Google Maps insticksprogram för Joomla 1.5+ grundprogram, Joomla 2.5+ och Joomla 3.x samt support för Google Maps API version 3 (Google Terms).

Installation

Gå till Joomla menyn Tillägg och undermenyn Installera/Avinstallera (1.5+) eller Tillägg och undermenyn Hantera tillägg (2.5+/3.x) på din administrationssida.Ladda upp och installera plugin-filen i sip-format där du för Joomla 1.5+ använder filen som har J15 i namnet och för Joomla 2.5+/3.x filen med J25_J30 i namnet.
Gå sen till Joomla menyn för Tillägg undermenyn Insticksprogram och publicera insticksprogrammet Google Maps.

Gå sedan till inställningarna i insticksprogrammet genom att klicka på insticksprogrammets namn. Här kan du ställa in grundinställningarna av parametrarna och om du vill använda Google Maps API version 3 samt även Googles API nyckel (Google APIs Konsoll)på grund av användar och licenssavtal.

Aktivera alltid insticksprogrammet för då kan du ställa in om mostag skall tas bort eller om den skall ersättas med en Google karta.

Hur man använder insticksprogrammet i sidinnehåll

Du kan lägga till {mosmap} med olika parametrar var du vill i innehållet i Joomla: ingress eller brödtext i en artikel, komponenter och moduler. Du hittar exempel och dokumentation (på engelska) på min demosite: tech.reumer.net.

Kontrollera html-koden i innehållet så att det inte finns html som t ex <br />, <span> eller &nbsp; mellan { } eller i html-koden.
Om du arbetar med ren html-kod så kontrollera att det inte finns några '\\r\\n' taggar i mosmap strängen mellan { } i din databaskod.
Insticksprogrammet fungerar för en rad i taget!

Det kan finnas med en, två eller flera gånger för att visa flera kartor för olika platser på samma sida.

Användning: {mosmap width='500'|height='400'|lat='52.052312'|lon='4.447141'|
zoom='3'|mapType='Satellite'|text='sv DWO'|tooltip='DWO'|
marker='1'|align='center' }
(gå till html-visningen av en artikel och ta bort radbytena mellan raderna eller <br /> så att det blir en enda rad)

Du kan ändra vilken som helst av inställningarna:

  • width, height till vad du vill, men om de är för små så kommer du inte att se särskilt mycket.
  • Longitud och latitud för koordinaterna
  • zoomningen som kan vara mellan 0 (hela jorden) och 19 (detaljerat).
  • mapType kan vara normal (grundinställning), Satellite (satellitbild), Hybrid (blandad) eller Terrain (terräng).
  • texten är till markören som visas på kartan tillsammans med en textbubbla. Om du inte vill visa texten, så skriver du bara text=" så kommer den inte att visas.Texten är det som kommer att visas ovanför platsmarkören. Vanligtvis så används den för att visa en adress eller internetlänk.För att visa en länk så skall man använda följande format: <a href=länkAdress target=länkMål title=länkTitel>länknamn</a>. Använd inte dubbel citat!
  • markören öppnar informationsbubblan (1 grundinställning) eller stänger den (0) först.
  • dir för att lägga till vägbeskrivningar för en rutt i maps.google.com till platsens koordinater.
  • tooltip gör att markören har en tipsruta som visas när muspekaren ligger över platsmarkören (använd inte HTML)
  • address gör en adresssökning för koordinaterna
  • kml är till url-adressen för en kml fil som skall laddas som ett överliggande lager på kartan för flera platsmarkörer eller en rutt.

För en lista på alla inställningar, se här

 

Du kan ställa in en Google nyckel alternativt flera url-adresser och Google nycklar i inställningarna för insticksprogrammet i Joomlas administratörpanel.Du kan registrera dig för en Google API nyckel på Google API Console.

" 9 | 10 | 11 | -------------------------------------------------------------------------------- /language/fr-FR/fr-FR.plg_system_plugin_googlemap3.sys.ini: -------------------------------------------------------------------------------- 1 | ; $Id: fr-FR.plg_system_plugin_googlemap3.sys.ini 2012-02-16 10:05:36 2 | ; Copyright (C) 2011 Tech Reumer. All rights reserved. 3 | ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php 4 | ; Note : TOUS les fichiers ini doivent être enregistrés avec un encodage UTF-8 5 | 6 | GOOGLE MAPS="Cartes Google Maps" 7 | PLUGIN_GOOGLE_MAP3_INSTALLATION="

Plugin Googlemap - un plugin Joomla!

Ceci est la version 3.3 du plugin Google maps pour Joomla 1.5+ native, Joomla 2.5+ et Joomla 3.x. Ce plugin gère les version 3 de Google Maps API (Termes Google).

Installation

Il suffit d'aller dans le menu Extensions Installation/Désinstallation de Joomla!(1.5+) ou le sous-menu Extensions du gestionnaire des extensions, onglet installation pour Joomla!2.5+/3.x) dans l'espace administration de votre site. Téléchargez et installez le plugin (fichier zippé), pour Joomla 1.5, utilisez le fichier dont le nom comporte J15, et pour Joomla 2.5+/3.x utilisez le fichier dont le nom comporte J25.
Une fois l'installation réussie, allez dans le sous-menu des Extensions, menu Gestionnaire des Plugins et publiez le Plugin Google Maps.

Après avoir publier ce plugin, cliquez sur le nom du Plugin pour commencer à paraméter le plugin. Vous pouvez alors définir les paramètres par défaut du plugin. Si vous souhaitez utliser un clé Google API (Consoles des API Google) pour les cartes Google Api - version 3, en raison des nouvelles limitations d'usage et facturation (en cas de dépassement du nombre de cartes chargés depuis votre site) .

Il faut toujours activer le plugin afin de traiter le tag 'mosmap' ou autre (selon vos paramétrages), et que ce tag soit interprété en carte Google et donc que le code soit invisilbe dans la partie contenu de l'article en question.

Comment utiliser ce plugin dans votre contenu

Vous pouvez insérer le tag {mosmap} n'importe où dans le contenu de Joomla! : en intro d'un acticle, dans le contenu d'un article, dans des composants, et modules! Sur mon site Démo, à tout moment, vous pouvez voir des exemples et accéder à la documentation : tech.reumer.net.

Vérifiez bien que le code html de votre article ne transforme pas ou n'ai pas de caractères de substitution <br />, <span> ou &nbsp; dans le tag { }.
Si vous écrivez en code html pur, prenez soin de retirer les tags '\\r\\n' dans la code du plugine, entre { } au sein même du code de votre base de donnée.
Ce plugin ne fonctionne que sur UNE seule et unique ligne! Prenez garde aux retours chariot et autres précisés ci-avant.

Toutefois, vous pouvez afficher, une, deux ou plusieurs cartes Google au sein d'un même article, avec des lieux et configuations différentes.

Utilisation type du plugin: {mosmap Largeur='500'|Hauteur='400'|lat='52.052312'|lon='4.447141'|
zoom='3'|mapType='Satellite'|text='sv DWO'|tooltip='DWO'|
marker='1'|align='center' }
(si vous copiez ce code, pensez à effacer les tags <br /> du code html du plugin, et donc retirer les retour chariot pour obtenir votre code sur 1 seule et même ligne)

Vous pouvez changer les paramètres:

Pour voir TOUS les paramètres utlisés et utilisables : c'est par ici

 

Vous pouvez définir une seule clé Google ou plusieurs dans les paramètres du plugin dans l'interface administation de Joomla!. Pour obtenir une clé pour atteindre la console Google API (nouvelle règlementation)Google API Console.

" 8 | -------------------------------------------------------------------------------- /language/it-IT/it-IT.plg_system_plugin_googlemap3.sys.ini: -------------------------------------------------------------------------------- 1 | ; $Id: it-IT.plg_system_plugin_googlemap3.sys.ini 2011-01-20 00:05:36 2 | ; Created by Giuseppe Lanzetta, Twitter: @glSEOblog, Website: http://www.giuseppelanzetta.com 3 | ; Copyright (C) 2011 Tech Reumer. All rights reserved. 4 | ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php 5 | ; Note : All ini files need to be saved as UTF-8 6 | 7 | GOOGLE MAPS="Google Maps" 8 | PLUGIN_GOOGLE_MAP3_INSTALLATION="

Plugin Googlemap per Joomla

Questa è la versione 3.3 del mambot di google map per Joomla 1.0x, Joomla 1.5+ nativo, Joomla 2.5 o Joomla 3.x con supporto per la API di Google Maps versione 3 (Google Terms).

Installazione

Andare alla voce Installa/Disinstalla del menu Estensioni di Joomla (1.5+) dal proprio pannello di amministrazione. Caricare ed installare il plugin.
Per attivare il plugin è necessario andare in Estensioni/Gestione Plugin (1.5+) e pubblicare Plugin Google Maps.

Dopo aver pubblicato il plugin bisognerà settarne i parametri, per far ciò basterà cliccare sul nome dello stesso. Qui è possibile settare i parametri di default e, cosa ancor più importante, inserire la Google API key (Console delle API di Google) e per le versioni 3 a causa dei limiti di utilizzo delle stesse.

In Joomla 1.5 è necessario attivare sempre il plugin. È anche necessario controllare che siano pubblicati i parametri extra del plugin

Come usare il plugin nei contenuti

Inserire la stringa {mosmap} con i relativi parametri in qualunque punto dei contenuti di Joomla: nel testo introduttivo o nel testo principale. Sono disponibili esempi e documentazione sul sito del plugin: tech.reumer.net.

È importante controllare che nel codice html del plugin non vi siano <br /> o &nbsp; all'interno delle parentesi { }.
Il plugin funziona solo se il codice viene inserito in una unica linea! È anche possibile mostrare più di una mappa in una sola pagina di contenuti

Utilizzo: {mosmap width='500'|height='400'|lat='52.052312'|lon='4.447141'|
zoom='3'|zoomType='Large'|zoomNew='0'|mapType='Satellite'|showMaptype='1'|
overview='0'|text='sv DWO'|tooltip='DWO'|marker='1'|
align='center'}
(rimuovere gli invio tra le righe o i <br /> per avere un'unica linea di codice)

È possibile modificare i seguenti parametri:

width, height: per modificare rispettivamente la larghezza e l'altezza della mappa.

lon, lat: per le coordinate e/o l'indirizzo da cercare con le coordinate

zoom: come specificato nelle Google Maps API può essere impostato a piacere.

zoomType: questo parametro controlla il tipo di funzione zoom mostrato, può essere impostato a Small, Large o None per non mostrarlo.

zoomNew: può essere impostato a 1 per avere lo zoom continuo ed effettuare lo zoom con il doppio click, 0 per per impostare il clicca e centra (default 0)

zoomWheel: controllo dello zoom con lo scroller del mouse, può essere attivato impostando il parametro a 1, 0 per disattivarlo (default 0)

mapType: può essere impostato a Normal (default), Satellite, Hybrid o Terrain.

showMaptype: 0 per non mostrare il controllo sul tipo di mappa e 1 per mostrarlo (default 1)

Overview: 0 per non mostrare la finestra overview in basso a destra, 1 per mostrarla e 2 per attivare l'overview e mostrarla inizialmente chiusa (default 0)

text: il testo da mostrare nella infowindow del marker. Per non mostrare testo basta impostare text=". Solitamente è usato per mostrare un indirizzo o un link, per quest'ultimo è possibile usare questo formato: <a href=linkAddress target=linkTarget title=linkTitle>linkName</a>. Non utilizzare virgolette!

marker: per mostrare la infowindow inizialmente aperta impostare il parametro a 1 (default), 0 per mostrarla chiusa.

dir: parametro che serve ad aggiungere un form per la ricerca di un percorso da/per il punto indicato dal marker.

tooltip: serve a mostrare un testo ogni volta che si passa con il mouse sul marker (non usare HTML)

icon: inserire l'indirizzo (url) di una immagine per visualizzare il marker con una icona differente da quella di default di Google.

address: per utilizzare un indirizzo al posto delle coordinate

gotoaddr: parametro che serve a mostrare un form per la ricerca di un indirizzo nella mappa (default 0)

kml: indicando un indirizzo di un file kml è possibile mostrare marker multipli o percorsi

traffic: per mostrare il traffico nelle mappe (attualmente funziona solo in USA)

align: per settare l'allineamento della mappa rispetto al contenuto (left, right, center o none)

lightbox: serve a inserire un link/bottone per mostrare la mappa in un lightbox (default 0)

show: per mostrare o no la mappa (default 1). Con lightbox attivo la mappa verrà visualizzata solo quando si farà click sul link/bottone.

 

La Google Key può essere impostata direttamente nel tag mosmap (opzionale), è anche possibile settare domini e key multiple dalla pagina di amministrazione del plugin. Per ottenere una Google API Key Google API Console.

" 9 | -------------------------------------------------------------------------------- /language/es-ES/es-ES.plg_system_plugin_googlemap3.sys.ini: -------------------------------------------------------------------------------- 1 | ; $Id: es-ES.plg_system_plugin_googlemap3.sys.ini 2011-01-20 00:05:36 2 | ; Created by Tod Normal, website: 3 | ; Copyright (C) 2011 Tech Reumer. All rights reserved. 4 | ; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php 5 | ; Note : All ini files need to be saved as UTF-8 6 | 7 | GOOGLE MAPS="Mapas de Google" 8 | PLUGIN_GOOGLE_MAP3_INSTALLATION="

Plugin Googlemap - Un Joomla plugin

Este plugin es la version 3.3 de el mambot de mapas de google para Joomla 1.5+, Joomla 2.5+ y Joomla 3.x soportando los API 3 de Google Maps (Google Terms).

Instalación

Ir al menu Extensiones submenu Gestor de Extensiones (2.5+/3.x) o menu Extensiones, submenu Instalar/desinstalar (1.5+) en la consola del administrador. Descargue e instale el plugin con el archivo zip, para Joomla 1.5 use el archivo con J15 en el nombre y para Joomla 2.5/3.x use el archivo J25_J30 en el nombre.
Entonces vaya al menu Extensiones submenu Gestor de Plugin y publique el Plugin Google Maps (1.5+ o 2.5+ o 3.x).

Después de publicar el plugin vaya a los parametros de el plugin pulsando el boton del raton sobre el nombre del plugin. Aqui puedes ajustar los valores por omision de los parametros y ajustar la Google API key (Google APIs Console) for google maps version 3 because of the usage limits and billing.

Para Joomla 1.5 publique siempre el plugin. Con el parametro extra plugin Publicado puedes ajustar si el mostag debe ser removido o si el mostag es reemplazado con el Googlemap.

Como usar el plugin dentro del contenido

Puedes colocar el {mosmap} con parametros en cualquier lugar del contenido de Joomla: texto introductorio o el cuerpo del texto. Puedes ver ejemplos y documentación en mi sitio demo: tech.reumer.net.

Revisa el html de el item de contenido asi como <br /> o &nbsp; entre { } o en el html un enter.
If you work with pure html code, be sure that there isn't any '\\r\\n' tags in the mosmap string between { } in your database code.
El plugin trabaja para una línea!

Puede ser una, dos o más para desplegar múltiples, mapas de contenido para diferente localizaciones y configuraciones.

Uso: {mosmap width='500'|height='400'|lat='52.052312'|lon='4.447141'|
zoom='3'|zoomType='Large'|zoomNew='0'|mapType='Satellite'|showMaptype='1'|
overview='0'|text='sv DWO'|tooltip='DWO'|marker='1'|
align='center'}
(remover los retornos de carro entre las líneas o <br /> de forma que sea una sola línea)

Puedes cambiar cualquiera de los parametros:

width (ancho), height (alto) aunque si lo ajustas demasiado sera demasiado pequeño y podrías no ver mucho.

lon y lat para las coordenadas y/o direccion para buscar por las coordenadas (use estandar de su país)

zoom puede ser cualquiera como se específica en el API de Google Maps.

zoomType, puede ser Small o Large, este controlael tipo de la función de zoom desplegada o None para que no haya control de zoom.

zoomNew, puede ser 1 para continuo zoom con docleclick y zoom o 0 para un click (por omision esta en 0)

zoomWheel, puede ser 1 para zoom con la rueda del mouse y 0 para no hacer zoom con la rueda del mouse (por omisión 0)

mapType puede ser Normal (default), Satellite, Hybrid or Terrain.

showMaptype es 0 para que no haya controles de Maptype y 1 muestra dichos controles (por omision 1)

Overview es 0 para que no se abra una ventana de sobrevista en la esquina inferior derecha y 1 muestra la sobrevista y 2 para la sobrevista habilitada pero cerrada en un principio (por omision 0)

text es para el marcador, mostrandolo en el mapa como un balón. Si usted no quiere ver el texto, solo ajuste text=" y no lo desplegará, el text es el dato desplegado arribar del pin de la localización. Usualmente podría ser desplegado para mostrar una dirección o enlace. Para un enlace, es posible usar el formato: <a href=linkAddress target=linkTarget title=linkTitle>linkName</a>. No use (double) parentesis!

marker es para abrir la ventana de informacion (1 por omision) o cerrarla (0) inicialmente.

dir para adicionar direcciones de forma que se pueda calcular una ruta como en maps.google.com.

tooltip es para que el marcador tenga un tooltip cuando el raton este sobre la marca (no use HTML)

icon es el url a un icono para el marcador asi que pueda ser diferente al que utiliza por omision Google

address es para buscar una direccion por sus coordenadas

gotoaddr es para un campo de busqueda y boton para que el usuario busque una direccion en el mapa (por omision 0)

kml es para un url a un kmlfile para cargar una capa sobre el mapas para multiples marcadores en una ruta

traffic es para mostrar el trafico en una mapa (Solo en USA actualmente)

align es para la ubicación del mapa respecto al contenido (left, right, center o none)

lightbox es para colocar un enlace/boton para una mostrar una caja de luz en el mapa (por omision 0)

show es para hacer que el mapa se despliegue o no (por omision 1) . Con lightbox sobre el mapa solo aparece el lightbox.

 

Puedes ajustar la llave en el mosmap tag (opcional) o Multiple urls y keys en los parametros del plugin en el administrador de Joomla. Puedes registrarte para un Google API Key Google API Console.

" 9 | -------------------------------------------------------------------------------- /media/site/moodalbox/js/modalbox1.2hackv3.js: -------------------------------------------------------------------------------- 1 | /******************************************************************/ 2 | /* MOOdalBox 1.2.1 */ 3 | /* A modal box (inline popup), used to display remote content */ 4 | /* loaded using AJAX, written for the mootools framework */ 5 | /* by Razvan Brates, razvan [at] e-magine.ro */ 6 | /******************************************************************/ 7 | /* http://www.e-magine.ro/moodalbox */ 8 | /******************************************************************/ 9 | /* */ 10 | /* MIT style license: */ 11 | /* http://en.wikipedia.org/wiki/MIT_License */ 12 | /* */ 13 | /* mootools found at: */ 14 | /* http://mootools.net/ */ 15 | /* */ 16 | /* Original code based on "Slimbox", by Christophe Beyls: */ 17 | /* http://www.digitalia.be/software/slimbox */ 18 | /* */ 19 | /* Changed by Mike Reumer to work with Google Maps, Iframe and */ 20 | /* Opera */ 21 | /* */ 22 | /******************************************************************/ 23 | 24 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('d 2E="3f.. 34 2Y a 3n 30 2X 3z.<1k /><1k />"+"3s 3q 3Z.<1k /><1k />"+"<2S>3W 32 3k 1d.";d 2j=1n;d 2B=2G;d 2O=2G;d 2T=1v;d 2k=1n;d 2n=1v;d 2v=1n;d 2w=1i;d 2A=R;d 2F=R;d 1H={2H:u(b){6.b=3o.1w({22:2j,1h:2B,1X:2O,W:2T,N:2k,1L:2n,1M:2v,2z:2w,3u:2A,3v:2F},b||{});6.1Q=7;6.1S=7;6.1W=7;6.1u=R;6.1Y=7;6.2I=[];$A($$(\'a\')).2K(u(O){c(O.16&&O.E&&O.16.3w(\'^3E\',\'i\')){O.V=6.28.2d(O,6);6.2I.33(O)}},6);6.2e=6.2g.3r(6);6.1O=6.1P.1g(6);6.T=L I(\'q\').Y(\'t\',\'3c\').F(J.1r);6.l=L I(\'q\').Y(\'t\',\'3t\').K({z:6.b.1h+\'o\',h:6.b.1X+\'o\',1f:\'-\'+(6.b.1h/2)+\'o\',y:\'18\'}).F(J.1r);6.j=L I(\'q\').Y(\'t\',\'2Z\').F(6.l);6.n=L I(\'q\').Y(\'t\',\'31\').19(\'y\',\'18\').F(J.1r);6.2a=L I(\'a\').35({t:\'36\',E:\'#\'}).F(6.n);6.2b=L I(\'q\').Y(\'t\',\'3g\').F(6.n);L I(\'q\').19(\'3j\',\'3m\').F(6.n);6.2c=L I(\'q\').Y(\'t\',\'3p\').1K(2E);6.2a.V=6.T.V=6.1d.1g(6);d M=6.M.1g(6);6.v={T:6.T.2h(\'U\',{1m:1v}).2l(),B:6.l.2s({1m:6.b.22,20:M}),j:6.j.2h(\'U\',{1m:1v,20:M}),n:6.n.2s({1m:1n,20:M})};6.3H=3K.3N},28:u(1l){Z 6.1c(1l.E,1l.1Z,1l.16)},1c:u(1E,2C,2D,p,b){6.E=1E;6.1Z=2C;6.16=2D;6.1P();6.1G(1i);d h=1p[\'37\']||J.38[\'X\']||J.1r[\'X\'];6.1b=1A.2x()+(h/15);6.l.K({1b:6.1b+\'o\',y:\'\'});6.v.T.S(0.8);6.p=p;6.r={2Q:7,s:7,P:7,2W:7,21:7,1R:7,23:7,24:7,3y:7,25:7,3B:7,26:7,3F:7,27:7,3G:7};6.r=$1w(6.r,b);6.C={s:7,P:7,2W:7,21:7,1R:7,23:7,24:7,25:7,26:7,27:7};Z 6.29(1E)},1P:u(){6.T.K({1b:1A.2x()+\'o\',h:1A.3M()+\'o\'})},1G:u(1c){d 1V=$A($$(\'3O\'));1V.1w($$(1p.3S?\'3T\':\'3V\'));1V.2K(u(O){O.k.3X=1c?\'3Y\':\'\'});d 1s=1c?\'40\':\'41\';1p[1s](\'42\',6.1O)[1s](\'B\',6.1O);J[1s](\'45\',6.2e);6.G=0},29:u(){c(6.G)Z R;6.G=1;1x=/2f:/;c(6.E.1e(1x)){6.l.1D=\'2i\';d e=6.16.1e(/[0-9]+/g);6.b.W=(e&&(e[0]>0))?e[0]:6.b.1L;6.b.N=(e&&(e[1]>0))?e[1]:6.b.1M;6.n.K({U:\'0\',h:\'1F\',y:\'18\'});6.v.j.2l();6.j.2m="<39 3a=\'"+6.E+"\' z=\'"+(6.b.W-1)+"o\' h=\'"+(6.b.N-1)+"o\' 3b=\'0\'/>";6.M()}12{c(1p.3d.3e<"1.2"){d m=J.2o(6.E);$1w(m,I.3h)}12 d m=J.t(6.E);6.1Y=m.3i;m.F(6.j);6.1Q=m.k.y;m.k.y=\'\';6.1S=m.k.z;6.1W=m.k.h;c(6.p){6.C.s=6.p.2p();6.C.P=6.p.2q();6.C.1R=6.p.3l()}d e=6.16.1e(/[0-9]+%?/g);e[0]=2r(e[0]);14=e[0].2t;c(e[0].2u(14,14-1)=="%")e[0]=m.1o;e[1]=2r(e[1]);14=e[1].2t;c(e[1].2u(14,14-1)=="%")e[1]=m.1J;6.b.W=(e&&(e[0]>0))?e[0]:6.b.1L;6.b.N=(e&&(e[1]>0))?e[1]:6.b.1M;6.j.k.z=6.b.W+\'o\';6.j.k.h=6.b.N+\'o\';m.k.z=6.b.W+\'o\';m.k.h=6.b.N+\'o\';d 13=m.2y("13");d 1q=0;c(13.1a>0){d B=1i;1N(x=0;x<13.1a;x++){c(13[x].t.1t(0,11)==\'3x\')1q=13[x].X-2}}d q=m.2y("q");6.D=7;6.H=7;c(q.1a>1){d B=1i;1N(x=0;x1)6.r.s=L 1T.1U.3L(2L(1y[0]),2L(1y[1]));12 6.r.s=6.C.s}12 6.r.s=6.C.s;c(6.r.P===7)6.r.P=6.C.P;6.p.2M(6.r.s);6.p.2N(3P(6.r.P))}6.n.K({U:\'0\',h:\'1F\',y:\'18\'});6.M()}Z R},3Q:u(){6.j.1K(\'\');6.2c.3R().F(6.j);6.M();6.l.19(\'1z\',\'2P\');6.n.19(\'1z\',\'2P\');6.l.V=6.n.V=6.1d.1g(6)},M:u(){c(!6.1u){3U(6.G++){1j 1:6.l.1D=\'\';6.l.19(\'1z\',\'2R\');6.n.19(\'1z\',\'2R\');6.l.V=6.n.V=\'\';6.2b.1K(6.1Z);6.j.K({z:6.b.W+"o",h:6.b.N+"o"});c(6.l.X!=6.j.1J){6.v.B.S({h:[6.l.X,6.j.1J]});1B}6.G++;1j 2:c(6.l.1C!=6.j.1o){6.v.B.S({z:[6.l.1C,6.j.1o],1f:[-6.l.1C/2,-6.j.1o/2]});1B}6.G++;1j 3:6.n.K({1b:(6.1b+6.l.X)+\'o\',z:6.j.k.z,1f:6.l.k.1f,y:\'\'});6.v.j.S(0,1);1B;1j 4:c(6.b.2z){6.v.n.S({U:[0,1],h:[0,6.n.2U]});1B}6.n.K({U:\'1\',h:6.n.2U+\'o\'});1j 5:6.G=0}}12{6.G=5;6.1u=R}},2g:u(Q){c((Q.2V&&Q.1I==\'w\')||(Q.2V&&Q.1I==\'x\')||(Q.1I==\'43\')){6.1d();Q.44()}},1d:u(){c(6.G<0)Z;1N(d f 46 6.v)6.v[f].47();6.G=-1;6.l.k.y=6.n.k.y=\'18\';6.l.1D=\'2i\';6.v.T.48(6.1G.2d(R,6)).S(0);1x=/2f:/;6.1u=1i;c(!6.E.1e(1x)){d m=J.2o(6.E);c(6.r.2Q){6.C.s=6.p.2p();6.C.P=6.p.2q()}m.F(6.1Y);m.k.z=6.1S;m.k.h=6.1W;m.k.y=6.1Q;c(6.D&&6.D.17)6.D.k.h=6.D.17;c(6.H&&6.H.17)6.H.k.h=6.H.17;c(6.p){1T.1U.Q.2J(6.p,\'B\');6.p.2M(6.C.s);6.p.2N(6.C.P)}49(6.j.4a.1a>0)6.j.4b(6.j.4c)}12{6.j.2m=" "}6.v.B.S({h:[6.l.X,6.b.1X],z:[6.l.1C,6.b.1h],1f:[\'-\'+(6.b.1h/2)+\'o\']});6.v.j.S(1,0);6.n.K({U:\'0\',h:\'1F\',y:\'18\'});Z R}};1A.4d(1H.2H.1g(1H));',62,262,'||||||this|null||||options|if|var|aDim|||height||contents|style|center|obj|bottom|px|map|div|lbmapoptions|mapcenter|id|function|fx|||display|width||resize|oldlbmapoptions|gm|href|injectInside|step|sb|Element|document|setStyles|new|nextEffect|contentsHeight|el|zoom|event|false|custom|overlay|opacity|onclick|contentsWidth|clientHeight|setProperty|return|||else|form|iLen||rel|oldheight|none|setStyle|length|top|open|close|match|marginLeft|bind|initialWidth|true|case|br|link|duration|400|offsetWidth|window|corrheight|body|fn|substr|cls|500|extend|regex|cDim|cursor|Window|break|clientWidth|className|sLinkHref|0px|setup|MOOdalBox|key|offsetHeight|setHTML|defContentsWidth|defContentsHeight|for|eventPosition|position|previousstyle|maptype|previouswidth|google|maps|elements|previousheight|initialHeight|parentobj|title|onComplete|zoom_wheel|resizeDuration|dragging|showmaptype|zoomtype|showscale|overview|click|loadContents|closelink|caption|error|pass|eventKeyDown|http|keyboardListener|effect|mb_loading|_RESIZE_DURATION|_CONTENTS_HEIGHT|hide|innerHTML|_DEF_CONTENTS_WIDTH|getElementById|getCenter|getZoom|String|effects|lenght|substring|_DEF_CONTENTS_HEIGHT|_ANIMATE_CAPTION|getScrollTop|getElementsByTagName|animateCaption|_EVAL_SCRIPTS|_INITIAL_WIDTH|sLinkTitle|sLinkRel|_ERROR_MESSAGE|_EVAL_RESPONSE|250|init|anchors|trigger|each|parseFloat|setCenter|setZoom|_INITIAL_HEIGHT|pointer|follow|default|em|_CONTENTS_WIDTH|scrollHeight|control|zoom_new|your|was|mb_contents|with|mb_bottom|anywhere|push|there|setProperties|mb_close_link|innerHeight|documentElement|iframe|src|frameborder|mb_overlay|MooTools|version|Oops|mb_caption|prototype|parentNode|clear|to|getMapTypeId|both|problem|Object|mb_error|try|bindWithEvent|Please|mb_center|evalScripts|evalResponse|test|gotoaddress|objshowmaptype|request|googlemap|objzoomtype|kmlsidebar|dirsidebar|moodalbox|objshowscale|objoverview|ajaxRequest|typeof|string|Class|LatLng|getHeight|empty|object|parseInt|ajaxFailure|clone|ActiveXObject|select|switch|embed|Click|visibility|hidden|again|addEvent|removeEvent|scroll|esc|stop|keydown|in|clearTimer|chain|while|childNodes|removeChild|firstChild|onDomReady'.split('|'),0,{})) -------------------------------------------------------------------------------- /media/site/moodalbox/js/modalbox1.3hackv3.js: -------------------------------------------------------------------------------- 1 | /******************************************************************/ 2 | /* MOOdalBox 1.3 */ 3 | /* A modal box (inline popup), used to display remote content */ 4 | /* loaded using AJAX, written for the mootools 1.2 framework */ 5 | /* by Razvan Brates, razvan [at] e-magine.ro */ 6 | /******************************************************************/ 7 | /* http://www.e-magine.ro/moodalbox */ 8 | /******************************************************************/ 9 | /* */ 10 | /* MIT style license: */ 11 | /* http://en.wikipedia.org/wiki/MIT_License */ 12 | /* */ 13 | /* mootools found at: */ 14 | /* http://mootools.net/ */ 15 | /* */ 16 | /* Original code based on "Slimbox", by Christophe Beyls: */ 17 | /* http://www.digitalia.be/software/slimbox */ 18 | /* */ 19 | /* Changed by Mike Reumer to work with Google Maps, Iframe and */ 20 | /* Opera */ 21 | /* */ 22 | /******************************************************************/ 23 | 24 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('d 2U="3J.. 3G 3B a 3x 3v 3s 3o.<1w /><1w />"+"47 40 3Z.<1w /><1w />"+"<2p>3A 3i 3g 1g.";d 2b=1j;d 27=34;d 2L=34;d 2K=1k;d 2v=1j;d 2u=1k;d 26=1j;d 37=1e;d 2X=Q;d 2W=Q;d 2Q={2P:v(7){6.7=1q.44({2C:2b,1c:27,1V:2L,T:2K,M:2v,1Q:2u,1P:26,2S:37,3N:2X,3I:2W},7||{});6.1N=b;6.21=b;6.1H=b;6.1p=Q;6.23=b;6.2x=[];29.2B($$(\'a\')).2l(v(O){c(O.17&&O.N&&O.17.3w(\'^3D\',\'i\')){O.V=6.2O.2s(O,6);6.2x.38(O)}},6);1o.A.1G(\'2Z\',6.2r.1f(6));6.1J=6.1K.1f(6);6.E=u R(\'q\').18(\'y\',\'3u\').G(A.1u,"e");6.E=A.y(6.E);6.m=u R(\'q\').18(\'y\',\'42\').z({C:6.7.1c+\'o\',k:6.7.1V+\'o\',1d:\'-\'+(6.7.1c/2)+\'o\',t:\'U\'}).G(A.1u,"e");6.j=u R(\'q\').18(\'y\',\'3P\').G(6.m,"e");6.e=u R(\'q\').18(\'y\',\'41\').13(\'t\',\'U\').G(A.1u,"e");6.28=u R(\'a\').45({y:\'46\',N:\'#\'}).G(6.e,"e");6.2c=u R(\'q\').18(\'y\',\'3b\').G(6.e,"e");u R(\'q\').13(\'3f\',\'3j\').G(6.e,"e");6.2g=u R(\'q\').18(\'y\',\'3q\').1v(\'1L\',2U);6.28.V=6.E.V=6.1g.1f(6);d P=6.P.1f(6);6.D={E:u 1C.2y(6.E,{2z:"W",1l:1k}).1v(0),F:u 1C.2N(6.m,1q.1R({1l:6.7.2C,1T:P},6.7.1m?{2R:6.7.1m}:{})),j:u 1C.2y(6.j,{2z:"W",1l:1k,1T:P}),e:u 1C.2N(6.e,1q.1R({1l:1j,1T:P},6.7.1m?{2R:6.7.1m}:{}))};6.3k=3l.3n},2O:v(1n){19 6.1a(1n.N,1n.22,1n.17)},1a:v(1E,31,33,n,7){6.N=1E;6.22=31;6.17=33;6.1K();6.24(1e);d k=1o[\'3R\']||A.1F[\'14\']||A.1u[\'14\'];6.12=1Y.2a()+(k/15);6.m.z({12:6.12+\'o\',t:\'\'});6.D.E.S(0.8);6.n=n;6.r={2d:b,s:b,H:b,2e:b,2f:b,1I:b,2h:b,2i:b,3p:b,2j:b,3r:b,2k:b,4i:b,2m:b,3y:b};6.r=1q.1R(6.r,7);6.B={s:b,H:b,2e:b,2f:b,1I:b,2h:b,2i:b,2j:b,2k:b,2m:b};19 6.2n(1E)},1K:v(){6.E.z({12:1Y.2a()+\'o\',k:1Y.3H()+\'o\'})},24:v(1a){d 2o=29.2B($$(\'3K\'));2o.2l(v(O){O.l.2q=1a?\'3Q\':\'\'});d 1r=1a?\'1G\':\'3S\';1o[1r](\'3W\',6.1J)[1r](\'F\',6.1J);A[1r](\'2Z\',6.3X);6.I=0},2n:v(){c(6.I)19 Q;6.I=1;1s=/2t:/;c(6.N.1h(1s)){6.m.1M=\'2w\';d h=6.17.1h(/[0-9]+/g);6.7.T=(h&&(h[0]>0))?h[0]:6.7.1Q;6.7.M=(h&&(h[1]>0))?h[1]:6.7.1P;6.e.z({W:\'0\',k:\'1O\',t:\'U\'});6.j.39(\'3a\');6.j.2A="<3c 3d=\'"+6.N+"\' C=\'"+(6.7.T-1)+"o\' k=\'"+(6.7.M-1)+"o\' 3e=\'0\'/>";6.P()}1i{d p=A.y(6.N);6.23=p.3h;d 2D=A.1F[\'2E\'];p.G(6.j);6.1N=p.l.t;p.l.t=\'\';6.21=p.l.C;6.1H=p.l.k;c(6.n){6.B.s=6.n.2F();6.B.H=6.n.2G();6.B.1I=6.n.3m()}d h=6.17.1h(/[0-9]+%?/g);h[0]=2H(h[0]);Z=h[0].2I;c(h[0].2J(Z,Z-1)=="%")h[0]=p.1x;h[1]=2H(h[1]);Z=h[1].2I;c(h[1].2J(Z,Z-1)=="%")h[1]=p.1S;6.7.T=(h&&(h[0]>0))?h[0]:6.7.1Q;6.7.M=(h&&(h[1]>0))?h[1]:6.7.1P;6.j.l.C=6.7.T+\'o\';6.j.l.k=6.7.M+\'o\';p.l.C=6.7.T+\'o\';p.l.k=6.7.M+\'o\';d Y=p.2M("Y");d 1y=0;c(Y.X>0){d F=1e;1U(x=0;x1){d F=1e;1U(x=0;x1){6.r.s=u 1W.1X.3O(2V(1A[0]),2V(1A[1]))}1i 6.r.s=6.B.s}1i 6.r.s=6.B.s;c(6.r.H===b)6.r.H=6.B.H;6.n.1Z(6.r.s);6.n.20(2Y(6.r.H))}6.E.z({t:\'3T\'});6.e.z({W:\'0\',k:\'1O\',t:\'U\'});A.1F[\'2E\']=2D;6.P()}19 Q},3U:v(){6.j.1v(\'1L\',\'\');6.2g.3V().G(6.j,"e");6.P();6.m.13(\'1B\',\'30\');6.e.13(\'1B\',\'30\');6.m.V=6.e.V=6.1g.1f(6)},P:v(){c(!6.1p){3Y(6.I++){1b 1:6.m.1M=\'\';6.m.13(\'1B\',\'32\');6.e.13(\'1B\',\'32\');6.m.V=6.e.V=\'\';6.2c.1v(\'1L\',6.22);6.j.z({C:6.7.T+"o",k:6.7.M+"o"});c(6.m.14!=6.j.1S){6.D.F.S({k:6.j.1S});1D}6.I++;1b 2:c(6.m.1t!=6.j.1x){6.D.F.S({C:[6.m.1t,6.j.1x],1d:[-6.m.1t/2,-6.j.1x/2]});1D}6.I++;1b 3:c(6.n){6.n.1Z(6.r.s);6.n.20(2Y(6.r.H))}6.e.z({12:(6.12+6.m.14)+\'o\',C:6.j.l.C,1d:6.m.l.1d,t:\'\'});6.D.j.S(1);6.j.z({2q:\'43\'});1D;1b 4:c(6.7.2S){6.D.e.S({W:1,k:6.e.35});1D}6.e.z({W:\'1\',k:6.e.35+\'o\'});1b 5:6.I=0}}1i{6.I=5;6.1p=Q}},2r:v(L){c((L.36&&L.25==\'w\')||(L.36&&L.25==\'x\')||(L.25==\'48\')){6.1g();L.49()}},1g:v(){c(6.I<0)19;1U(d f 4a 6.D)6.D[f].4b();6.I=-1;6.m.l.t=6.e.l.t=\'U\';6.m.1M=\'2w\';6.D.E.4c(6.24.2s(Q,6)).S(0);1s=/2t:/;6.1p=1e;c(!6.N.1h(1s)){d p=A.4d(6.N);c(6.r.2d){6.B.s=6.n.2F();6.B.H=6.n.2G()}p.G(6.23,"e");p.l.C=6.21;p.l.k=6.1H;p.l.t=6.1N;c(6.K&&6.K.16)6.K.l.k=6.K.16;c(6.J&&6.J.16)6.J.l.k=6.J.16;c(6.n){1W.1X.L.2T(6.n,\'F\');6.n.1Z(6.B.s);6.n.20(6.B.H)}4e(6.j.4f.X>0)6.j.4g(6.j.4h)}1i{6.j.2A=" "}6.D.F.S({k:[6.m.14,6.7.1V],C:[6.m.1t,6.7.1c],1d:[\'-\'+(6.7.1c/2)+\'o\']});6.D.j.S(1,0);6.e.z({W:\'0\',k:\'1O\',t:\'U\'});6.E.z({t:\'U\'});19 Q}};1o.1G(\'3t\',v(){2Q.2P()});',62,267,'||||||this|options||||null|if|var|bottom|||aDim||contents|height|style|center|map|px|obj|div|lbmapoptions|mapcenter|display|new|function|||id|setStyles|document|oldlbmapoptions|width|fx|overlay|resize|inject|zoom|step|sb|gm|event|contentsHeight|href|el|nextEffect|false|Element|start|contentsWidth|none|onclick|opacity|length|form|iLen|||top|setStyle|clientHeight||oldheight|rel|setProperty|return|open|case|initialWidth|marginLeft|true|bind|close|match|else|400|500|duration|resizeTransition|link|window|cls|Object|fn|regex|clientWidth|body|set|br|offsetWidth|corrheight|substr|cDim|cursor|Fx|break|sLinkHref|documentElement|addEvent|previousheight|maptype|eventPosition|position|html|className|previousstyle|0px|defContentsHeight|defContentsWidth|append|offsetHeight|onComplete|for|initialHeight|google|maps|Window|setCenter|setZoom|previouswidth|title|parentobj|setup|key|_DEF_CONTENTS_HEIGHT|_INITIAL_WIDTH|closelink|Array|getScrollTop|_RESIZE_DURATION|caption|follow|zoom_new|zoom_wheel|error|dragging|showmaptype|zoomtype|showscale|each|overview|loadContents|elements|em|visibility|keyboardListener|pass|http|_DEF_CONTENTS_WIDTH|_CONTENTS_HEIGHT|mb_loading|anchors|Tween|property|innerHTML|from|resizeDuration|pos|scrollTop|getCenter|getZoom|String|lenght|substring|_CONTENTS_WIDTH|_INITIAL_HEIGHT|getElementsByTagName|Morph|click|init|MOOdalBox|transition|animateCaption|trigger|_ERROR_MESSAGE|parseFloat|_EVAL_RESPONSE|_EVAL_SCRIPTS|parseInt|keydown|pointer|sLinkTitle|default|sLinkRel|250|scrollHeight|control|_ANIMATE_CAPTION|push|fade|hide|mb_caption|iframe|src|frameborder|clear|to|parentNode|anywhere|both|ajaxRequest|Class|getMapTypeId|empty|request|objshowmaptype|mb_error|objzoomtype|your|domready|mb_overlay|with|test|problem|objoverview|gotoaddress|Click|was|googlemap|moodalbox|kmlsidebar|dirsidebar|there|getHeight|evalResponse|Oops|object|typeof|string|evalScripts|LatLng|mb_contents|hidden|innerHeight|removeEvent|block|ajaxFailure|clone|scroll|eventKeyDown|switch|again|try|mb_bottom|mb_center|visible|extend|setProperties|mb_close_link|Please|esc|stop|in|cancel|chain|getElementById|while|childNodes|removeChild|firstChild|objshowscale'.split('|'),0,{})) -------------------------------------------------------------------------------- /plugin_googlemap3_twitteroauth.php: -------------------------------------------------------------------------------- 1 | http_status; } 54 | function lastAPICall() { return $this->last_api_call; } 55 | 56 | /** 57 | * construct TwitterOAuth object 58 | */ 59 | function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { 60 | $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); 61 | $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); 62 | if (!empty($oauth_token) && !empty($oauth_token_secret)) { 63 | $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret); 64 | } else { 65 | $this->token = NULL; 66 | } 67 | } 68 | 69 | 70 | /** 71 | * Get a request_token from Twitter 72 | * 73 | * @returns a key/value array containing oauth_token and oauth_token_secret 74 | */ 75 | function getRequestToken($oauth_callback) { 76 | $parameters = array(); 77 | $parameters['oauth_callback'] = $oauth_callback; 78 | $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); 79 | $token = OAuthUtil::parse_parameters($request); 80 | $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); 81 | return $token; 82 | } 83 | 84 | /** 85 | * Get the authorize URL 86 | * 87 | * @returns a string 88 | */ 89 | function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) { 90 | if (is_array($token)) { 91 | $token = $token['oauth_token']; 92 | } 93 | if (empty($sign_in_with_twitter)) { 94 | return $this->authorizeURL() . "?oauth_token={$token}"; 95 | } else { 96 | return $this->authenticateURL() . "?oauth_token={$token}"; 97 | } 98 | } 99 | 100 | /** 101 | * Exchange request token and secret for an access token and 102 | * secret, to sign API calls. 103 | * 104 | * @returns array("oauth_token" => "the-access-token", 105 | * "oauth_token_secret" => "the-access-secret", 106 | * "user_id" => "9436992", 107 | * "screen_name" => "abraham") 108 | */ 109 | function getAccessToken($oauth_verifier) { 110 | $parameters = array(); 111 | $parameters['oauth_verifier'] = $oauth_verifier; 112 | $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters); 113 | $token = OAuthUtil::parse_parameters($request); 114 | $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); 115 | return $token; 116 | } 117 | 118 | /** 119 | * One time exchange of username and password for access token and secret. 120 | * 121 | * @returns array("oauth_token" => "the-access-token", 122 | * "oauth_token_secret" => "the-access-secret", 123 | * "user_id" => "9436992", 124 | * "screen_name" => "abraham", 125 | * "x_auth_expires" => "0") 126 | */ 127 | function getXAuthToken($username, $password) { 128 | $parameters = array(); 129 | $parameters['x_auth_username'] = $username; 130 | $parameters['x_auth_password'] = $password; 131 | $parameters['x_auth_mode'] = 'client_auth'; 132 | $request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters); 133 | $token = OAuthUtil::parse_parameters($request); 134 | $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); 135 | return $token; 136 | } 137 | 138 | /** 139 | * GET wrapper for oAuthRequest. 140 | */ 141 | function get($url, $parameters = array()) { 142 | $response = $this->oAuthRequest($url, 'GET', $parameters); 143 | if ($this->format === 'json' && $this->decode_json) { 144 | return json_decode($response); 145 | } 146 | return $response; 147 | } 148 | 149 | /** 150 | * POST wrapper for oAuthRequest. 151 | */ 152 | function post($url, $parameters = array()) { 153 | $response = $this->oAuthRequest($url, 'POST', $parameters); 154 | if ($this->format === 'json' && $this->decode_json) { 155 | return json_decode($response); 156 | } 157 | return $response; 158 | } 159 | 160 | /** 161 | * DELETE wrapper for oAuthReqeust. 162 | */ 163 | function delete($url, $parameters = array()) { 164 | $response = $this->oAuthRequest($url, 'DELETE', $parameters); 165 | if ($this->format === 'json' && $this->decode_json) { 166 | return json_decode($response); 167 | } 168 | return $response; 169 | } 170 | 171 | /** 172 | * Format and sign an OAuth / API request 173 | */ 174 | function oAuthRequest($url, $method, $parameters) { 175 | if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) { 176 | $url = "{$this->host}{$url}.{$this->format}"; 177 | } 178 | $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); 179 | $request->sign_request($this->sha1_method, $this->consumer, $this->token); 180 | switch ($method) { 181 | case 'GET': 182 | return $this->http($request->to_url(), 'GET'); 183 | default: 184 | return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata()); 185 | } 186 | } 187 | 188 | /** 189 | * Make an HTTP request 190 | * 191 | * @return API results 192 | */ 193 | function http($url, $method, $postfields = NULL) { 194 | $this->http_info = array(); 195 | $ci = curl_init(); 196 | /* Curl settings */ 197 | curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent); 198 | curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout); 199 | curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout); 200 | curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE); 201 | curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:')); 202 | curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer); 203 | curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader')); 204 | curl_setopt($ci, CURLOPT_HEADER, FALSE); 205 | 206 | switch ($method) { 207 | case 'POST': 208 | curl_setopt($ci, CURLOPT_POST, TRUE); 209 | if (!empty($postfields)) { 210 | curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields); 211 | } 212 | break; 213 | case 'DELETE': 214 | curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE'); 215 | if (!empty($postfields)) { 216 | $url = "{$url}?{$postfields}"; 217 | } 218 | } 219 | 220 | curl_setopt($ci, CURLOPT_URL, $url); 221 | $response = curl_exec($ci); 222 | $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE); 223 | $this->http_info = array_merge($this->http_info, curl_getinfo($ci)); 224 | $this->url = $url; 225 | curl_close ($ci); 226 | return $response; 227 | } 228 | 229 | /** 230 | * Get the header info to store. 231 | */ 232 | function getHeader($ch, $header) { 233 | $i = strpos($header, ':'); 234 | if (!empty($i)) { 235 | $key = str_replace('-', '_', strtolower(substr($header, 0, $i))); 236 | $value = trim(substr($header, $i + 2)); 237 | $this->http_header[$key] = $value; 238 | } 239 | return strlen($header); 240 | } 241 | } 242 | -------------------------------------------------------------------------------- /plugin_googlemap3_kmlprxy.php: -------------------------------------------------------------------------------- 1 | initialise(); 51 | $user = JFactory::getUser(); 52 | $session = JFactory::getSession(); 53 | 54 | class plugin_googlemap3_proxy_kml 55 | { 56 | /** 57 | * Display the application. 58 | */ 59 | function doExecute(){ 60 | // Get config 61 | $plugin = JPluginHelper::getPlugin('system', 'plugin_googlemap3'); 62 | 63 | $this->jversion = JVERSION; 64 | $params = new JRegistry(); 65 | $params->loadString($plugin->params); 66 | 67 | // Get params 68 | $this->errorcode = 200; 69 | $this->proxy = intval($params->get('proxy', '0')); 70 | $response = ""; 71 | $debug = intval(JRequest::getVar('debug', '')); 72 | if ($debug!=1) 73 | @ob_start(); 74 | 75 | $this->googlewebsite = $params->get( 'googlewebsite', 'maps.google.com' ); 76 | 77 | // Check access 78 | if ($_SERVER['SERVER_PORT'] == 443) 79 | $this->protocol = "https://"; 80 | else 81 | $this->protocol = "http://"; 82 | 83 | // Restrict access to own domain 84 | if (array_key_exists('HTTP_ORIGIN', $_SERVER)) 85 | $origin = $_SERVER['HTTP_ORIGIN']; 86 | else 87 | $origin = ""; 88 | $pattern = "/(www.)?".$_SERVER['SERVER_NAME']."/i"; 89 | if ($origin!=""&&preg_match($pattern, $origin)==0) 90 | $response = $this->_error(403, "Restricted access"); // 403 91 | 92 | if (array_key_exists('HTTP_REFERER', $_SERVER)) { 93 | $refering=parse_url($_SERVER['HTTP_REFERER']); 94 | if($refering['host']!=$_SERVER['SERVER_NAME']) 95 | $response = $this->_error(403, "Restricted access"); // 403 96 | } 97 | 98 | if (!JSession::checkToken( 'get' ) ) 99 | $response = $this->_error(401, "Invalid token"); // 401 100 | 101 | if ($this->proxy==0) 102 | $response = $this->_error(406, "Method not available"); // 406 103 | 104 | // Get url 105 | $url = JRequest::getVar('url', ''); 106 | if (!is_string($url)||$url=='') 107 | $response = $this->_error(406, "Wrong url"); // 406 108 | 109 | // Valid url 110 | $pattern = '/^(?:[;\/?:@&=+$,]|(?:[^\W_]|[-_.!~*\()\[\] ])|(?:%[\da-fA-F]{2}))*$/'; 111 | if( preg_match( $pattern, $url ) == 0 ) { 112 | $response = $this->_error(406, "Wrong url"); // 406 113 | } 114 | 115 | $id = intval(JRequest::getVar('id', '')); 116 | 117 | if (!$this->_checkurl($id, $url)) 118 | $response = $this->_error(406, "Wrong url"); // 406 119 | 120 | $url = $this->protocol.$url; 121 | 122 | // Set headers 123 | if ($debug!="1") { 124 | header('Content-type: application/vnd.google-earth.kml+xml', true, $this->errorcode); 125 | } 126 | 127 | header('Access-Control-Allow-Origin: '.$this->protocol.$_SERVER['SERVER_NAME']); 128 | header('Access-Control-Allow-Credentials: true'); 129 | header('Access-Control-Allow-Methods: GET'); 130 | 131 | if ($response=="") 132 | $response = $this->_getkml($url); 133 | 134 | $oldValue = libxml_disable_entity_loader(true); 135 | $dom = new DOMDocument('1.0','UTF-8'); 136 | @$dom->loadXML($response); 137 | $kmlOutput = $dom->saveXML(); 138 | 139 | if ($debug!=1) 140 | while (@ob_end_clean()); 141 | 142 | echo $kmlOutput; 143 | } 144 | 145 | function _checkurl($id, $url) { 146 | // check if it is the twitter url 147 | $twitterurl = (($this->proxy=="0")?$this->base:"")."/plugins/system/plugin_googlemap3/plugin_googlemap3_twitter_kml.php?"; 148 | if (strpos($url,$twitterurl) !== false) 149 | return true; 150 | 151 | // Check if it is based on MSID 152 | // So maps.google.xxx 153 | $googlereg = '/^maps\.google((\.[a-z]{2,3}){1,2})\/maps\/ms\?/'; 154 | 155 | if (preg_match($googlereg, $url)== 1) { 156 | $this->protocol = "https://"; 157 | return true; 158 | } 159 | 160 | // Check if url is defined on the website 161 | $database = JFactory::getDBO(); 162 | $query = "SELECT CONCAT(a.introtext, a.fulltext) as text FROM #__content as a WHERE a.id=".$id; 163 | $database->setQuery($query); 164 | 165 | if (!$database->query()) 166 | return false; 167 | 168 | $text = $database->loadResult(); 169 | if (substr($this->jversion,0,2)=="3.") 170 | $text = $database->escape($text); 171 | else 172 | $text = $database->getEscaped($text); 173 | //echo $text."
"; 174 | // Get the kml definitions 175 | preg_match_all("/kml((\(|\[)[0-9]+(\)|\]))?=\\\'(.*?)\\\'/msi", $text, $matches); 176 | $cnt = count($matches[0]); 177 | //print_r($matches); 178 | //echo "
Url: ".$url."
"; 179 | // Check if the kml definitions are in the url 180 | for($counter = 0; $counter < $cnt; $counter++) { 181 | preg_match("/\\\'(.*?)\\\'/", $matches[0][$counter], $kml); 182 | $kml[1] = str_replace(array('http://', 'https://', '&'), array('', '', '&'), $kml[1]); 183 | //echo $kml[1]."
"; 184 | if (strpos($url, $kml[1]) !== false) 185 | return true; 186 | } 187 | 188 | return false; 189 | } 190 | 191 | function _getkml($url) { 192 | if (!isset($HTTP_RAW_POST_DATA)){ 193 | $HTTP_RAW_POST_DATA = file_get_contents('php://input'); 194 | } 195 | $post_data = $HTTP_RAW_POST_DATA; 196 | 197 | $header[] = "Content-type: text/xml"; 198 | $header[] = "Content-length: ".strlen($post_data); 199 | 200 | //get all session parameters 201 | $postcurl = array(); 202 | $post = ''; 203 | $cookie = ''; 204 | $reg = '/^[a-f0-9]+$/si'; 205 | foreach ($_COOKIE as $key => $value) { 206 | if (preg_match($reg,$key)>0) { 207 | $cookie.="$key=$value; "; // separation in cookies is ; with space! 208 | $postcurl[$key]=$value; 209 | $post.=((strlen($post)>0)?'&':'')."$key=$value"; 210 | } 211 | } 212 | 213 | $ok = false; 214 | 215 | // File_get_contents is not supported anymore because additional headers has to be set 216 | // if (ini_get('allow_url_fopen')) 217 | // if (($response = @file_get_contents($url))) 218 | // $ok = true; 219 | 220 | if (!$ok) { 221 | $ch = curl_init( $url ); 222 | 223 | // Send authentication 224 | $username = ""; 225 | $password = ""; 226 | // mod_php 227 | if (isset($_SERVER['PHP_AUTH_USER'])) { 228 | $username = $_SERVER['PHP_AUTH_USER']; 229 | $password = $_SERVER['PHP_AUTH_PW']; 230 | } 231 | // most other servers 232 | elseif (isset($_SERVER['HTTP_AUTHENTICATION'])) { 233 | if (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic')===0) { 234 | list($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); 235 | } 236 | } 237 | if ($username!=""&&$password!="") { 238 | curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); 239 | curl_setopt ($ch, CURLOPT_USERPWD, $username.":".$password); // set referer on redirect 240 | } 241 | 242 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 243 | if( !ini_get('safe_mode')&&!ini_get('open_basedir') ) 244 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 245 | 246 | if ( strlen($cookie)>0 ){ 247 | curl_setopt($ch, CURLOPT_COOKIESESSION, false); // False to keep all cookies of previous session 248 | curl_setopt($ch, CURLOPT_COOKIE, $cookie); 249 | } 250 | $refering=parse_url($_SERVER['HTTP_REFERER']); 251 | curl_setopt($ch, CURLOPT_REFERER, $this->protocol.$refering['host'].$refering['path']); 252 | curl_setopt($ch, CURLOPT_TIMEOUT, 80); 253 | curl_setopt($ch, CURLOPT_HTTPHEADER, $header); 254 | curl_setopt($ch, CURLOPT_FAILONERROR, 0); 255 | curl_setopt($ch, CURLOPT_VERBOSE, 1); 256 | // curl_setopt($ch, CURLOPT_HEADER, true); // Show header info in response 257 | 258 | if ( strlen($post_data)>0 ){ 259 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); 260 | } 261 | 262 | $response = curl_exec($ch); 263 | 264 | // echo $url." : ".$response. "
"; 265 | // print_r(curl_getinfo($ch)); 266 | if (curl_errno($ch)) { 267 | print curl_error($ch); 268 | } else { 269 | curl_close($ch); 270 | $ok = true; 271 | } 272 | } 273 | 274 | if (!$ok) { 275 | $url = urldecode(JRequest::getVar('url', '')); 276 | 277 | // Do it the safe mode way for local files 278 | $pattern = "/(www.)?".$_SERVER["SERVER_NAME"]."/i"; 279 | if (preg_match($pattern, $url)!=0) { 280 | $url = $_SERVER["DOCUMENT_ROOT"].preg_replace($pattern, "", $url); 281 | 282 | if (ini_get('allow_url_fopen')) 283 | if (($response = file_get_contents($url))) 284 | $ok = true; 285 | 286 | if (!$ok) { 287 | $ch = curl_init( $url ); 288 | 289 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 290 | if( !ini_get('safe_mode')&&!ini_get('open_basedir') ) 291 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 292 | curl_setopt($ch, CURLOPT_TIMEOUT, 80); 293 | curl_setopt($ch, CURLOPT_HTTPHEADER, $header); 294 | curl_setopt($ch, CURLOPT_FAILONERROR, 0); 295 | curl_setopt($ch, CURLOPT_VERBOSE, 1); 296 | curl_setopt($ch, CURLOPT_COOKIEFILE, 1); 297 | 298 | if ( strlen($post_data)>0 ){ 299 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); 300 | } 301 | 302 | $response = curl_exec($ch); 303 | if (curl_errno($ch)) { 304 | print curl_error($ch); 305 | } else { 306 | curl_close($ch); 307 | $ok = true; 308 | } 309 | } 310 | } 311 | } 312 | 313 | return $response; 314 | } 315 | 316 | function _error($errorcode, $errortext) { 317 | $this->errorcode = $errorcode; 318 | 319 | $error = ""; 320 | $error .= "".$errorcode.""; 321 | $error .= "".$errortext.""; 322 | $error .= ""; 323 | 324 | return $error; 325 | } 326 | } 327 | 328 | // Instantiate the application. 329 | $web = new plugin_googlemap3_proxy_kml; 330 | 331 | // Run the application 332 | $web->doExecute(); 333 | 334 | ?> -------------------------------------------------------------------------------- /media/site/googleearthv3/googleearth.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All Rights Reserved. 2 | 3 | /** 4 | * @fileoverview Earth API library for Maps v3. 5 | * usage: var ge = new GoogleEarth(map);. 6 | * @author jlivni@google.com (Josh Livni). 7 | */ 8 | 9 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('d a(z,4o,4s){c(!k||!k.W){2n\'k.W 2D 7C\';}c(!k.W.7B()){2n\'2T 2a 2M 4C 2D 7z 4R 7 3U\';}c(!k.W.7y()){2n\'2T 2a 2M 4C 2D 7x 4R 7 3U\';}7.4g=\'7w://s.k.7v/7u/1v/7t/7s-12.7r\';7.l=z;7.3d=z.7q();7.1U=17;7.2t=\'2a\';7.3a=[];7.F={};7.3u=1P;7.4J=4o;7.q=4s;7.3J=0;7.3K();7.3L()}S[\'a\']=a;a.1E=\'7p\';a[\'1E\']=a.1E;a.3D=\'7o\';a.3v=27;a.f.3e=d(){t 7.o};a.f[\'3e\']=a.f.3e;a.f.3K=d(){8 z=7.l;8 4I=({7n:2p k.s.7m(5c,5c),7j:19,7i:7.2t,21:7.2t,7h:d(7c,1o,3X){8 3Z=3X.1M(\'2e\');t 3Z}});z.U.3y(a.1E,4I);c(7.4J){8 1N=7.l.3j.1N;8 g=7.l.3j.g;1N.2b(a.1E);8 4v=({3j:{1N:1N,g:g}});z.7b(4v)}8 h=7;k.s.K.1T(z,\'7a\',d(){h.4K()})};a.f.4K=d(){c(7.l.79()==a.1E){7.4O()}n{7.4Q()}};a.f.4O=d(){8 Q=7.4Z();c(Q){7.51(Q);7.52(Q)}7.18.g.34=\'\';7.1U=1a;c(!7.o){7.5q();t}7.31()};a.f.31=d(){7.F={};7.28(1a);7.3N();7.3J++;7.3O();7.3P();7.3Q()};a.f.3O=d(){r(8 i=0,2J;2J=7.3a[i];i++){k.s.K.78(2J)}};a.f.3Q=d(){8 h=7;k.s.K.1T(7.l,\'77\',d(){h.28(17)})};a.f.3N=d(){8 2j=7.o.1e();74(2j.49()){2j.4a(2j.49())}};a.f.28=d(1p){8 1h=7.l.3g();8 1o=7.l.2i();c((7.4k===1h)&&(7.4n===1o)){8 p=7.4p;1p=17}n{8 p=7.o.73(\'\');8 1y=v.70(2,a.3v-7.l.2i());p.4D(1y);p.1O(1h.C());p.1W(1h.D());p.39(0);p.2d(0)}8 b=7.o;c(1p){b.13().Z(5);b.V().20(p);p.2E(15);b.13().Z(0.75);S.14(d(){b.V().20(p)},6Z);S.14(d(){b.13().Z(1)},6W)}n{b.V().20(p)}};a.f.2I=d(w){7.3M(7.q.1r[7.1g]);7.1g++;c(7.1g>=7.q.1r.1s)7.1g=0;c(7.q.1r.1s>1){c(!7.q.1r[7.1g].H||7.q.1r[7.1g].H==\'2A\')8 1B=1;n 8 1B=1/7.q.1r[7.1g].H;8 h=7;S.14(d(){h.2I()},1B*3T)}};a.f.3M=d(w){8 b=7.o;8 p=b.V().2C(b.2c);c(w.1y)p.4D(w.1y);c(w.2f)p.1O(w.2f);c(w.2g)p.1W(w.2g);c(w.L)p.39(w.L);c(w.2h)p.2d(w.2h);c(w.1p)p.2E(w.1p);c(w.H){c(w.H!=\'2A\')b.13().Z(w.H);n b.13().Z(b.46)}n b.13().Z(1);b.V().20(p)};a.f.2S=d(x){7.4b(7.q.1n[7.1j]);7.1j++;c(7.1j>=7.q.1n.1s)7.1j=0;c(7.q.1n.1s>1){c(!7.q.1n[7.1j].H||7.q.1n[7.1j].H==\'2A\')8 1B=1;n 8 1B=1/7.q.1n[7.1j].H;8 h=7;S.14(d(){h.2S()},1B*3T)}};a.f.4b=d(x){8 b=7.o;8 1i=b.V().6V(b.2c);c(x.2f)1i.1O(x.2f);c(x.2g)1i.1W(x.2g);c(x.1p)1i.2E(x.1p);c(x.L)1i.39(x.L);c(x.2h)1i.2d(x.2h);c(x.4j)1i.2d(x.4j);c(x.H){c(x.H!=\'2A\')b.13().Z(x.H);n b.13().Z(b.46)}n b.13().Z(1);b.V().20(1i)};a.3k=d(1q,11){c(1q[0]==\'#\'){1q=1q.2l(1,9)}c(Y 11==\'1l\'){11=\'6U\'}n{11=6M(6L(11)*6K,10).6J(16);c(11.1s==1){11=\'0\'+11}}8 R=1q.2l(0,2);8 G=1q.2l(2,4);8 B=1q.2l(4,6);8 4N=[11,B,G,R].6I(\'\');t 4N};a.f.36=d(m){7.38++;8 P=7.3J+\'6H\'+m[\'I\']+7.38;t P};a.f.1I=d(m){8 P=7.36(m);7.F[P]=m;5B{t 7.o.6F(P)}6E(6D){t 1P}};a.f.58=d(1x){8 b=7.o;8 1F=1x.5d();8 M=1F.5g();8 1k=1F.5j();8 j=7.1I(1x);j.1V(b.2F(\'\'));8 1z=b.2H(\'\');8 g=7.1X(1x);j.1Y(g);8 T=1z.2k();T.1d(M.C(),M.D(),0);T.1d(M.C(),1k.D(),0);T.1d(1k.C(),1k.D(),0);T.1d(1k.C(),M.D(),0);T.1d(M.C(),M.D(),0);j.2N().2O(1z);j.2P(\'j\');b.1e().N(j)};a.f.3W=d(2R){8 1F=2R.5d();8 M=1F.5g();8 1k=1F.5j();8 b=7.o;8 m=b.6B(\'\');m.6x(b.6w(\'\'));8 40=m.6t();40.6s(M.C(),1k.C(),M.D(),1k.D(),0);m.45(b.44(\'\'));m.2U().2o(2R.47());b.1e().N(m)};a.f.48=d(2W){8 b=7.o;k.W.6q(b,2W,d(1v){c(!1v){S.14(d(){6p(\'6o 6n 1P 6j.\')},0);t}b.1e().N(1v)})};a.f.4f=d(P){8 y=7.F[P];8 j=7.o.6i(P);8 32=j.2N();8 1m=y.2r();32.1O(1m.C());32.1W(1m.D())};a.f.4l=d(y){c(!y.2r()){t}8 b=7.o;8 j=7.1I(y);c(y.4m()){j.2P(y.4m())}8 22=b.44(\'\');c(y.2U()){8 1A=y.2U();c(Y 1A=="6b"||(Y 1A=="4q"&&1A.6a===68))22.2o(1A);n 22.2o(1A.2W)}n{22.2o(7.4g)}8 g=b.4t(\'\');g.67().45(22);j.1Y(g);8 2v=b.66(\'\');2v.1O(y.2r().C());2v.1W(y.2r().D());j.1V(2v);b.1e().N(j);8 h=7;8 4x=k.s.K.1T(y,\'65\',d(){8 P=h.36(y);h.4f(P)});7.3a.2b(4x)};a.f.4z=d(1t){8 b=7.o;8 j=7.1I(1t);8 3b=b.2F(\'\');j.1V(3b);8 g=7.1X(1t);j.1Y(g);8 3c=b.2H(\'\');3b.2O(3c);8 T=3c.2k();8 2w=1t.4E().4F();r(8 i=0,1c;1c=2w[i];i++){T.1d(1c.C(),1c.D(),0)}b.1e().N(j)};a.4H=d(3f,2x,L){8 2y=64;2x/=2y;L=L*(v.24/26);8 3l=3f.C()*(v.24/26);8 4L=3f.D()*(v.24/26);8 3m=v.3n(2x);8 3o=v.3p(2x);8 3q=v.3p(3l);8 3r=v.3n(3l);8 3s=3m*3q+3o*3r*v.3n(L);8 4T=v.63(3o*3r*v.3p(L),3m-3q*3s);t 2p k.s.4V((v.61(3s)/(v.24/26)),(4L+4T)/(v.24/26))};a.f.4X=d(12){8 b=7.o;8 1h=12.3g();8 2y=12.5Z();8 j=7.1I(12);j.1V(b.2F(\'\'));8 1z=b.2H(\'\');8 g=7.1X(12);j.1Y(g);8 3t=25;r(8 i=0;i<3t;i++){8 L=5W/3t*i;8 3w=a.4H(1h,2y,L);1z.2k().1d(3w.C(),3w.D(),0)}j.2N().2O(1z);j.2P(\'j\');b.1e().N(j)};a.f.54=d(1w){8 b=7.o;8 j=7.1I(1w);8 2B=b.5Q(\'\');2B.5N(1a);j.1V(2B);8 g=7.1X(1w);j.1Y(g);8 T=2B.2k();8 2w=1w.4E().4F();r(8 i=0,1c;1c=2w[i];i++){T.1d(1c.C(),1c.D(),0)}b.1e().N(j)};a.f.1X=d(m){8 g=7.o.4t(\'\');8 59=g.5M();8 3B=g.5E();3B.5D(7.1G(m,\'6G\',3));8 3E=7.1G(m,\'3E\',1);8 3F=7.1G(m,\'3F\',0.3);8 3G=7.1G(m,\'3G\',\'#5i\');8 3H=7.1G(m,\'3H\',\'#5i\');3B.5k().3y(a.3k(3G,3E));59.5k().3y(a.3k(3H,3F));t g};a.f.1G=d(5l,5m,5n){8 3I=5l.5p(5m);c(Y 3I==\'1l\'){t 5n}n{t(3I)}};a.f.3P=d(){7.38=0;8 A=7.5r();r(8 i=0,y;y=A[\'5s\'][i];i++){7.4l(y)}r(8 i=0,1t;1t=A[\'5t\'][i];i++){7.4z(1t)}r(8 i=0,1w;1w=A[\'5u\'][i];i++){7.54(1w)}r(8 i=0,1x;1x=A[\'5v\'][i];i++){7.58(1x)}r(8 i=0,12;12=A[\'5w\'][i];i++){7.4X(12)}r(8 i=0,1v;1v=A[\'5x\'][i];i++){7.48(1v.47())}r(8 i=0,m;m=A[\'5y\'][i];i++){7.3W(m)}};a.f.5q=d(){8 h=7;k.W.5C(7.5A,d(5z){h.o=(5z);h.5e();h.31()},d(e){h.3C();h.l.5F(k.s.5G.5H);2n\'2T 2a 2M 5I 5J 5K: \'+e;})};a.f.5e=d(){8 b=7.o;b.5L().5a(1a);8 3A=b.5O();3A.5a(b.5P);8 3z=3A.5R();3z.5S(b.5T);3z.5U(b.5V);8 X=b.5X();c(7.q.5Y)X.1b(b.4Y,1a);n X.1b(b.4Y,17);c(7.q.60)X.1b(b.4W,1a);n X.1b(b.4W,17);c(7.q.62)X.1b(b.4U,1a);n X.1b(b.4U,17);c(7.q.3i)X.1b(b.4y,1a);n X.1b(b.4y,17);8 h=7;7.1g=0;7.1j=0;c(7.q.1r.1s>0){S.14(d(){h.2I()},h.q.4w)}n c(7.q.1n.1s>0){S.14(d(){h.2S()},h.q.4w)}k.s.K.1T(7.l,a.3D,d(4u){c(!h.1U){t}8 j=h.3u;8 23=4u.69();c(Y 23==\'4q\'){23=23.4r}8 2u=h.o.6c(\'\');2u.6d(j);2u.6e(23);h.o.6f(2u)});k.W.6g(b.6h(),\'4h\',d(K){8 30=K.6k();8 m=h.F[30.6l()];c(m){K.6m();8 4d=h.2Z(\'O\');r(8 i=0,2X;2X=4d[i];i++){2X.6r()}h.3u=30;k.s.K.42(m,\'4h\')}})};a.f.41=d(){8 p=7.o.V().2C(7.o.2c);8 1y=p.6u();8 1o=v.6v(a.3v-(v.2m(1y)/v.2m(2)));c(!7.l.2i()==1o){7.l.3Y(1o-1)}n{7.l.3Y(1o)}8 1h=2p k.s.4V(p.6y(),p.6z());7.l.6A(1h)};a.f.4Q=d(){c(!7.1U){t}8 b=7.o;7.4p=b.V().2C(b.2c);7.41();7.4k=7.l.3g();7.4n=7.l.2i();8 h=7;S.14(d(){h.28()},50);S.14(d(){h.3C()},6C)};a.f.3C=d(){7.57();7.56();7.18.g.34=\'55\';7.1U=17};a.f.51=d(Q){8 53=Q.g.1u;c(7.18.1D){8 1H=7.18.1D.33;r(8 i=0,E;E=1H[i];i++){E[\'2V\']=E.g.1u;E.g.1u=-1}Q[\'2V\']=53}7.18.g.1u=Q.g.1u=0};a.f.57=d(){8 1H=7.18.1D.33;r(8 i=0,E;E=1H[i];i++){E.g.1u=E[\'2V\']}};a.f.52=d(Q){8 1K=7.1S=2z.1M(\'6N\');1K.6O=\'6P:17;\';1K.6Q=\'6R\';1K.6S=\'0\';8 g=1K.g;g.1u=-6T;g.1R=g.1Q=\'3h%\';g.1m=\'2s\';g.6X=g.6Y=0;Q.N(1K)};a.f.56=d(){c(7.1S){7.1S.1D.4a(7.1S);7.1S=1P}};a.f.4Z=d(){c(7.l.U.5h)8 J=\'J=[\\\'\\"]?\'+7.l.U.5h.21+\'[\\"\\\']?\';n c(7.l.U.5b)8 J=\'J=[\\\'\\"]?\'+7.l.U.5b.21+\'[\\"\\\']?\';n c(7.l.U.4S)8 J=\'J=[\\\'\\"]?\'+7.l.U.4S.21+\'[\\"\\\']?\';n c(7.l.U.3i)8 J=\'J=[\\\'\\"]?\'+7.l.U.3i.21+\'[\\"\\\']?\';n 8 J=\'J=[\\\'\\"]?\'+7.2t+\'[\\"\\\']?\';8 4B=2p 71(J);c(7.18.1D){8 1H=7.18.1D.33;r(8 i=0,E;E=1H[i];i++){c(4B.72(E.4r)){t E}}}t 1P};a.f.3L=d(){8 1L=7.3d;8 1f=7.18=2z.1M(\'2e\');1f.g.1m=\'2s\';1f.g.1R=0;1f.g.1Q=0;1f.76=0;1f.g.34=\'55\';8 1C=7.3V=2z.1M(\'2e\');1C.g.1R=1L.4M+\'29\';1C.g.1Q=1L.4A+\'29\';1C.g.1m=\'2s\';1f.N(1C);8 1Z=7.5A=2z.1M(\'2e\');1Z.g.1m=\'2s\';1Z.g.1R=\'3h%\';1Z.g.1Q=\'3h%\';1C.N(1Z);7.l.7d[k.s.7e.7f].2b(1f);8 h=7;k.s.K.1T(7.l,\'7g\',d(){h.3R()})};a.f.3R=d(){8 2Q=7.3V.g;8 1L=7.3d;2Q.1R=1L.4M+\'29\';2Q.1Q=1L.4A+\'29\'};a.f.2Z=d(5o){8 2Y=[];8 A=a.F[5o];r(8 i 7k A){c(A.7l(i)){8 m=A[i];c(m.5p(\'z\')==7.l){2Y.2b(m)}}}t 2Y};a.f.5r=d(){8 A={};8 1J=a.2q;r(8 i=0,u;u=1J[i];i++){A[u]=7.2Z(u)}t A};a.F={};a.3x=d(){k.s.O.f.43=k.s.O.f[\'4c\'];a.F[\'O\']={};k.s.O.f[\'4c\']=d(z,3S){c(z){c(!7[\'I\']){7[\'I\']=a.2K++;a.F[\'O\'][7[\'I\']]=7}}n{4P a.F[\'O\'][7[\'I\']];7[\'I\']=1l}k.s.K.42(z,a.3D,7);7.43(z,3S)}};a.35=d(u){8 2L=k.s[u].f;2L[\'4i\']=2L.4e;a.F[u]={};k.s[u].f[\'4e\']=d(z){c(z){c(!7[\'I\']){7[\'I\']=a.2K++;a.F[u][7[\'I\']]=7}}n{4P a.F[u][7[\'I\']];7[\'I\']=1l}7[\'4i\'](z)}};a.2q=[\'5s\',\'5u\',\'5t\',\'5v\',\'5w\',\'5x\',\'5y\',\'O\'];a.2K=0;a.2G=d(){c(!(Y(k)!="1l"&&Y(k.W)!="1l")){4G.2m("7A")}n{5f(a.37);4G.2m("7D");8 1J=a.2q;r(8 i=0,u;u=1J[i];i++){a.35(u);c(u==\'O\'){a.3x()}}}};a.2G=d(){c(Y(k)!="1l"&&Y(k.W)!="1l"){5f(a.37);8 1J=a.2q;r(8 i=0,u;u=1J[i];i++){a.35(u);c(u==\'O\'){a.3x()}}}};a.37=7E("a.2G()",50);',62,475,'|||||||this|var||GoogleEarth|ge|if|function||prototype|style|that||placemark|google|map_|overlay|else|instance_|lookAt|earthoptions_|for|maps|return|overlayClass|Math|lookatoptions|cameraoptions|marker|map|overlays||lat|lng|sibling|overlays_||flytospeed|__gme_id|title|event|heading|ne|appendChild|InfoWindow|placemarkId|mapTypeControlDiv||window|coords|mapTypes|getView|earth|layerRoot|typeof|setFlyToSpeed||opacity|circle|getOptions|setTimeout|||false|controlDiv_||true|enableLayerById|latLng|pushLatLngAlt|getFeatures|control|lookatstep|center|Camera|camerastep|sw|undefined|position|camera|zoom|tilt|hex|lookat|length|polygon|zIndex|kml|polyline|rectangle|range|ring|href|ti|inner|parentNode|MAP_TYPE_ID|bounds|getMVCVal_|siblings|createPlacemark_|overlayClasses|iframeShim|mapDiv|createElement|mapTypeIds|setLatitude|null|height|width|iframeShim_|addListener|earthVisible_|setGeometry|setLongitude|createStyle_|setStyleSelector|earthDiv|setAbstractView|alt|icon|content|PI||180||flyToMapView_|px|Earth|push|ALTITUDE_RELATIVE_TO_GROUND|setAltitude|DIV|latitude|longitude|altitude|getZoom|features|getCoordinates|substring|log|throw|setHref|new|OVERLAY_CLASSES|getPosition|absolute|earthTitle_|balloon|point|path|distance|radius|document|teleport|lineString|copyAsLookAt|not|setTilt|createPolygon|trackOverlays_|createLinearRing|flyToLookatRoute|evnt|counter_|proto|API|getGeometry|setOuterBoundary|setName|innerStyle|groundOverlay|flyToCameraRoute|Google|getIcon|__gme_ozi|url|infoWindow|tmp|getOverlaysForType_|target|refresh_|geom|childNodes|display|modifySetMap_|generatePlacemarkId_|objint|overlaynr|setHeading|moveEvents_|poly|outer|mapDiv_|getInstance|from|getCenter|100|terrain|mapTypeControlOptions|getKMLColor_|fromLat|cosDistance|cos|sinDistance|sin|sinFromLat|cosFromLat|sinLat|vertices|lastClickedPlacemark_|MAX_EARTH_ZOOM_|offset|modifyOpen_|set|screen|navControl|lineStyle|hideEarth_|INFO_WINDOW_OPENED_EVENT_|strokeOpacity|fillOpacity|strokeColor|fillColor|val|displayCounter_|addEarthMapType_|addEarthControl_|flyToLookat|clearPlacemarks_|clearMoveEvents_|addMapOverlays_|addMapMoveEvent_|resizeEarth_|anchor|1000|system|innerDiv_|addGroundOverlay_|ownerDocument|setZoom|div|latLonBox|matchMapToEarth_|trigger|openOriginal_|createIcon|setIcon|SPEED_TELEPORT|getUrl|addKML_|getFirstChild|removeChild|flyToCamera|open|infoWindows|setMap|updatePlacemark_|RED_ICON_|click|__gme_setMapOriginal|roll|oldcenter|createPoint_|getTitle|oldzoom|earthcontrol|oldlookat|object|innerHTML|earthoptions|createStyle|infowindow|options|timeout|moveEvent|LAYER_TERRAIN|createPolygon_|clientHeight|regex|is|setRange|getPath|getArray|console|computeOffset_|earthMapType|earthcontrol_|mapTypeChanged_|fromLng|clientWidth|abgr|showEarth_|delete|switchToMapView_|on|hybrid|dLng|LAYER_BUILDINGS|LatLng|LAYER_ROADS|createCircle_|LAYER_BORDERS|findMapTypeControlDiv_||setZIndexes_|addShim_|oldIndex|createPolyline_|none|removeShim_|unsetZIndexes_|createRectangle_|polyStyle|setVisibility|satellite|256|getBounds|addEarthEvents_|clearInterval|getNorthEast|roadmap|000000|getSouthWest|getColor|mvcObject|property|def|type|get|initializeEarth_|getOverlays_|Marker|Polygon|Polyline|Rectangle|Circle|KmlLayer|GroundOverlay|instance|earthDiv_|try|createInstance|setWidth|getLineStyle|setMapTypeId|MapTypeId|ROADMAP|failed|to|initialize|getWindow|getPolyStyle|setTessellate|getNavigationControl|VISIBILITY_AUTO|createLineString|getScreenXY|setYUnits|UNITS_INSET_PIXELS|setXUnits|UNITS_PIXELS|360|getLayerRoot|borders|getRadius|roads|asin|buildings|atan2|6378137|position_changed|createPoint|getIconStyle|String|getContent|constructor|string|createHtmlStringBalloon|setFeature|setContentString|setBalloon|addEventListener|getGlobe|getElementById|KML|getTarget|getId|preventDefault|or|Bad|alert|fetchKml|close|setBox|getLatLonBox|getRange|round|createLatLonBox|setLatLonBox|getLatitude|getLongitude|panTo|createGroundOverlay|2200|err|catch|createPlacemark|strokeWeight|GEV3_|join|toString|255|parseFloat|parseInt|IFRAME|src|javascript|scrolling|no|frameBorder|100000|FF|copyAsCamera|250|left|top|200|pow|RegExp|test|createLookAt|while||index|center_changed|removeListener|getMapTypeId|maptypeid_changed|setOptions|tileCoord|controls|ControlPosition|TOP_LEFT|resize|getTile|name|maxZoom|in|hasOwnProperty|Size|tileSize|GEInfoWindowOpened|GoogleEarthAPI|getDiv|png|red|paddle|mapfiles|com|http|installed|isInstalled|supported|ships|isSupported|loaded|hihihi|setInterval'.split('|'),0,{})) -------------------------------------------------------------------------------- /plugin_googlemap3_twitter_kml.php: -------------------------------------------------------------------------------- 1 | initialise(); 68 | $user = JFactory::getUser(); 69 | $session = JFactory::getSession(); 70 | 71 | // No check if the referer is the website, because it can be used by Google servers too. 72 | //JSession::checkToken( 'get' ) or die( 'Invalid Token' ); 73 | 74 | class Twitter { 75 | private $user = null; 76 | private $tweets = null; 77 | 78 | function __construct($user, $twitterconsumerkey, $twitterconsumersecret, $twitteraccesstoken, $twitteraccesstokensecret) { 79 | $this->user = $user; 80 | require_once 'plugin_googlemap3_twitteroauth.php'; 81 | $this->twitterConnection = new TwitterOAuth( 82 | $twitterconsumerkey, // Consumer Key 83 | $twitterconsumersecret, // Consumer secret 84 | $twitteraccesstoken, // Access token 85 | $twitteraccesstokensecret // Access token secret 86 | ); 87 | } 88 | 89 | function getUserTimeLine($count = 19, $retweets=0) { 90 | $ch = curl_init(); 91 | 92 | $this->tweets = $this->twitterConnection->get( 93 | 'statuses/user_timeline', 94 | array( 95 | 'screen_name' => $this->user, 96 | 'count' => $count, 97 | 'include_rts' => $retweets 98 | ) 99 | ); 100 | 101 | if (is_object($this->tweets)&&isset($this->tweets->errors)) 102 | $this->tweets = array(); 103 | 104 | if (count($this->tweets)==0) 105 | $this->tweets = array(); 106 | 107 | return $this->tweets; 108 | } 109 | 110 | function getProfile() { 111 | $profile = array(); 112 | 113 | if(!empty($this->tweets)&&!isset($this->tweets->errors)) { 114 | $profile = $this->tweets[0]->user; 115 | } 116 | 117 | return $profile; 118 | } 119 | 120 | function timeSince($date) { 121 | $datetime = strtotime($date); 122 | $offset = time() - $datetime; 123 | 124 | $units = array( 125 | 'second' => 1, 126 | 'minute' => 60, 127 | 'hour' => 3600, 128 | 'day' => 86400, 129 | 'month' => 2629743, 130 | 'year' => 31556926); 131 | 132 | foreach($units as $unit => $value) { 133 | if($offset >= $value) { 134 | $result = floor($offset / $value); 135 | 136 | if(!in_array($unit, array('month','year'))) { 137 | if($result > 1) { 138 | $unit .= 's'; 139 | } 140 | 141 | $timeAgo = 'About'.' '.$result.' '.$unit.' '.'Ago'; 142 | } else { 143 | return date('j M Y', $datetime); 144 | } 145 | } 146 | } 147 | 148 | return $timeAgo; 149 | } 150 | 151 | function parseText($text) { 152 | // url 153 | $text = preg_replace( "/(([[:alnum:]]+:\/\/)|www\.)([^[:space:]]*)([[:alnum:]#?\/&=])/i", "\\1\\3\\4", ' '.$text); 154 | $text = str_replace('href="www.', 'href="http://www.', $text); 155 | // mailto 156 | $text = preg_replace( "/(([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))/i", "\\1", $text); 157 | // user 158 | $text = preg_replace( "/ +@([a-z0-9_]*) ?/i", " @\\1 ", $text); 159 | // argument 160 | $text = preg_replace( "/ +#([a-z0-9_]*) ?/i", " #\\1 ", $text); 161 | // truncates long url 162 | $text = preg_replace("/>(([[:alnum:]]+:\/\/)|www\.)([^[:space:]]{30,40})([^[:space:]]*)([^[:space:]]{10,20})([[:alnum:]#?\/&=])\\3...\\5\\6<", $text); 163 | 164 | return trim($text); 165 | } 166 | 167 | } 168 | 169 | class plugin_googlemap3_twitter_kml 170 | { 171 | /** 172 | * Display the application. 173 | */ 174 | function doExecute(){ 175 | // Get config 176 | $plugin = JPluginHelper::getPlugin('system', 'plugin_googlemap3'); 177 | 178 | $jversion = JVERSION; 179 | $params = new JRegistry(); 180 | $params->loadString($plugin->params); 181 | 182 | // Get params 183 | $twitterconsumerkey = $params->get('twitterconsumerkey', ''); 184 | $twitterconsumersecret = $params->get('twitterconsumersecret', ''); 185 | $twitteraccesstoken = $params->get('twitteraccesstoken', ''); 186 | $twitteraccesstokensecret = $params->get('twitteraccesstokensecret', ''); 187 | 188 | $twittername = JRequest::getVar('twittername', ''); 189 | if (!is_string($twittername)) 190 | $twittername =""; 191 | else 192 | $twittername = urldecode($twittername); 193 | if ($twittername=="") 194 | $twittername = $params->get('twittername', ''); 195 | 196 | $twittertweets = JRequest::getVar('twittertweets', ''); 197 | if (!is_string($twittertweets)) 198 | $twittertweets =""; 199 | else 200 | $twittertweets = urldecode($twittertweets); 201 | if ($twittertweets=="") 202 | $twittertweets = $params->get('twittertweets', '15'); 203 | 204 | $line = JRequest::getVar('twitterline', ''); 205 | if (!is_string($line)) 206 | $line =""; 207 | else 208 | $line = urldecode($line); 209 | if ($line=="") 210 | $line = $params->get('twitterline', ''); 211 | 212 | $twitterlinewidth = JRequest::getVar('twitterlinewidth', ''); 213 | if (!is_string($twitterlinewidth)) 214 | $twitterlinewidth =""; 215 | else 216 | $twitterlinewidth = urldecode($twitterlinewidth); 217 | if ($twitterlinewidth=="") 218 | $twitterlinewidth = $params->get('twitterlinewidth', '5'); 219 | 220 | $twitterstartloc = JRequest::getVar('twitterstartloc', ''); 221 | if (!is_string($twitterstartloc)) 222 | $twitterstartloc =""; 223 | else 224 | $twitterstartloc = urldecode($twitterstartloc); 225 | if ($twitterstartloc=="") 226 | $twitterstartloc = $params->get('twitterstartloc', '5'); 227 | 228 | $twitter = new Twitter(ltrim(rtrim($twittername)), $twitterconsumerkey, $twitterconsumersecret, $twitteraccesstoken, $twitteraccesstokensecret); 229 | $tweets = $twitter->getUserTimeLine(ltrim(rtrim($twittertweets)), 1); 230 | $profile = $twitter->getProfile(); 231 | 232 | // Start KML file, create parent node 233 | $dom = new DOMDocument('1.0','UTF-8'); 234 | 235 | //Create the root KML element and append it to the Document 236 | $node = $dom->createElementNS('http://earth.google.com/kml/2.1','kml'); 237 | $parNode = $dom->appendChild($node); 238 | 239 | //Create a Folder element and append it to the KML element 240 | $docnode = $dom->createElement('Document'); 241 | $parNode = $parNode->appendChild($docnode); 242 | 243 | $twitterStyleNode = $dom->createElement('Style'); 244 | $twitterStyleNode->setAttribute('id', 'tweetStyle'); 245 | $twitterIconstyleNode = $dom->createElement('IconStyle'); 246 | $twitterIconstyleNode->setAttribute('id', 'tweetIcon'); 247 | $twitterIconNode = $dom->createElement('Icon'); 248 | $twitterHref = $dom->createElement('href', $params->get('twittericon', '')); 249 | 250 | $twitterIconNode->appendChild($twitterHref); 251 | $twitterIconstyleNode->appendChild($twitterIconNode); 252 | $twitterStyleNode->appendChild($twitterIconstyleNode); 253 | $docnode->appendChild($twitterStyleNode); 254 | 255 | if ($line!='') { 256 | // Create a line of travelling 257 | $twitterStyleNode = $dom->createElement('Style'); 258 | $twitterStyleNode->setAttribute('id', 'lineStyle'); 259 | $twitterLinestyleNode = $dom->createElement('LineStyle'); 260 | $twitterColorNode = $dom->createElement('color', ltrim(rtrim($line))); 261 | $twitterLinestyleNode->appendChild($twitterColorNode); 262 | $twitterWidthNode = $dom->createElement('width', ltrim(rtrim($twitterlinewidth))); 263 | $twitterLinestyleNode->appendChild($twitterWidthNode); 264 | $twitterStyleNode->appendChild($twitterLinestyleNode); 265 | $docnode->appendChild($twitterStyleNode); 266 | } 267 | 268 | //Create a Folder element and append it to the KML element 269 | $fnode = $dom->createElement('Folder'); 270 | $folderNode = $parNode->appendChild($fnode); 271 | $nameNode = $dom->createElement('name', 'Tweets '.$twittername); 272 | $folderNode->appendChild($nameNode); 273 | 274 | $tweets = array_reverse($tweets); 275 | $prev_location = explode(',', $twitterstartloc); 276 | // swap lat and long values. In kml is it different first long then lat 277 | $lat = $prev_location[0]; 278 | $prev_location[0] = $prev_location[1]; 279 | $prev_location[1] = $lat; 280 | 281 | foreach($tweets as $tweet) { 282 | if ($tweet->coordinates=="") 283 | $tweet->coordinates->coordinates = $prev_location; 284 | else 285 | $prev_location = $tweet->coordinates->coordinates; 286 | } 287 | $tweets = array_reverse($tweets); 288 | 289 | foreach($tweets as $tweet) { 290 | //Create a Placemark and append it to the document 291 | 292 | $node = $dom->createElement('Placemark'); 293 | $placeNode = $folderNode->appendChild($node); 294 | 295 | //Create an id attribute and assign it the value of id column 296 | $placeNode->setAttribute('id','tweet_'.$tweet->id_str); 297 | 298 | //Create name, description, and address elements and assign them the values of 299 | //the name, type, and address columns from the results 300 | 301 | $nameNode = $dom->createElement('name', date('d m Y g:i:s', strtotime($tweet->created_at))); 302 | $placeNode->appendChild($nameNode); 303 | 304 | $styleUrl = $dom->createElement('styleUrl', '#tweetStyle'); 305 | $placeNode->appendChild($styleUrl); 306 | 307 | $descText = ""; 308 | $descText .="

".$profile->name."".$profile->name."

"; 309 | 310 | $descText .= "".$twitter->parseText($tweet->text).""; 311 | $descText .="
".$twitter->timeSince($tweet->created_at).""; 312 | 313 | $descNode = $dom->createElement('description', ''); 314 | $cdataNode = $dom->createCDATASection($descText); 315 | $descNode->appendChild($cdataNode); 316 | $placeNode->appendChild($descNode); 317 | 318 | $pointNode = $dom->createElement('Point'); 319 | $placeNode->appendChild($pointNode); 320 | 321 | $coor_pointNode = $dom->createElement('coordinates',implode(",",$tweet->coordinates->coordinates)); 322 | $pointNode->appendChild($coor_pointNode); 323 | } 324 | 325 | if ($line!=''&&count($tweets)>0) { 326 | // Create a line of travelling 327 | 328 | //Create a Placemark and append it to the document 329 | $node = $dom->createElement('Placemark'); 330 | $placeNode = $folderNode->appendChild($node); 331 | 332 | //Create an id attribute and assign it the value of id column 333 | $placeNode->setAttribute('id','tweetline'); 334 | 335 | //Create name, description, and address elements and assign them the values of 336 | //the name, type, and address columns from the results 337 | 338 | $nameNode = $dom->createElement('name',''); 339 | $placeNode->appendChild($nameNode); 340 | 341 | $styleUrl = $dom->createElement('styleUrl', '#lineStyle'); 342 | $placeNode->appendChild($styleUrl); 343 | 344 | //Create a LineString element 345 | $lineNode = $dom->createElement('LineString'); 346 | $placeNode->appendChild($lineNode); 347 | $exnode = $dom->createElement('extrude', '1'); 348 | $lineNode->appendChild($exnode); 349 | $almodenode =$dom->createElement('altitudeMode','relativeToGround'); 350 | $lineNode->appendChild($almodenode); 351 | 352 | $coordinates = ""; 353 | 354 | foreach($tweets as $tweet) { 355 | $coordinates .= " ".implode(",",$tweet->coordinates->coordinates); 356 | } 357 | //Create a coordinates element and give it the value of the lng and lat columns from the results 358 | $coorNode = $dom->createElement('coordinates',$coordinates); 359 | $lineNode->appendChild($coorNode); 360 | } 361 | 362 | $kmlOutput = $dom->saveXML(); 363 | 364 | //assign the KML headers. 365 | header('Content-type: application/vnd.google-earth.kml+xml'); 366 | echo $kmlOutput; 367 | } 368 | } 369 | // Instantiate the application. 370 | $web = new plugin_googlemap3_twitter_kml; 371 | 372 | // Run the application 373 | $web->doExecute(); 374 | 375 | ?> -------------------------------------------------------------------------------- /plugin_googlemap3.php: -------------------------------------------------------------------------------- 1 | event = 'construct'; 46 | // Do some extra initialisation in this constructor if required 47 | $this->subject = $subject; 48 | $this->config = $config; 49 | // Version of Joomla 50 | $this->jversion = JVERSION; 51 | // Check if params are defined and set otherwise try to get them from previous version 52 | $this->_upgrade_plugin(); 53 | 54 | $this->loadLanguage(); 55 | // Check if the params are defined and set so the initial defaults can be removed. 56 | $this->_restore_permanent_defaults(); 57 | // Set document and doctype to null. Can only be retrievedwhen events are triggered. otherwise the language of the site magically changes. 58 | $this->document = NULL; 59 | $this->doctype = NULL; 60 | // Get params 61 | $this->publ = $this->params->get( 'publ', 1 ); 62 | $this->plugincode = $this->params->get( 'plugincode', 'mosmap' ); 63 | $this->brackets = $this->params->get( 'brackets', '{' ); 64 | // define the regular expression for the bot 65 | if ($this->brackets=="both") { 66 | $this->regex="/(]*>\s*)?(\{|\[)".$this->plugincode.".*?(([a-z0-9A-Z]+((\{|\[)[0-9]+(\}|\]))?='[^']+'.*?\|?.*?)*)(\}|\])(\s*<\/p>)?/msi"; 67 | $this->countmatch = 3; 68 | } elseif ($this->brackets=="[") { 69 | $this->regex="/(]*>\s*)?\[".$this->plugincode.".*?(([a-z0-9A-Z]+(\{[0-9]+\})?='[^']+'.*?\|?.*?)*)\](\s*<\/p>)?/msi"; 70 | $this->countmatch = 2; 71 | } else { 72 | $this->regex="/(]*>\s*)?\{".$this->plugincode.".*?(([a-z0-9A-Z]+(\[[0-9]+\])?='[^']+'.*?\|?.*?)*)\}(\s*<\/p>)?/msi"; 73 | $this->countmatch = 2; 74 | } 75 | // The helper class 76 | $this->helper = null; 77 | 78 | // Clean up variables 79 | unset($plugin, $option, $view, $task, $layout); 80 | } 81 | 82 | /** 83 | * Do something onAfterInitialise 84 | */ 85 | public function onAfterInitialise() 86 | { 87 | $this->event = 'onAfterInitialise'; 88 | } 89 | 90 | /** 91 | * onPrepareContent 92 | */ 93 | public function onContentPrepare($context, &$article, &$params, $limitstart=0) 94 | { 95 | $this->event = 'onContentPrepare'; 96 | 97 | $app = JFactory::getApplication(); 98 | if($app->isAdmin()) { 99 | return; 100 | } 101 | 102 | // get document types 103 | $this->_getdoc(); 104 | 105 | // Check if fields exists. If article and text does not exists then stop 106 | if (isset($article)&&isset($article->text)) 107 | $text = &$article->text; 108 | else 109 | return true; 110 | 111 | if (isset($article)&&isset($article->introtext)) 112 | $introtext = &$article->introtext; 113 | else 114 | $introtext = ""; 115 | 116 | // check whether plugin has been unpublished 117 | // PDF or feed can't show maps so remove it 118 | if ( !$this->publ ||($this->doctype=='pdf'||$this->doctype=='feed') ) { 119 | $text = preg_replace( $this->regex, '', $text ); 120 | $introtext = preg_replace( $this->regex, '', $introtext ); 121 | unset($app, $text, $introtext); 122 | return true; 123 | } 124 | 125 | // perform the replacement in a normal way, but this has the disadvantage that other plugins 126 | // can't add information to the mosmap, other later added content is not checked and modules can't be checked 127 | // $this->_replace( $text ); 128 | // $this->_replace( $introtext ); 129 | 130 | // Clean up variables 131 | unset($app, $text, $introtext); 132 | } 133 | 134 | /** 135 | * Do something onAfterRoute 136 | */ 137 | public function onAfterRoute() 138 | { 139 | $this->event = 'onAfterRoute'; 140 | } 141 | 142 | /** 143 | * Do something onAfterDispatch 144 | */ 145 | public function onAfterDispatch() 146 | { 147 | $this->event = 'onAfterDispatch'; 148 | 149 | $app = JFactory::getApplication(); 150 | if($app->isAdmin()) { 151 | return; 152 | } 153 | 154 | // get document types 155 | $this->_getdoc(); 156 | 157 | // FEED 158 | if ($this->doctype=='feed'&&isset($this->document->items)) { 159 | foreach($this->document->items as $item) { 160 | $text = &$item->description; 161 | $text = preg_replace( $this->regex, '', $text ); 162 | } 163 | // Clean up variables 164 | unset($app, $item, $text); 165 | return true; 166 | } 167 | 168 | // PDF can't show maps so remove it 169 | if ($this->doctype=='pdf') { 170 | $text = $this->document->getBuffer("component"); 171 | $text = preg_replace( $this->regex, '', $text ); 172 | $this->document->setBuffer($text, "component"); 173 | // Clean up variables 174 | unset($app, $item, $text); 175 | return true; 176 | } 177 | 178 | // In other components or leftovers 179 | $text = $this->document->getBuffer("component"); 180 | if (strlen($text)>0) { 181 | 182 | // check whether plugin has been unpublished 183 | if ( !$this->publ ) 184 | $text = preg_replace( $this->regex, '', $text ); 185 | else 186 | $this->_replace($text); 187 | $this->document->setBuffer($text, "component"); 188 | } 189 | 190 | // Clean up variables 191 | unset($app, $item, $text); 192 | } 193 | 194 | /** 195 | * Do something onAfterRender 196 | */ 197 | public function onAfterRender() 198 | { 199 | $this->event = 'onAfterRender'; 200 | 201 | $app = JFactory::getApplication(); 202 | if($app->isAdmin()) { 203 | return; 204 | } 205 | 206 | // get document types 207 | $this->_getdoc(); 208 | 209 | // Get the rendered body text 210 | $text = JResponse::getBody(); 211 | 212 | // check whether plugin has been unpublished 213 | if ( !$this->publ ) { 214 | $text = preg_replace( $this->regex, '', $text ); 215 | // Set the body text with the replaced result 216 | JResponse::setBody($text); 217 | // Clean up variables 218 | unset($app, $text); 219 | return true; 220 | } 221 | 222 | // PDF or feed can't show maps so remove it 223 | if ($this->doctype=='pdf'||$this->doctype=='feed') { 224 | $text = preg_replace( $this->regex, '', $text ); 225 | // Set the body text with the replaced result 226 | JResponse::setBody($text); 227 | // Clean up variables 228 | unset($app, $text); 229 | return true; 230 | } 231 | 232 | // perform the replacement 233 | $this->_replace( $text ); 234 | 235 | // Set the body text with the replaced result 236 | JResponse::setBody($text); 237 | 238 | // Add google script when all possible mosmap commands are found and processed 239 | if ($this->helper!=null) { 240 | $this->helper->add_google_script(); 241 | } 242 | 243 | // Clean up variables 244 | unset($app, $text); 245 | } 246 | 247 | function _getdoc() { 248 | if ($this->document==NULL) { 249 | $this->document = JFactory::getDocument(); 250 | $this->doctype = $this->document->getType(); 251 | } 252 | } 253 | 254 | function _replace(&$text) { 255 | $matches = array(); 256 | $text=preg_replace("/�{0,2}39;/",'\'',$text); 257 | preg_match_all($this->regex,$text,$matches,PREG_OFFSET_CAPTURE | PREG_PATTERN_ORDER); 258 | // print_r($matches); 259 | // Remove plugincode that are in head of the page 260 | $matches = $this->_checkhead($text, $matches); 261 | // Remove plugincode that are in the editor and textarea 262 | $matches = $this->_checkeditorarea($text, $matches); 263 | $cnt = count($matches[0]); 264 | // print_r($matches); 265 | if ($cnt>0) { 266 | if ($this->helper==null) { 267 | $filename = JPATH_SITE."/plugins/system/plugin_googlemap3/plugin_googlemap3_helper.php"; 268 | 269 | include_once($filename); 270 | $this->helper = new plgSystemPlugin_googlemap3_helper($this->jversion, $this->params, $this->regex, $this->document, $this->brackets); 271 | } 272 | // Process the found {mosmap} codes 273 | for($counter = 0; $counter < $cnt; $counter++) { 274 | // Very strange the first match is the plugin code?? 275 | $this->helper->process($matches[0][$counter][0],$matches[0][$counter][1], $matches[$this->countmatch][$counter][0], $text, $counter, $this->event); 276 | } 277 | } 278 | 279 | // Clean up variables 280 | unset($matches, $cnt, $counter, $content, $filename); 281 | } 282 | 283 | function _checkhead($text, $plgmatches) { 284 | $result = array(array(),array(),array(),array()); 285 | $cnt = count($plgmatches[0]); 286 | // Get head location 287 | $end = stripos($text, ''); 288 | // check if match plugin is the head 289 | for($counter = 0; $counter < $cnt; $counter++) { 290 | if (!($plgmatches[0][$counter][1] > 0 &&$plgmatches[0][$counter][1]< $end)) { 291 | $result[0][] = $plgmatches[0][$counter]; 292 | $result[1][] = $plgmatches[1][$counter]; 293 | $result[2][] = $plgmatches[2][$counter]; 294 | $result[3][] = $plgmatches[3][$counter]; 295 | } 296 | } 297 | 298 | return $result; 299 | } 300 | 301 | function _checkeditorarea($text, $plgmatches) { 302 | $edmatches = array_merge($this->_getEditorPositions($text), $this->_getTextAreaPositions($text)); 303 | $result = array(array(),array(),array(),array()); 304 | if (count($edmatches)>0) { 305 | $cnt = count($plgmatches[0]); 306 | // check if match plugin is in match editor 307 | for($counter = 0; $counter < $cnt; $counter++) { 308 | $oke = true; 309 | foreach ($edmatches as $ed) { 310 | if ($plgmatches[0][$counter][1] > $ed['start']&&$plgmatches[0][$counter][1]< $ed['end']) 311 | $oke= false; 312 | } 313 | if ($oke) { 314 | $result[0][] = $plgmatches[0][$counter]; 315 | $result[1][] = $plgmatches[1][$counter]; 316 | $result[2][] = $plgmatches[2][$counter]; 317 | $result[3][] = $plgmatches[3][$counter]; 318 | } 319 | } 320 | } else 321 | $result = $plgmatches; 322 | 323 | // Clean up variables 324 | unset($edmatches, $cnt, $counter, $ed); 325 | 326 | return $result; 327 | } 328 | 329 | function _getEditorPositions($strBody) { 330 | preg_match_all("/
(.*)<\/form>\n<\/div>/Ums", $strBody, $strEditor, PREG_PATTERN_ORDER); 331 | 332 | $intOffset = 0; 333 | $intIndex = 0; 334 | $intEditorPositions = array(); 335 | 336 | foreach($strEditor[0] as $strFullEditor) { 337 | $intEditorPositions[$intIndex] = array('start' => (strpos($strBody, $strFullEditor, $intOffset)), 'end' => (strpos($strBody, $strFullEditor, $intOffset) + strlen($strFullEditor))); 338 | $intOffset += strlen($strFullEditor); 339 | $intIndex++; 340 | } 341 | 342 | // Clean up variables 343 | unset($strEditor, $intOffset, $strFullEditor, $intIndex); 344 | 345 | return $intEditorPositions; 346 | } 347 | 348 | function _getTextAreaPositions($strBody) { 349 | preg_match_all("/]*>(.*)<\/textarea>/Ums", $strBody, $strTextArea, PREG_PATTERN_ORDER); 350 | 351 | $intOffset = 0; 352 | $intIndex = 0; 353 | $intTextAreaPositions = array(); 354 | 355 | foreach($strTextArea[0] as $strFullTextArea) { 356 | $intTextAreaPositions[$intIndex] = array('start' => (strpos($strBody, $strFullTextArea, $intOffset)), 'end' => (strpos($strBody, $strFullTextArea, $intOffset) + strlen($strFullTextArea))); 357 | $intOffset += strlen($strFullTextArea); 358 | $intIndex++; 359 | } 360 | 361 | // Clean up variables 362 | unset($strTextArea, $intOffset, $strFullTextArea, $intIndex); 363 | 364 | return $intTextAreaPositions; 365 | } 366 | 367 | function _restore_permanent_defaults() { 368 | $app = JFactory::getApplication(); 369 | if($app->isSite()) { 370 | return; 371 | } 372 | if ($this->params->get( 'publ', '' )!='') { 373 | jimport('joomla.filesystem.file'); 374 | 375 | $dir = JPATH_SITE."/plugins/system/plugin_googlemap3/"; 376 | 377 | if (file_exists($dir.'plugin_googlemap3.perm')) { 378 | if (JFile::move ($dir.'plugin_googlemap3.xml', $dir.'plugin_googlemap3.init')) { 379 | if (JFile::move ($dir.'plugin_googlemap3.perm', $dir.'plugin_googlemap3.xml')) 380 | JFile::delete($dir.'plugin_googlemap3.init'); 381 | else 382 | JFile::move ($dir.'plugin_googlemap3.init', $dir.'plugin_googlemap3.xml'); 383 | } 384 | } 385 | } 386 | } 387 | 388 | function _upgrade_plugin() { 389 | $app = JFactory::getApplication(); 390 | if($app->isSite()) { 391 | return; 392 | } 393 | 394 | if (substr($this->jversion,0,3)=="1.5") 395 | $dir = JPATH_SITE."/plugins/system/"; 396 | else 397 | $dir = JPATH_SITE."/plugins/system/plugin_googlemap3/"; 398 | 399 | if (file_exists($dir.'plugin_googlemap3_proxy.php')) { 400 | jimport('joomla.filesystem.file'); 401 | JFile::delete($dir.'plugin_googlemap3_proxy.php'); 402 | } 403 | 404 | if ($this->params->get( 'publ', '' )=='') { 405 | $database = JFactory::getDBO(); 406 | if (substr($this->jversion,0,3)=="1.5") 407 | $query = "SELECT params FROM #__plugins AS b WHERE b.element='plugin_googlemap2' AND b.folder='system'"; 408 | else 409 | $query = "SELECT params FROM #__extensions AS b WHERE b.element='plugin_googlemap2' AND b.folder='system'"; 410 | 411 | $database->setQuery($query); 412 | if (!$database->query()) 413 | JError::raiseWarning(1, 'plgSystemPlugin_googlemap3::install_params: '.JText::_('SQL Error')." ".$database->stderr(true)); 414 | 415 | $params = $database->loadResult(); 416 | if (substr($this->jversion,0,2)=="3.") 417 | $savparams = $database->escape($params); 418 | else 419 | $savparams = $database->getEscaped($params); 420 | 421 | if ($params!="") { 422 | if (substr($this->jversion,0,3)=="1.5") 423 | $query = "UPDATE #__plugins AS a SET a.params = '{$savparams}' WHERE a.element='plugin_googlemap3' AND a.folder='system'"; 424 | else 425 | $query = "UPDATE #__extensions AS a SET a.params = '{$savparams}' WHERE a.element='plugin_googlemap3' AND a.folder='system'"; 426 | $database->setQuery($query); 427 | 428 | if (!$database->query()) 429 | JError::raiseWarning(1, 'plgSystemPlugin_googlemap3::install_params: '.JText::_('SQL Error')." ".$database->stderr(true)); 430 | if (substr($this->jversion,0,3)=="1.5") 431 | $this->params = new JParameter( $params ); 432 | else { 433 | $plugin = JPluginHelper::getPlugin('system', 'plugin_googlemap3'); 434 | $this->params = new JRegistry(); 435 | $this->params->loadString($plugin->params); } 436 | } 437 | 438 | // Clean up variables 439 | unset($database, $query, $params, $savparams, $plugin); 440 | } 441 | } 442 | } 443 | 444 | ?> -------------------------------------------------------------------------------- /media/site/googlemaps/googlemapsv3.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @package Googlemaps 3 | * @version 3.3 4 | * @copyright Copyright (C) 2013 Open Source Matters. All rights reserved. 5 | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php 6 | * Googlemaps is free software and parts of it may contain or be derived from the 7 | * GNU General Public License or other free or open source software licenses. 8 | * 9 | */ 10 | 11 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('f z(B,7,2E){6.j=k;6.3e=k;6.l=k;6.3x=k;6.D=[];6.q=[];6.1a=k;6.F=[];6.1c=k;6.M=k;6.1u=k;6.1F=k;6.1f=[];6.3W=[];6.25=k;6.2h=0;6.3K=O;6.1w=0;6.1b=[];6.2U=k;6.2u=k;6.3V=O;6.B=B;7=7||{};6.7={"aM":"1","5W":"1","3Y":5y,"4X":\'1i\',"1I":"52.9j","1K":"4.7X","1E":"","1M":"","1O":"","22":"","M":"10","33":"0","q":{},"1k":{},"4W":8m,"1H":2,"2R":0};6.7=6.78(6.7,7);6.7.2E=2E;9(6.7.1I=="")6.7.1I=k;s 6.7.1I=1A(6.7.1I);9(6.7.1K=="")6.7.1K=k;s 6.7.1K=1A(6.7.1K);9(6.7.1E=="")6.7.1E=k;s 6.7.1E=1A(6.7.1E);9(6.7.1M=="")6.7.1M=k;s 6.7.1M=1A(6.7.1M);9(6.7.1O=="")6.7.1O=k;s 6.7.1O=1A(6.7.1O);9(6.7.22=="")6.7.22=k;s 6.7.22=1A(6.7.22);6.7.M=S(6.7.M);6.7.4V=S(6.7.4V);6.7.4U=S(6.7.4U);6.7.33=S(6.7.33);6.7.39=S(6.7.39);9((6.7.Q!=""&&6.7.1Q==""&&!6.7.5E)||(6.7.1E!==k&&6.7.1M!==k)&&!(6.7.5E&&6.7.1Q!=""&&6.7.83=="0")){G={};G.K=6.7.1E;G.L=6.7.1M;G.Q=6.7.Q;G.12=6.7.12;9(6.7.5D)G.V=6.7.5D;s G.V="";9(6.7.1D)G.1D=6.7.1D;s G.1D=k;6.D.11(G)}6.7.4T=6.7.4T.8h();9(6.7.G=="1")6.7.G=J;s 6.7.G=O;9(6.7.1f&&6.7.1f!=\'1i\'){9(6.7.1f!=\'8l\')6.3W.11(6.7.1f)}9(6.7.F&&!6.4P(6.7.F)&&6.7.F!="")6.7.F=[6.7.F];6.7.3Y=S(6.7.3Y);6.j=T.1t(\'o\'+6.B);9(6.j){6.j.1q("3E",0);6.j.1q("3F",0);d j=T.1t(\'3U\'+6.B);j.R.6v=\'6x\'}9(6.7.5W=="1"&&1S.92){d 5w=f(){6.3e=4O(\'o\'+B+".4L()",50)}.32(6);1S.7N(\'7O\',5w)}s 6.3e=4O(\'o\'+6.B+".4L()",6.7.3Y)};z.u.78=f(){f 64(v){9(v===k)P O;9(1L v!==\'2W\')P O;9(!(\'2K\'4K v))P O;d 4J=v.2K;a4{v.2K=\'3r aX?\'}7z(e){P J}9(v.2K===4J)P J;v.2K=4J;P O}d 3w=f(1P,1d){9(64(1d)||1L 1d!==\'2W\'||1d===k){P 1P}1h(d p 4K 1d){9(!1d.7W(p))6I;9(1d[p]===3Q)6I;9(1L 1d[p]!==\'2W\'||1d[p]===k){1P[p]=1d[p]}s 9(1L 1P[p]!==\'2W\'||1P[p]===k){1P[p]=3w(1d[p].5e===5t?[]:{},1d[p])}s{3w(1P[p],1d[p]);1P[p].H=1d[p].H}}P 1P};d 2y=4I[0];9(1L 2y!==\'2W\'||2y===k)P 2y;1h(d i=1,5F=4I.H;i<5F;i++){3w(2y,4I[i])}P 2y};z.u.4P=f(j){9(j.5e.9o().4G(\'5t\')==-1)P O;s P J};z.u.63=f(){9(6.7.1H==1&&6.1a!=k&&6.1a.2Z()!=k)6.1c=6.1a.30();s 9(6.7.1O!=k&&6.7.22!=k){6.1c=A a.c.1x(6.7.1O,6.7.22);6.M=6.7.M}s 9(!6.7.1O!==k&&!6.7.22!==k){9(6.D.H==0&&6.F.H==0){9(6.7.1I&&6.7.1K)6.1c=A a.c.1x(6.7.1I,6.7.1K);s 6.1c=A a.c.1x(0,0);6.M=6.7.M}9(6.D.H==1&&!(6.7.2R==1&&(6.7.1H==2||6.7.1H==3)&&6.1a!=k&&6.1a.2Z()!=k)){6.1c=A a.c.1x(6.D[0].K,6.D[0].L);6.M=6.7.M}9(6.D.H>1||(6.D.H==1&&(6.7.2R==1&&(6.7.1H==2||6.7.1H==3)&&6.1a!=k&&6.1a.2Z()!=k))){d 2d;d 2b;d 26;d 2a;1h(p=0;p<6.D.H;p++){9((2d==k&&6.D[p].K)||2d>6.D[p].K){2d=6.D[p].K}9((2b==k&&6.D[p].L)||2b>6.D[p].L){2b=6.D[p].L}9((26==k&&6.D[p].K)||26<6.D[p].K){26=6.D[p].K}9((2a==k&&6.D[p].L)||2a<6.D[p].L){2a=6.D[p].L}}9(6.7.2R==1&&(6.7.1H==2||6.7.1H==3)&&6.1a!=k&&6.1a.2Z()!=k){d X=6.1a.30();9((2d==k&&X.K())||2d>X.K()){2d=X.K()}9((2b==k&&X.L())||2b>X.L()){2b=X.L()}9((26==k&&X.K())||26=0)&&1u!==k){d 6n=a.c.N.2M(6.l,"9X",f(){6.o.1u=6.3A();9(6.o.1b.H==0){6.o.4E()}9(6.o.1u&&6.o.1u!=k)a.c.N.aD(6n)});6.l.3L(M)}s 2q(\'o\'+6.B+".2l()",7x)};z.u.5a=f(){9(6.1c!==k&&6.M!==k){6.l.4C(6.1c);6.l.3L(6.M)}9(6.1u!==k)6.l.7B(6.1u);9(6.1b.H==0){6.4E()}};z.u.4E=f(){d 1b={};1b.1c=k||6.l.7C();1b.M=k||6.l.3y();9(!(1b.1c==k&&1b.M==k))6.1b.11(1b)};z.u.5h=f(){9(6.1b.H>0){6.l.4C(6.1b[6.1b.H-1].1c);6.l.3L(6.1b[6.1b.H-1].M);9(6.1b.H>1)6.1b.7G()}};z.u.7H=f(){d j=6;d Q=T.1t(\'5i\'+6.B).Y;9(Q.H>0){9(!6.1F)6.1F=A a.c.4B();6.1F.4z({\'Q\':Q,\'1u\':6.l.3A()},f(1s,U){9(U==a.c.4y.31){d 1T=j.7.1T;1T=1T.1p(/##/,Q);d K=1s[0].34.1V.K();d L=1s[0].34.1V.L();1T=1T.1p(/#K#/,K);1T=1T.1p(/#L#/,L);d 1l={};1l.1X=A a.c.1x(K,L);d G=A a.c.6G(1l);j.1c=A a.c.1x(K,L);9(j.7.39!="0")j.M=j.7.39;s j.M=j.l.3y();j.l.4C(j.1c);j.l.3L(j.M);j.1G.6J(1T);j.1G.3d(j.l,G);j.1G.aG(1l.1X);9(j.7.4W!=-1)2q(\'o\'+j.B+\'.1G.51();\',j.7.4W)}s{d 2S=j.7.2S;2S=2S.1p(/##/,Q);7i(2S)}})}P O};z.u.3f=f(){d 1e=T.1t(\'1e\'+6.B);P 1e};z.u.4x=f(Q,1Q,3j,3n,1J,W,3s,3t){d j=6;d 1e=6.3f();9(1e&&1e.5S()){3v(1e.2n.H>=1){1e.4Y(1e.2x)}}9(!6.4w)6.4w=A a.c.8a();d 18={};9(Q!=\'\')18.2V=Q;s{9(6.7.1E!=\'\'&&6.7.1M!=\'\')18.2V=6.7.1E+", "+6.7.1M;s 18.2V=6.7.1I+", "+6.7.1K}9(1Q!=\'\')18.3G=1Q;s 18.3G=3j+", "+3n;18.3I=a.c.3J.8t;9(W==\'w\')18.3I=a.c.3J.8B;9(W==\'b\')18.3I=a.c.3J.91;9(W==\'r\')18.3I=a.c.3J.94;9(W==\'h\')18.9n=J;9(W==\'t\')18.9v=J;9(3s)18.9E=J;9(3t)18.9W=J;9(W!=\'r\'&&1J&&6.4P(1J)&&1J.H>0){d 4v=[];1h(d x=0;x<1J.H;x++){4v.11({1V:1J[x],am:J})}18.1J=4v}6.4w.57(18,f(3M,U){j.5c(3M,U)})};z.u.41=f(I){f 3S(I){d W="";9(I.W){1h(d i=0;i0){4Z(6.3e);9(6.7.4X!=\'1i\'&&1L 4r!==\'3Q\'&&1L 4r.54!==\'3Q\'){6.3x=A 4r.54(\'3U\'+6.B,{7l:7n,7o:6.7.4X});6.3x.7u();6.3x.7w()}6.j.1q("3F",1);6.2D()}}}}};z.u.58=f(){d E={};4o(6.7.4n){1B"7E":E.3i=a.c.1z.4m;1r;1B"7J":E.3i=a.c.1z.4k;1r;1B"7L":E.3i=a.c.1z.5z;1r;4j:E.3i=a.c.1z.4i;1r}9(6.7.7V==\'4g\'){E.5G=J;9(6.7.7Y=="0")E.6t=O;9(6.7.7Z==\'0\')E.5H=O;s E.5H=J;4o(6.7.88){1B"3D-8c":1B"3D-8d":1B"8e":E.5O={R:a.c.5Q.8j};E.3p=J;E.3q=J;1r;1B"3D-b8":1B"8n":E.5O={R:a.c.5Q.8p};E.3p=J;E.3q=J;1r;4j:E.3p=O;E.3p=O;E.3q=O;1r}9(6.7.8q==\'0\')E.5V=O;s E.5V=J;d 1C={};d 1j=[];9(6.7.8u=="1")1j.11(a.c.1z.4i);9(6.7.8w=="1")1j.11(a.c.1z.4m);9(6.7.8x=="1")1j.11(a.c.1z.4k);9(6.7.8y=="1")1j.11(a.c.1z.5z);1C.1j=1j;9(6.7.3u==\'0\')E.65=O;s E.65=J;9(6.7.3u==\'1\')1C.R=a.c.4b.8C;9(6.7.3u==\'2\')1C.R=a.c.4b.8H;9(6.7.3u==\'3\')1C.R=a.c.4b.8I;E.1C=1C;9(6.7.69!="0"){E.8M=J;9(6.7.69=="1")E.8N={8O:J}}9(6.7.8P==\'0\'){E.8Q=O;E.3q=O}9(6.7.8R==\'1\')E.8S=J}s{E.5G=O;d 1C={};d 1j=[];1j.11(a.c.1z.4i);1j.11(a.c.1z.4m);1j.11(a.c.1z.4k);1C.1j=1j;E.1C=1C}E.6a=6.7.4V;E.6c=6.7.4U;9(6.7.8U==\'0\')E.8V=J;9(6.7.8W==\'0\')E.8X=O;9(6.7.2E)E.90=6.7.2E;P E};z.u.2v=f(K,L,Q,12,V,1D,Z){f 4a(49){9(!49)P"";d 48=T.21("98");48.1Z=49.1p(//g,"&9g;");P 48.Y}d 3B="";d 3C="";Z=Z&&(6.7.Z!="0");d 1l={};1l.1X=A a.c.1x(K,L);9(12&&12!=\'\'){1h(x 4K 6.q){9(6.q[x].B==12){12=x;1r}}1l.9m=6.q[12].2i;9(6.q[12].2j)1l.2j=6.q[12].2j;9(6.q[12].2H)1l.2H=6.q[12].2H;1l.3H=6.q[12].3H}1l.l=6.l;1l.6z=4a(1D);d G=A a.c.6G(1l);6.6B++;G.2I=6.6B;G.2J=6;G.l=6.l;9(V!=\'\'){V=4a(V);9(V==V.1p(/<\\/1N>$/i,3B+3C+\'\'))V=V+3B+3C;s V=V.1p(/<\\/1N>$/i,3B+3C+\'\');G.V=T.21(\'1N\');G.V.1Z=V;d 15=6.29(G.V,\'3N\'+6.B);9(6.7.1f&&6.7.1f!=\'1i\')6.2N(15,\'1m\');a.c.N.2M(G,\'3P\',f(){6.2J.1G.6J(6.V);6.2J.1G.3d(6.l,G);9(6.2J.6S)6.2J.6S=O})}P G};z.u.9I=f(C){d 47=T.1t(\'9N\'+6.B).Y;9(6.7.6W==\'a\'){d F=6.46(\'6X://77.a.45/1E/7a/7b/7c?4g=\'+47+\'&4u=F\',J);a.c.N.1Y(F.17,\'53\',f(){a.c.N.1Y(6.o.l,\'42\',f(){6.o.1w--;6.o.2l()})})}s{d F=6.55(\'6X://77.a.45/1E/7a/7b/7c?4g=\'+47+\'&4u=F\',J);a.c.N.1Y(6.l,\'42\',f(){6.o.1w--;6.o.2l()})}};z.u.56=f(C){d j=6;6.2h++;9(6.7.aa==\'ab\'){9(!6.25)6.25=A ac();6.25.ae(k,f(){j.2h--;9(j.25&&j.25.1s[0]){C.K=j.25.1s[0].K;C.L=j.25.1s[0].L;C.G=j.2v(C.K,C.L,C.Q,C.12,C.V,C.1D,C.Z)}s{C.K=j.7.1I;C.L=j.7.1K;C.G=j.2v(C.K,C.L,C.Q,C.12,C.V,C.1D,C.Z)}9(j.2h<=0)a.c.N.1n(j.l,\'1v\',j)});6.25.ai(C.Q)}s{9(!6.1F)6.1F=A a.c.4B();6.1F.4z({\'Q\':C.Q,\'1u\':6.l.3A()},f(1s,U){j.2h--;9(U==a.c.4y.31){C.K=1s[0].34.1V.K();C.L=1s[0].34.1V.L();C.G=j.2v(C.K,C.L,C.Q,C.12,C.V,C.1D,C.Z)}s{C.K=j.7.1I;C.L=j.7.1K;C.G=j.2v(C.K,C.L,C.Q,C.12,C.V,C.1D,C.Z)}9(j.2h<=0)a.c.N.1n(j.l,\'1v\',j)})}};z.u.29=f(j,2I){1h(d i=0;i0)6.1f[6.1f.H-1].az(6.3W);6.1f[6.1f.H-1].aB(\'1u\',6.l)}}};z.u.5b=f(){d 27={};9(6.7.aH==\'aJ\')27.5d=a.c.28.5f.7j;s 27.5d=a.c.28.5f.7k;9(6.7.5g==\'7m\')27.43=a.c.28.44.7p;s 9(6.7.5g==\'m\')27.43=a.c.28.44.7q;s 27.43=a.c.28.44.7r;9(6.7.7s==\'0\')27.7t=J;6.5j=A a.c.28.7v(27);6.5j.1o(6.l)};z.u.5k=f(){6.5l=A a.c.28.7y();6.5l.1o(6.l)};z.u.5m=f(){6.5n=A a.c.7A();6.5n.1o(6.l)};z.u.5o=f(){6.5p=A a.c.7D();6.5p.1o(6.l)};z.u.5q=f(){6.5r=A a.c.7F();6.5r.1o(6.l)};z.u.5s=f(){d 3T={};9(6.7.5u!="")3T.7I=6.7.5u;9(6.7.5v!="")3T.7K=6.7.5v;6.2k=A a.c.5x.7M(3T);9(6.7.3R!=\'1i\'||6.7.3z!=\'1i\'){a.c.N.2M(6.l,"7P",f(){d M=6.3y();9((6.o.7.3R==\'1i\'||(6.o.7.3R!=\'1i\'&&M>=S(6.o.7.3R)))&&(6.o.7.3z==\'1i\'||(6.o.7.3z!=\'1i\'&&M<=S(6.o.7.3z)))){9(6.o.2k.2D()==k)6.o.2k.1o(6)}s 9(6.o.2k.2D()!=k)6.o.2k.1o(k)})}s 6.2k.1o(6.l)};z.u.5A=f(){9(6.7.28==\'1\')6.5b();9(6.7.7R==\'1\')6.5k();9(6.7.7S==\'1\')6.5m();9(6.7.7T==\'1\')6.5o();9(6.7.7U==\'1\')6.5q();9(6.7.5x==\'1\')6.5s()};z.u.5B=f(){9(6.7.5C!=\'1i\'){6.2p=T.1t(6.7.5C);9(6.2p!==k){d 2C={2L:6.7.80,81:6.7.82};9(6.7.4c&&6.7.4c!="")2C.84=6.7.4c;s{9(6.D.H==1)2C.1X=6.D[0].G.30();s 2C.1X=6.1c}6.2U=A a.c.85(6.2p,2C);6.2p.o=6;6.l.86(6.2U);9(6.7.87=="1"){a.c.N.4d(6.2p,\'89\',f(){6.o.5I()});a.c.N.4d(6.2p,\'8b\',f(){6.o.5J()});6.4e()}}}};z.u.5L=f(){d 2L=6.2U.8f();6.2U.8g({5M:2L.5M+2,5N:2L.5N,M:2L.M})};z.u.5I=f(){6.3V=J;6.4f()};z.u.5J=f(){6.3V=O;6.4e()};z.u.4f=f(){9(6.2u){4Z(6.2u);6.2u=k}};z.u.4e=f(){9(!6.3V){9(6.2u)6.4f();6.2u=1S.4O(\'o\'+6.B+\'.5L()\',8k)}};z.u.5P=f(){6.3K=J;1h(i=0;i<6.D.H;i++){9(6.D[i].K&&6.D[i].L)6.D[i].G=6.2v(6.D[i].K,6.D[i].L,6.D[i].Q,6.D[i].12,6.D[i].V,6.D[i].1D,6.D[i].Z);s{9(6.D[i].Q!=\'\')6.56(6.D[i])}}6.3K=O;a.c.N.1n(6.l,\'1v\',6)};z.u.46=f(2w,2z){d 4h={};9(!2z)4h.8o=J;s 6.1w++;d 5T=2w;d F={};F.2w=5T.1p(/&2r;/g,3m.3l(38));F.17=A a.c.8s(F.2w,4h);F.17.1o(6.l);F.17.o=6;6.F.11(F);P F};z.u.55=f(2w,2z){6.1w++;9(!6.17){6.17=A 5X("o"+6.B+".17",6.l,6.F,6.7.1k);6.17.5Y=[]}s 6.17.8v();6.17.5Y.11(2w);6.17.5Z()};z.u.60=f(){d 2z=!(6.7.1O&&6.7.22);1h(i=0;i<6.7.F.H;i++){d F=6.46(6.7.F[i],2z);a.c.N.1Y(F.17,\'53\',f(){a.c.N.1Y(6.o.l,\'42\',f(){6.o.1w--;9(6.o.1w<=0){6.o.2l();a.c.N.1n(6.o.l,\'1v\',6)}})})}9(!2z)a.c.N.1n(6.l,\'1v\',6)};z.u.61=f(){6.1w++;1h(i=0;i<6.7.F.H;i++){d F=6.7.F[i];F=F.1p(/&2r;/g,3m.3l(38));6.F.11(F)}6.17=A 5X("o"+6.B+".17",6.l,6.F,6.7.1k);a.c.N.1Y(6.17,\'8z\',f(){6.o.1w--;9(6.o.1w<=0){6.o.2l();a.c.N.1n(6.o.l,\'1v\',6)}});6.17.o=6;6.17.5Z()};z.u.62=f(){1h(i=0;i<6.7.F.H;i++){6.4l++;d 3k=6.7.F[i];3k=3k.1p(/&2r;/g,3m.3l(38));d 2s=A 8D.8E.8F(3k);2s.1o(6.l);2s.o=6;6.F.11(2s);a.c.N.1Y(2s,\'8G\',f(){6.o.4l--;9(6.o.4l<=0)a.c.N.1n(6.o.l,\'1v\',6)})}};z.u.66=f(){1h(x=0;x<6.7.q.H;x++){6.q[6.7.q[x].B]={};6.q[6.7.q[x].B].B=6.7.q[x].B;6.7.q[x].2c=6.7.q[x].2c.1p(/&2r;/g,3m.3l(38));6.q[6.7.q[x].B].2i=A a.c.68(6.7.q[x].2c);9(6.7.q[x].2c.4G(\'.8K\')>0||6.7.q[x].2c.4G(\'.8L\')>0)6.q[6.7.q[x].B].3H=O;s 6.q[6.7.q[x].B].3H=J;9(6.7.q[x].4p!=""&&6.7.q[x].4q!=""){6.q[6.7.q[x].B].2i.6b=A a.c.3c(S(6.7.q[x].4p),S(6.7.q[x].4q));6.q[6.7.q[x].B].2i.6d=A a.c.3c(S(6.7.q[x].4p),S(6.7.q[x].4q))}9(6.7.q[x].36!=""&&6.7.q[x].40!="")6.q[6.7.q[x].B].2i.6g=A a.c.3O(S(6.7.q[x].36),S(6.7.q[x].40));9(6.7.q[x].6i){6.q[6.7.q[x].B].2j=A a.c.68(6.7.q[x].6i);9(6.7.q[x].6j!=""&&6.7.q[x].6k!="")6.q[6.7.q[x].B].2j.6b=A a.c.3c(S(6.7.q[x].6j),S(6.7.q[x].6k));9(6.7.q[x].36!=""&&6.7.q[x].40!="")6.q[6.7.q[x].B].2j.6g=A a.c.3O(S(6.7.q[x].36),S(6.7.q[x].40))}s 6.q[6.7.q[x].B].2j=k;9(6.7.q[x].6l!=\'\')6.q[6.7.q[x].B].2H={X:6.7.q[x].6l.8Y(","),4u:\'8Z\'};s 6.q[q[x].B].2H=k}9(6.7.1k.2T&&6.7.1k.2T!=""){6.7.1k.2T=6.q[6.7.1k.2T].2i;6.7.1k.2T.6d=k}9(6.7.1k.2B&&6.7.1k.2B.3h&&6.7.1k.2B.3h!="")6.7.1k.2B.3h=6.q[6.7.1k.2B.3h].2i};z.u.6o=f(){9(a&&a.2Q&&a.2Q.95()&&a.2Q.96()){6.97=A 6q(6.l,6.7.6r==\'1\',6.7.9a);d 6s=6;9(6.7.4n==\'2Q\')a.c.N.1Y(6.l,\'9c\',f(){6s.l.9d(6q.9e)})}};z.u.9f=f(X,M){9(6.2m!==k){d 4A=6.l.9i();d 2O=9k.9l(2,M);d 2m=A a.c.4F(4A.6w(A a.c.3O((X.x)*2o/2O,(X.y+1)*2o/2O),M),4A.6w(A a.c.3O((X.x+1)*2o/2O,(X.y)*2o/2O),M));9(6.2m&&6.2m.9p(2m)){P J}s{P O}}P J};z.u.6y=f(){9(6.7.4D!=""&&6.7.6A!=""){d 2e={};9(6.7.6C)2e.6a=S(6.7.6C);9(6.7.6D)2e.6c=S(6.7.6D);9(6.7.6E)2e.9x=1A(6.7.6E);2e.9y=A a.c.3c(2o,2o);6F("2e.9A ="+6.7.6A);6.4D=A a.c.9B(2e);6.l.9C.9D(0,6.4D);9(6.7.2G){6.2m=A a.c.4F(A a.c.1x(1A(6.7.2G[0]),1A(6.7.2G[1])),A a.c.1x(1A(6.7.2G[2]),1A(6.7.2G[3])))}}};z.u.6H=f(){d 2g=T.21(\'1N\');2g.1q(\'4H\',\'2g\');9(6.7.6K)2g.6L=S(6.7.6K);s 2g.6L=1;d 13=T.21(\'1N\');13.1q(\'4H\',\'9K\');2g.1U(13);d 2A=T.21(\'9M\');2A.1q(\'1d\',6.7.2c);2A.1q(\'3g\',6.7.9O);2A.1q(\'3Z\',6.7.9Q);13.1U(2A);6.l.9R[6F(\'a.c.9S.\'+6.7.9T.9U())].11(2g)};z.u.6P=f(6Q){d l=6Q.2D();P(l!==k&&1L l!=="3Q")};z.u.6R=f(){6.7.G=O;a.c.N.1n(6.D[0].G,\'3P\')};z.u.4M=f(){d 2F=O;9(6.l){d 4N=6.l.a0();9(4N!==k){d 1W=4N.6U(\'1N\');1h(d n=0;n<1W.H;++n){9((1W[n].R.1X==\'4Q\')&&(S(1W[n].R.4R)==0)&&(S(1W[n].R.4S)==20)&&(S(1W[n].R.3Z)==19)&&(S(1W[n].R.3g)==19)&&(1W[n].R.6Y==\'6Z\')){d 70=1W[n].71;70.1U(6.72());2F=J}}}}9(!2F)2q(\'o\'+6.B+\'.4M()\',5y)};z.u.72=f(){d 13=T.21(\'ad\');13.R.1X=\'4Q\';13.R.4R=\'73\';13.R.4S=\'73\';13.R.3Z=\'14.74\';13.R.3g=\'14.74\';13.R.6Y=\'6Z\';13.R.ah=\'1c\';13.R.75=\'76\';13.6z=\'ak 2X al 1X\';13.o=6;d 1R=T.21(\'an\');1R.1d=T.1V.4t+\'//c.ao.45/ap/aq.ar\';1R.R.1X=\'4Q\';1R.R.4R=\'-as\';1R.R.4S=\'-at\';1R.R.3Z=\'au\';1R.R.3g=\'av\';1R.R.75=\'76\';13.1U(1R);a.c.N.4d(13,\'3P\',f(){6.o.5h()});P 13};z.u.aw=f(){6.37=T.1t("3U"+6.B);6.79=6.37.71;d 35=T.21("1N");35.1q("4H","aA");35.1U(6.37);d 1g=T.6U("aC");9(1g)1g=1g[0];6.3a=[];3v(1g.2x){6.3a.11(1g.2x);1g.4Y(1g.2x)}9(1g)1g.1U(35);1S.aE();3v(1g.2x){1g.4Y(1g.2x)}3v(6.3a.H>0){1g.1U(6.3a.aF())}6.79.1U(6.37)};z.u.7d=f(Q){9(6.7.3o==\'1\'){d 15=T.1t(\'3N\'+6.B);9(15){9(6.7.aI==\'2\')d 24=6.29(15,\'1m\');s d 24=6.29(15,\'1y\');9(24)24.Y=Q}9(6.7.1H==3)6.41(15)}9(6.D.H>0){1h(p=0;p<6.D.H;p++){d 15=6.29(6.D[p].G.V,\'3N\'+6.B);d 24=6.29(15,\'1m\');24.Y=Q}9(6.6P(6.1G)&&6.7.1H==3){6.41(15)}}};z.u.7f=f(X){d j=6;9(!6.1F)6.1F=A a.c.4B();6.1F.4z({\'aK\':X},f(1s,U){9(U==a.c.4y.31)9(1s[0])Q=1s[0].aL;j.7d(Q)})};z.u.7g=f(){6.1a=A aN();6.1a.o=6;6.1a.l=6.l;6.1a.aO({aP:\'#aQ\'});a.c.N.1Y(6.1a,\'aR\',f(){a.c.N.1n(6.l,"1v",6.l);6.o.7f(6.30())});6.1a.1o(6.l)};z.u.2D=f(){9(!6.j!==k||6.7.aS=="0"||6.j.3b>0){6.66();d E=6.58();6.l=A a.c.aT(6.j,E);6.l.o=6;9(6.7.4n==\'2Q\'||6.7.6r==\'1\')6.6o();6.6y();9(6.7.2R==1)6.7g();6.1G=A a.c.aU({aV:""});a.c.N.2M(6.l,"3P",f(){6.o.1G.51()});9(1L aW.u.32==\'f\'){9(1L 1S.6u==\'f\')1S.6u(\'aY\',f(N){a.c.N.1n(6.l,"1v",6.l)}.32(6));s 1S.aZ=f(){a.c.N.1n(6.l,"1v",6.l)}.32(6)}a.c.N.2M(6.l,\'1v\',f(){9(6.o.2h<=0&&!6.o.3K&&6.o.1w<=0){6.o.63();6.o.5a();6.o.5B();9(6.o.7.G&&6.o.D.H==1&&6.o.7.G==\'1\'&&6.o.D[0].G&&6.o.1G)2q(\'o\'+6.o.B+".6R()",b0)}});6.5A();9(6.D.H>0)6.5P();9(6.7.F.H>0)4o(6.7.6W){1B"a":4j:6.60();1r;1B"b1":6.61();1r;1B"2s":6.62();1r}9(6.7.2c&&6.7.2c!="")6.6H();9(((6.7.3j!=\'\'&&6.7.3n!=\'\')||(6.7.1Q!=\'\'))&&6.7.b2==\'0\'&&((6.7.3o==\'1\'&&6.7.1Q!=\'\'&&6.7.1Q!=\'\')||(6.7.3o!=\'1\')))6.4x(6.7.Q,6.7.1Q,6.7.3j,6.7.3n,6.7.1J,((6.7.b3==\'1\')?\'h\':((6.7.b4==\'1\')?\'t\':6.7.4T)),((6.7.3s==\'1\')?J:O),((6.7.3t==\'1\')?J:O));9(6.7.3o==\'1\'&&6.7.1f!=\'1i\'){d 15=T.1t(\'3N\'+6.B);6.2N(15,\'1m\');6.2N(15,\'1y\')}9(6.7.b5==\'1\'&&6.7.1f!=\'1i\'){d 15=T.1t(\'b6\'+6.B);6.2N(15,\'5i\'+6.B)}9(6.7.b7==\'1\')2q(\'o\'+6.B+\'.4M()\',8i);a.c.N.1n(6.l,\'1v\',6.l)}}',62,691,'||||||this|options||if|google||maps|var||function||||obj|null|map|||googlemap||markericon||else||prototype|||||GoogleMaps|new|name|item|markers|mapoptions|kml|marker|length|formObj|true|lat|lng|zoom|event|false|return|address|style|parseInt|document|status|html|dirflg|coord|value|dir||push|icontype|controlUI||form||kmllayer|request||GeoMarker|savepos|center|src|dirsidebar|autocompl|bodyObj|for|none|mapTypeIds|geoxmloptions|markeroptions|saddr|trigger|setMap|replace|setAttribute|break|results|getElementById|bounds|mapcenter|kmlprocess|LatLng|daddr|MapTypeId|parseFloat|case|mapTypeControlOptions|tooltip|latitude|geocoder|infowindow|geocenter|deflatitude|waypoints|deflongitude|typeof|longitude|div|centerlat|dst|toaddress|imageUI|window|txtaddr|appendChild|location|divs|position|addListenerOnce|innerHTML||createElement|centerlon|newelem|formfield|localSearch|maxlat|weatherOptions|weather|getElement|maxlng|minlng|imageurl|minlat|tilelayeroptions|DirectionsStatus|controlDiv|geoprocess|image|shadow|panoramioLayer|CorrectionZoom|tileBounds|childNodes|256|svpanobj|setTimeout|amp|arcgis|directionsDisplay|svtimer|createMarker|url|firstChild|out|move|controlIMG|clustering|svoptions|getMap|mapstyled|found|tilebounds|shape|id|GoogleMap|nodeName|pov|addListener|addAutoComplete|zfactor|checked|earth|geoloc|erraddr|baseicon|svpanorama|origin|object|to|lang|getAccuracy|getPosition|OK|bind|corzoom|geometry|divElem|iconanchorx|printobj||gotoaddrzoom|oldBody|offsetWidth|Size|open|objint|_getdirdiv|height|Icon|mapTypeId|tolat|arcgisurl|fromCharCode|String|tolon|formaddress|zoomControl|panControl|is|diroptimize|diralternatives|showmaptype|while|_mergeRecursive|mySlidemap|getZoom|panomaxzoom|getBounds|dirform|svform||oldValue|refreshMap|destination|optimized|travelMode|TravelMode|markerprocess|setZoom|result|directionform|Point|click|undefined|panominzoom|get_dirflg|panoramiooptions|mapbody|svfocus|autocompltypes|tmp|timeinterval|width|iconanchory|DirectionMarkersubmit|bounds_changed|windSpeedUnits|WindSpeedUnit|com|addKML|userid|ta|str|html_entity_decode|MapTypeControlStyle|svpano|addDomListener|spiralstart|spiralstop|user|kmloptions|ROADMAP|default|HYBRID|arcgisprocess|SATELLITE|mapType|switch|iconwidth|iconheight|Fx|the|protocol|type|waypts|directionsService|showDirections|GeocoderStatus|geocode|projection|Geocoder|setCenter|tilelayer|saveposition|LatLngBounds|indexOf|class|arguments|nn|in|checkMap|hackpancontrol|mapdiv|setInterval|_isArray|absolute|left|top|dirtype|maxzoom|minzoom|gotoaddrtimeout|effect|removeChild|clearInterval||close||metadata_changed|Slide|addKML2|get_address|route|defineMapOptions|field|Center|showWeather|handleDirResult|temperatureUnits|constructor|TemperatureUnit|weatherwindunit|restoreposition|txtAddress|weatherLayer|showCloud|cloudLayer|showTraffic|trafficLayer|showTransit|transitLayer|showBicycle|bicycleLayer|showPanoramio|Array|pano_userid|pano_tag|chkmap|panoramio|500|TERRAIN|showLayers|StreetView|sv|description|geocoded|il|disableDefaultUI|keyboardShortcuts|svmouseover|svmouseout|submit|spiral|heading|pitch|zoomControlOptions|showMarkers|ZoomControlStyle|MOOdalBox|hasChildNodes|kmlurl|googlewebsite|streetViewControl|loadmootools|GeoXml|urls|parse|showKML|showKML2|showArcGis|defineCenter|isDOMNode|mapTypeControl|initIcons|hl|MarkerImage|overview|minZoom|size|maxZoom|scaledSize|lbxcaption|lbxwidth|anchor|lbxheight|iconshadow|iconshadowwidth|iconshadowheight|iconimagemap|DirectionRevert|listener|initGoogleEarth|rendererOptions|GoogleEarth|showearthmaptype|that|draggable|addEventListener|display|fromPointToLatLng|block|initCustomTiles|title|tilemethod|markerid|tileminzoom|tilemaxzoom|tileopacity|eval|Marker|ImageOverlay|continue|setContent|imageindex|index|not|and|many|isInfoWindowOpen|infoWindow|initialInfowindowOpen|clickinfowindow|webpage|getElementsByTagName|allowed|kmlrenderer|http|cursor|pointer|parent|parentNode|add_retpos_panControl|21px|3333px|overflow|hidden|www|mergeRecursive|printparent|apps|badge|api|updateGeolocaddr|getAttribute|getAddress|initGeoloc|The|alert|CELSIUS|FAHRENHEIT|duration|km|1500|mode|KILOMETERS_PER_HOUR|METERS_PER_SECOND|MILES_PER_HOUR|weatherinfo|suppressInfoWindows|hide|WeatherLayer|slideIn|250|CloudLayer|catch|TrafficLayer|fitBounds|getCenter|TransitLayer|satellite|BicyclingLayer|pop|gotoAddress|userId|hybrid|tag|terrain|PanoramioLayer|addEvent|domready|zoom_changed|pw|weathercloud|traffic|transit|bicycle|controltype|hasOwnProperty|541513|dragging|keyboard|svopt|addressControl|svaddress|descr|pano|StreetViewPanorama|setStreetView|svautorotate|zoomtype|mouseover|DirectionsService|mouseout|largeSV|large|Large|getPov|setPov|toLowerCase|1000|LARGE|200|both|5000|Small|preserveViewport|SMALL|svcontrol|100|KmlLayer|DRIVING|shownormalmaptype|clear|showsatellitemaptype|showhybridmaptype|showterrainmaptype|parsed|DirectionsRenderer|WALKING|HORIZONTAL_BAR|gmaps|ags|MapOverlay|drawend|DEFAULT|DROPDOWN_MENU|setPanel|gif|GIF|overviewMapControl|overviewMapControlOptions|opened|rotation|rotateControl|showscale|scaleControl|setDirections|zoomnew|disableDoubleClickZoom|zoomwheel|scrollwheel|split|poly|styles|BICYCLING|MooTools|NOT_FOUND|TRANSIT|isSupported|isInstalled|googleEarth|textarea|One|earthoptions|lt|tilesloaded|setMapTypeId|MAP_TYPE_ID|checkboundTilelayer|gt|of|getProjection|075581|Math|pow|icon|avoidHighways|toString|intersects|ZERO_RESULTS|No|could|be|between|avoidTolls|MAX_WAYPOINTS_EXCEEDED|opacity|tileSize|Too|getTileUrl|ImageMapType|overlayMapTypes|insertAt|optimizeWaypoints|are|defined|maximum|showLatitude|plus|controlBorderDiv|INVALID_REQUEST|img|latitudeid|imageheight|Invalid|imagewidth|controls|ControlPosition|imageposition|toUpperCase|OVER_QUERY_LIMIT|provideRouteAlternatives|idle|has|sent|getDiv|too|requests|within|try|time|period|REQUEST_DENIED|use|directions|clientgeotype|local|GlocalSearch|DIV|setSearchCompleteCallback|service|Unknown|textAlign|execute|error|Return|last|stopover|IMG|gstatic|mapfiles|mapcontrols3d7|png|25px|430px|59px|492px|gmapPrint|places|Autocomplete|setTypes|printmap|bindTo|body|removeListener|print|shift|setPosition|weathertempunit|formdir|celsius|latLng|formatted_address|debug|GeolocationMarker|setCircleOptions|fillColor|808080|position_changed|show|Map|InfoWindow|content|Function|readonly|resize|onresize|850|geoxml|animdir|avoidhighways|avoidtoll|gotoaddr|gotoaddress|returncontrol|small'.split('|'),0,{})) -------------------------------------------------------------------------------- /plugin_googlemap3_OAuth.php: -------------------------------------------------------------------------------- 1 | key = $key; 16 | $this->secret = $secret; 17 | $this->callback_url = $callback_url; 18 | } 19 | 20 | function __toString() { 21 | return "OAuthConsumer[key=$this->key,secret=$this->secret]"; 22 | } 23 | } 24 | 25 | class OAuthToken { 26 | // access tokens and request tokens 27 | public $key; 28 | public $secret; 29 | 30 | /** 31 | * key = the token 32 | * secret = the token secret 33 | */ 34 | function __construct($key, $secret) { 35 | $this->key = $key; 36 | $this->secret = $secret; 37 | } 38 | 39 | /** 40 | * generates the basic string serialization of a token that a server 41 | * would respond to request_token and access_token calls with 42 | */ 43 | function to_string() { 44 | return "oauth_token=" . 45 | OAuthUtil::urlencode_rfc3986($this->key) . 46 | "&oauth_token_secret=" . 47 | OAuthUtil::urlencode_rfc3986($this->secret); 48 | } 49 | 50 | function __toString() { 51 | return $this->to_string(); 52 | } 53 | } 54 | 55 | /** 56 | * A class for implementing a Signature Method 57 | * See section 9 ("Signing Requests") in the spec 58 | */ 59 | abstract class OAuthSignatureMethod { 60 | /** 61 | * Needs to return the name of the Signature Method (ie HMAC-SHA1) 62 | * @return string 63 | */ 64 | abstract public function get_name(); 65 | 66 | /** 67 | * Build up the signature 68 | * NOTE: The output of this function MUST NOT be urlencoded. 69 | * the encoding is handled in OAuthRequest when the final 70 | * request is serialized 71 | * @param OAuthRequest $request 72 | * @param OAuthConsumer $consumer 73 | * @param OAuthToken $token 74 | * @return string 75 | */ 76 | abstract public function build_signature($request, $consumer, $token); 77 | 78 | /** 79 | * Verifies that a given signature is correct 80 | * @param OAuthRequest $request 81 | * @param OAuthConsumer $consumer 82 | * @param OAuthToken $token 83 | * @param string $signature 84 | * @return bool 85 | */ 86 | public function check_signature($request, $consumer, $token, $signature) { 87 | $built = $this->build_signature($request, $consumer, $token); 88 | return $built == $signature; 89 | } 90 | } 91 | 92 | /** 93 | * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] 94 | * where the Signature Base String is the text and the key is the concatenated values (each first 95 | * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' 96 | * character (ASCII code 38) even if empty. 97 | * - Chapter 9.2 ("HMAC-SHA1") 98 | */ 99 | class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod { 100 | function get_name() { 101 | return "HMAC-SHA1"; 102 | } 103 | 104 | public function build_signature($request, $consumer, $token) { 105 | $base_string = $request->get_signature_base_string(); 106 | $request->base_string = $base_string; 107 | 108 | $key_parts = array( 109 | $consumer->secret, 110 | ($token) ? $token->secret : "" 111 | ); 112 | 113 | $key_parts = OAuthUtil::urlencode_rfc3986($key_parts); 114 | $key = implode('&', $key_parts); 115 | 116 | return base64_encode(hash_hmac('sha1', $base_string, $key, true)); 117 | } 118 | } 119 | 120 | /** 121 | * The PLAINTEXT method does not provide any security protection and SHOULD only be used 122 | * over a secure channel such as HTTPS. It does not use the Signature Base String. 123 | * - Chapter 9.4 ("PLAINTEXT") 124 | */ 125 | class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod { 126 | public function get_name() { 127 | return "PLAINTEXT"; 128 | } 129 | 130 | /** 131 | * oauth_signature is set to the concatenated encoded values of the Consumer Secret and 132 | * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is 133 | * empty. The result MUST be encoded again. 134 | * - Chapter 9.4.1 ("Generating Signatures") 135 | * 136 | * Please note that the second encoding MUST NOT happen in the SignatureMethod, as 137 | * OAuthRequest handles this! 138 | */ 139 | public function build_signature($request, $consumer, $token) { 140 | $key_parts = array( 141 | $consumer->secret, 142 | ($token) ? $token->secret : "" 143 | ); 144 | 145 | $key_parts = OAuthUtil::urlencode_rfc3986($key_parts); 146 | $key = implode('&', $key_parts); 147 | $request->base_string = $key; 148 | 149 | return $key; 150 | } 151 | } 152 | 153 | /** 154 | * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in 155 | * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for 156 | * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a 157 | * verified way to the Service Provider, in a manner which is beyond the scope of this 158 | * specification. 159 | * - Chapter 9.3 ("RSA-SHA1") 160 | */ 161 | abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod { 162 | public function get_name() { 163 | return "RSA-SHA1"; 164 | } 165 | 166 | // Up to the SP to implement this lookup of keys. Possible ideas are: 167 | // (1) do a lookup in a table of trusted certs keyed off of consumer 168 | // (2) fetch via http using a url provided by the requester 169 | // (3) some sort of specific discovery code based on request 170 | // 171 | // Either way should return a string representation of the certificate 172 | protected abstract function fetch_public_cert(&$request); 173 | 174 | // Up to the SP to implement this lookup of keys. Possible ideas are: 175 | // (1) do a lookup in a table of trusted certs keyed off of consumer 176 | // 177 | // Either way should return a string representation of the certificate 178 | protected abstract function fetch_private_cert(&$request); 179 | 180 | public function build_signature($request, $consumer, $token) { 181 | $base_string = $request->get_signature_base_string(); 182 | $request->base_string = $base_string; 183 | 184 | // Fetch the private key cert based on the request 185 | $cert = $this->fetch_private_cert($request); 186 | 187 | // Pull the private key ID from the certificate 188 | $privatekeyid = openssl_get_privatekey($cert); 189 | 190 | // Sign using the key 191 | $ok = openssl_sign($base_string, $signature, $privatekeyid); 192 | 193 | // Release the key resource 194 | openssl_free_key($privatekeyid); 195 | 196 | return base64_encode($signature); 197 | } 198 | 199 | public function check_signature($request, $consumer, $token, $signature) { 200 | $decoded_sig = base64_decode($signature); 201 | 202 | $base_string = $request->get_signature_base_string(); 203 | 204 | // Fetch the public key cert based on the request 205 | $cert = $this->fetch_public_cert($request); 206 | 207 | // Pull the public key ID from the certificate 208 | $publickeyid = openssl_get_publickey($cert); 209 | 210 | // Check the computed signature against the one passed in the query 211 | $ok = openssl_verify($base_string, $decoded_sig, $publickeyid); 212 | 213 | // Release the key resource 214 | openssl_free_key($publickeyid); 215 | 216 | return $ok == 1; 217 | } 218 | } 219 | 220 | class OAuthRequest { 221 | private $parameters; 222 | private $http_method; 223 | private $http_url; 224 | // for debug purposes 225 | public $base_string; 226 | public static $version = '1.0'; 227 | public static $POST_INPUT = 'php://input'; 228 | 229 | function __construct($http_method, $http_url, $parameters=NULL) { 230 | @$parameters or $parameters = array(); 231 | $parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters); 232 | $this->parameters = $parameters; 233 | $this->http_method = $http_method; 234 | $this->http_url = $http_url; 235 | } 236 | 237 | 238 | /** 239 | * attempt to build up a request from what was passed to the server 240 | */ 241 | public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) { 242 | $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") 243 | ? 'http' 244 | : 'https'; 245 | @$http_url or $http_url = $scheme . 246 | '://' . $_SERVER['HTTP_HOST'] . 247 | ':' . 248 | $_SERVER['SERVER_PORT'] . 249 | $_SERVER['REQUEST_URI']; 250 | @$http_method or $http_method = $_SERVER['REQUEST_METHOD']; 251 | 252 | // We weren't handed any parameters, so let's find the ones relevant to 253 | // this request. 254 | // If you run XML-RPC or similar you should use this to provide your own 255 | // parsed parameter-list 256 | if (!$parameters) { 257 | // Find request headers 258 | $request_headers = OAuthUtil::get_headers(); 259 | 260 | // Parse the query-string to find GET parameters 261 | $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']); 262 | 263 | // It's a POST request of the proper content-type, so parse POST 264 | // parameters and add those overriding any duplicates from GET 265 | if ($http_method == "POST" 266 | && @strstr($request_headers["Content-Type"], 267 | "application/x-www-form-urlencoded") 268 | ) { 269 | $post_data = OAuthUtil::parse_parameters( 270 | file_get_contents(self::$POST_INPUT) 271 | ); 272 | $parameters = array_merge($parameters, $post_data); 273 | } 274 | 275 | // We have a Authorization-header with OAuth data. Parse the header 276 | // and add those overriding any duplicates from GET or POST 277 | if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") { 278 | $header_parameters = OAuthUtil::split_header( 279 | $request_headers['Authorization'] 280 | ); 281 | $parameters = array_merge($parameters, $header_parameters); 282 | } 283 | 284 | } 285 | 286 | return new OAuthRequest($http_method, $http_url, $parameters); 287 | } 288 | 289 | /** 290 | * pretty much a helper function to set up the request 291 | */ 292 | public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) { 293 | @$parameters or $parameters = array(); 294 | $defaults = array("oauth_version" => OAuthRequest::$version, 295 | "oauth_nonce" => OAuthRequest::generate_nonce(), 296 | "oauth_timestamp" => OAuthRequest::generate_timestamp(), 297 | "oauth_consumer_key" => $consumer->key); 298 | if ($token) 299 | $defaults['oauth_token'] = $token->key; 300 | 301 | $parameters = array_merge($defaults, $parameters); 302 | 303 | return new OAuthRequest($http_method, $http_url, $parameters); 304 | } 305 | 306 | public function set_parameter($name, $value, $allow_duplicates = true) { 307 | if ($allow_duplicates && isset($this->parameters[$name])) { 308 | // We have already added parameter(s) with this name, so add to the list 309 | if (is_scalar($this->parameters[$name])) { 310 | // This is the first duplicate, so transform scalar (string) 311 | // into an array so we can add the duplicates 312 | $this->parameters[$name] = array($this->parameters[$name]); 313 | } 314 | 315 | $this->parameters[$name][] = $value; 316 | } else { 317 | $this->parameters[$name] = $value; 318 | } 319 | } 320 | 321 | public function get_parameter($name) { 322 | return isset($this->parameters[$name]) ? $this->parameters[$name] : null; 323 | } 324 | 325 | public function get_parameters() { 326 | return $this->parameters; 327 | } 328 | 329 | public function unset_parameter($name) { 330 | unset($this->parameters[$name]); 331 | } 332 | 333 | /** 334 | * The request parameters, sorted and concatenated into a normalized string. 335 | * @return string 336 | */ 337 | public function get_signable_parameters() { 338 | // Grab all parameters 339 | $params = $this->parameters; 340 | 341 | // Remove oauth_signature if present 342 | // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.") 343 | if (isset($params['oauth_signature'])) { 344 | unset($params['oauth_signature']); 345 | } 346 | 347 | return OAuthUtil::build_http_query($params); 348 | } 349 | 350 | /** 351 | * Returns the base string of this request 352 | * 353 | * The base string defined as the method, the url 354 | * and the parameters (normalized), each urlencoded 355 | * and the concated with &. 356 | */ 357 | public function get_signature_base_string() { 358 | $parts = array( 359 | $this->get_normalized_http_method(), 360 | $this->get_normalized_http_url(), 361 | $this->get_signable_parameters() 362 | ); 363 | 364 | $parts = OAuthUtil::urlencode_rfc3986($parts); 365 | 366 | return implode('&', $parts); 367 | } 368 | 369 | /** 370 | * just uppercases the http method 371 | */ 372 | public function get_normalized_http_method() { 373 | return strtoupper($this->http_method); 374 | } 375 | 376 | /** 377 | * parses the url and rebuilds it to be 378 | * scheme://host/path 379 | */ 380 | public function get_normalized_http_url() { 381 | $parts = parse_url($this->http_url); 382 | 383 | $port = @$parts['port']; 384 | $scheme = $parts['scheme']; 385 | $host = $parts['host']; 386 | $path = @$parts['path']; 387 | 388 | $port or $port = ($scheme == 'https') ? '443' : '80'; 389 | 390 | if (($scheme == 'https' && $port != '443') 391 | || ($scheme == 'http' && $port != '80')) { 392 | $host = "$host:$port"; 393 | } 394 | return "$scheme://$host$path"; 395 | } 396 | 397 | /** 398 | * builds a url usable for a GET request 399 | */ 400 | public function to_url() { 401 | $post_data = $this->to_postdata(); 402 | $out = $this->get_normalized_http_url(); 403 | if ($post_data) { 404 | $out .= '?'.$post_data; 405 | } 406 | return $out; 407 | } 408 | 409 | /** 410 | * builds the data one would send in a POST request 411 | */ 412 | public function to_postdata() { 413 | return OAuthUtil::build_http_query($this->parameters); 414 | } 415 | 416 | /** 417 | * builds the Authorization: header 418 | */ 419 | public function to_header($realm=null) { 420 | $first = true; 421 | if($realm) { 422 | $out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"'; 423 | $first = false; 424 | } else 425 | $out = 'Authorization: OAuth'; 426 | 427 | $total = array(); 428 | foreach ($this->parameters as $k => $v) { 429 | if (substr($k, 0, 5) != "oauth") continue; 430 | if (is_array($v)) { 431 | throw new OAuthException('Arrays not supported in headers'); 432 | } 433 | $out .= ($first) ? ' ' : ','; 434 | $out .= OAuthUtil::urlencode_rfc3986($k) . 435 | '="' . 436 | OAuthUtil::urlencode_rfc3986($v) . 437 | '"'; 438 | $first = false; 439 | } 440 | return $out; 441 | } 442 | 443 | public function __toString() { 444 | return $this->to_url(); 445 | } 446 | 447 | 448 | public function sign_request($signature_method, $consumer, $token) { 449 | $this->set_parameter( 450 | "oauth_signature_method", 451 | $signature_method->get_name(), 452 | false 453 | ); 454 | $signature = $this->build_signature($signature_method, $consumer, $token); 455 | $this->set_parameter("oauth_signature", $signature, false); 456 | } 457 | 458 | public function build_signature($signature_method, $consumer, $token) { 459 | $signature = $signature_method->build_signature($this, $consumer, $token); 460 | return $signature; 461 | } 462 | 463 | /** 464 | * util function: current timestamp 465 | */ 466 | private static function generate_timestamp() { 467 | return time(); 468 | } 469 | 470 | /** 471 | * util function: current nonce 472 | */ 473 | private static function generate_nonce() { 474 | $mt = microtime(); 475 | $rand = mt_rand(); 476 | 477 | return md5($mt . $rand); // md5s look nicer than numbers 478 | } 479 | } 480 | 481 | class OAuthServer { 482 | protected $timestamp_threshold = 300; // in seconds, five minutes 483 | protected $version = '1.0'; // hi blaine 484 | protected $signature_methods = array(); 485 | 486 | protected $data_store; 487 | 488 | function __construct($data_store) { 489 | $this->data_store = $data_store; 490 | } 491 | 492 | public function add_signature_method($signature_method) { 493 | $this->signature_methods[$signature_method->get_name()] = 494 | $signature_method; 495 | } 496 | 497 | // high level functions 498 | 499 | /** 500 | * process a request_token request 501 | * returns the request token on success 502 | */ 503 | public function fetch_request_token(&$request) { 504 | $this->get_version($request); 505 | 506 | $consumer = $this->get_consumer($request); 507 | 508 | // no token required for the initial token request 509 | $token = NULL; 510 | 511 | $this->check_signature($request, $consumer, $token); 512 | 513 | // Rev A change 514 | $callback = $request->get_parameter('oauth_callback'); 515 | $new_token = $this->data_store->new_request_token($consumer, $callback); 516 | 517 | return $new_token; 518 | } 519 | 520 | /** 521 | * process an access_token request 522 | * returns the access token on success 523 | */ 524 | public function fetch_access_token(&$request) { 525 | $this->get_version($request); 526 | 527 | $consumer = $this->get_consumer($request); 528 | 529 | // requires authorized request token 530 | $token = $this->get_token($request, $consumer, "request"); 531 | 532 | $this->check_signature($request, $consumer, $token); 533 | 534 | // Rev A change 535 | $verifier = $request->get_parameter('oauth_verifier'); 536 | $new_token = $this->data_store->new_access_token($token, $consumer, $verifier); 537 | 538 | return $new_token; 539 | } 540 | 541 | /** 542 | * verify an api call, checks all the parameters 543 | */ 544 | public function verify_request(&$request) { 545 | $this->get_version($request); 546 | $consumer = $this->get_consumer($request); 547 | $token = $this->get_token($request, $consumer, "access"); 548 | $this->check_signature($request, $consumer, $token); 549 | return array($consumer, $token); 550 | } 551 | 552 | // Internals from here 553 | /** 554 | * version 1 555 | */ 556 | private function get_version(&$request) { 557 | $version = $request->get_parameter("oauth_version"); 558 | if (!$version) { 559 | // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present. 560 | // Chapter 7.0 ("Accessing Protected Ressources") 561 | $version = '1.0'; 562 | } 563 | if ($version !== $this->version) { 564 | throw new OAuthException("OAuth version '$version' not supported"); 565 | } 566 | return $version; 567 | } 568 | 569 | /** 570 | * figure out the signature with some defaults 571 | */ 572 | private function get_signature_method(&$request) { 573 | $signature_method = 574 | @$request->get_parameter("oauth_signature_method"); 575 | 576 | if (!$signature_method) { 577 | // According to chapter 7 ("Accessing Protected Ressources") the signature-method 578 | // parameter is required, and we can't just fallback to PLAINTEXT 579 | throw new OAuthException('No signature method parameter. This parameter is required'); 580 | } 581 | 582 | if (!in_array($signature_method, 583 | array_keys($this->signature_methods))) { 584 | throw new OAuthException( 585 | "Signature method '$signature_method' not supported " . 586 | "try one of the following: " . 587 | implode(", ", array_keys($this->signature_methods)) 588 | ); 589 | } 590 | return $this->signature_methods[$signature_method]; 591 | } 592 | 593 | /** 594 | * try to find the consumer for the provided request's consumer key 595 | */ 596 | private function get_consumer(&$request) { 597 | $consumer_key = @$request->get_parameter("oauth_consumer_key"); 598 | if (!$consumer_key) { 599 | throw new OAuthException("Invalid consumer key"); 600 | } 601 | 602 | $consumer = $this->data_store->lookup_consumer($consumer_key); 603 | if (!$consumer) { 604 | throw new OAuthException("Invalid consumer"); 605 | } 606 | 607 | return $consumer; 608 | } 609 | 610 | /** 611 | * try to find the token for the provided request's token key 612 | */ 613 | private function get_token(&$request, $consumer, $token_type="access") { 614 | $token_field = @$request->get_parameter('oauth_token'); 615 | $token = $this->data_store->lookup_token( 616 | $consumer, $token_type, $token_field 617 | ); 618 | if (!$token) { 619 | throw new OAuthException("Invalid $token_type token: $token_field"); 620 | } 621 | return $token; 622 | } 623 | 624 | /** 625 | * all-in-one function to check the signature on a request 626 | * should guess the signature method appropriately 627 | */ 628 | private function check_signature(&$request, $consumer, $token) { 629 | // this should probably be in a different method 630 | $timestamp = @$request->get_parameter('oauth_timestamp'); 631 | $nonce = @$request->get_parameter('oauth_nonce'); 632 | 633 | $this->check_timestamp($timestamp); 634 | $this->check_nonce($consumer, $token, $nonce, $timestamp); 635 | 636 | $signature_method = $this->get_signature_method($request); 637 | 638 | $signature = $request->get_parameter('oauth_signature'); 639 | $valid_sig = $signature_method->check_signature( 640 | $request, 641 | $consumer, 642 | $token, 643 | $signature 644 | ); 645 | 646 | if (!$valid_sig) { 647 | throw new OAuthException("Invalid signature"); 648 | } 649 | } 650 | 651 | /** 652 | * check that the timestamp is new enough 653 | */ 654 | private function check_timestamp($timestamp) { 655 | if( ! $timestamp ) 656 | throw new OAuthException( 657 | 'Missing timestamp parameter. The parameter is required' 658 | ); 659 | 660 | // verify that timestamp is recentish 661 | $now = time(); 662 | if (abs($now - $timestamp) > $this->timestamp_threshold) { 663 | throw new OAuthException( 664 | "Expired timestamp, yours $timestamp, ours $now" 665 | ); 666 | } 667 | } 668 | 669 | /** 670 | * check that the nonce is not repeated 671 | */ 672 | private function check_nonce($consumer, $token, $nonce, $timestamp) { 673 | if( ! $nonce ) 674 | throw new OAuthException( 675 | 'Missing nonce parameter. The parameter is required' 676 | ); 677 | 678 | // verify that the nonce is uniqueish 679 | $found = $this->data_store->lookup_nonce( 680 | $consumer, 681 | $token, 682 | $nonce, 683 | $timestamp 684 | ); 685 | if ($found) { 686 | throw new OAuthException("Nonce already used: $nonce"); 687 | } 688 | } 689 | 690 | } 691 | 692 | class OAuthDataStore { 693 | function lookup_consumer($consumer_key) { 694 | // implement me 695 | } 696 | 697 | function lookup_token($consumer, $token_type, $token) { 698 | // implement me 699 | } 700 | 701 | function lookup_nonce($consumer, $token, $nonce, $timestamp) { 702 | // implement me 703 | } 704 | 705 | function new_request_token($consumer, $callback = null) { 706 | // return a new token attached to this consumer 707 | } 708 | 709 | function new_access_token($token, $consumer, $verifier = null) { 710 | // return a new access token attached to this consumer 711 | // for the user associated with this token if the request token 712 | // is authorized 713 | // should also invalidate the request token 714 | } 715 | 716 | } 717 | 718 | class OAuthUtil { 719 | public static function urlencode_rfc3986($input) { 720 | if (is_array($input)) { 721 | return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input); 722 | } else if (is_scalar($input)) { 723 | return str_replace( 724 | '+', 725 | ' ', 726 | str_replace('%7E', '~', rawurlencode($input)) 727 | ); 728 | } else { 729 | return ''; 730 | } 731 | } 732 | 733 | 734 | // This decode function isn't taking into consideration the above 735 | // modifications to the encoding process. However, this method doesn't 736 | // seem to be used anywhere so leaving it as is. 737 | public static function urldecode_rfc3986($string) { 738 | return urldecode($string); 739 | } 740 | 741 | // Utility function for turning the Authorization: header into 742 | // parameters, has to do some unescaping 743 | // Can filter out any non-oauth parameters if needed (default behaviour) 744 | public static function split_header($header, $only_allow_oauth_parameters = true) { 745 | $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/'; 746 | $offset = 0; 747 | $params = array(); 748 | while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { 749 | $match = $matches[0]; 750 | $header_name = $matches[2][0]; 751 | $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0]; 752 | if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) { 753 | $params[$header_name] = OAuthUtil::urldecode_rfc3986($header_content); 754 | } 755 | $offset = $match[1] + strlen($match[0]); 756 | } 757 | 758 | if (isset($params['realm'])) { 759 | unset($params['realm']); 760 | } 761 | 762 | return $params; 763 | } 764 | 765 | // helper to try to sort out headers for people who aren't running apache 766 | public static function get_headers() { 767 | if (function_exists('apache_request_headers')) { 768 | // we need this to get the actual Authorization: header 769 | // because apache tends to tell us it doesn't exist 770 | $headers = apache_request_headers(); 771 | 772 | // sanitize the output of apache_request_headers because 773 | // we always want the keys to be Cased-Like-This and arh() 774 | // returns the headers in the same case as they are in the 775 | // request 776 | $out = array(); 777 | foreach( $headers AS $key => $value ) { 778 | $key = str_replace( 779 | " ", 780 | "-", 781 | ucwords(strtolower(str_replace("-", " ", $key))) 782 | ); 783 | $out[$key] = $value; 784 | } 785 | } else { 786 | // otherwise we don't have apache and are just going to have to hope 787 | // that $_SERVER actually contains what we need 788 | $out = array(); 789 | if( isset($_SERVER['CONTENT_TYPE']) ) 790 | $out['Content-Type'] = $_SERVER['CONTENT_TYPE']; 791 | if( isset($_ENV['CONTENT_TYPE']) ) 792 | $out['Content-Type'] = $_ENV['CONTENT_TYPE']; 793 | 794 | foreach ($_SERVER as $key => $value) { 795 | if (substr($key, 0, 5) == "HTTP_") { 796 | // this is chaos, basically it is just there to capitalize the first 797 | // letter of every word that is not an initial HTTP and strip HTTP 798 | // code from przemek 799 | $key = str_replace( 800 | " ", 801 | "-", 802 | ucwords(strtolower(str_replace("_", " ", substr($key, 5)))) 803 | ); 804 | $out[$key] = $value; 805 | } 806 | } 807 | } 808 | return $out; 809 | } 810 | 811 | // This function takes a input like a=b&a=c&d=e and returns the parsed 812 | // parameters like this 813 | // array('a' => array('b','c'), 'd' => 'e') 814 | public static function parse_parameters( $input ) { 815 | if (!isset($input) || !$input) return array(); 816 | 817 | $pairs = explode('&', $input); 818 | 819 | $parsed_parameters = array(); 820 | foreach ($pairs as $pair) { 821 | $split = explode('=', $pair, 2); 822 | $parameter = OAuthUtil::urldecode_rfc3986($split[0]); 823 | $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : ''; 824 | 825 | if (isset($parsed_parameters[$parameter])) { 826 | // We have already recieved parameter(s) with this name, so add to the list 827 | // of parameters with this name 828 | 829 | if (is_scalar($parsed_parameters[$parameter])) { 830 | // This is the first duplicate, so transform scalar (string) into an array 831 | // so we can add the duplicates 832 | $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]); 833 | } 834 | 835 | $parsed_parameters[$parameter][] = $value; 836 | } else { 837 | $parsed_parameters[$parameter] = $value; 838 | } 839 | } 840 | return $parsed_parameters; 841 | } 842 | 843 | public static function build_http_query($params) { 844 | if (!$params) return ''; 845 | 846 | // Urlencode both keys and values 847 | $keys = OAuthUtil::urlencode_rfc3986(array_keys($params)); 848 | $values = OAuthUtil::urlencode_rfc3986(array_values($params)); 849 | $params = array_combine($keys, $values); 850 | 851 | // Parameters are sorted by name, using lexicographical byte value ordering. 852 | // Ref: Spec: 9.1.1 (1) 853 | uksort($params, 'strcmp'); 854 | 855 | $pairs = array(); 856 | foreach ($params as $parameter => $value) { 857 | if (is_array($value)) { 858 | // If two or more parameters share the same name, they are sorted by their value 859 | // Ref: Spec: 9.1.1 (1) 860 | natsort($value); 861 | foreach ($value as $duplicate_value) { 862 | $pairs[] = $parameter . '=' . $duplicate_value; 863 | } 864 | } else { 865 | $pairs[] = $parameter . '=' . $value; 866 | } 867 | } 868 | // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61) 869 | // Each name-value pair is separated by an '&' character (ASCII code 38) 870 | return implode('&', $pairs); 871 | } 872 | } 873 | -------------------------------------------------------------------------------- /media/site/arcgislinkv3/arcgislink_compiled.js: -------------------------------------------------------------------------------- 1 | /* 2 | http://google-maps-utility-library-v3.googlecode.com 3 | */ 4 | (function(){function q(a,b,c){var d=b===""?0:a.indexOf(b);c=c===""?a.length:a.indexOf(c,d+b.length);return a.substring(d+b.length,c)}function H(a){return a&&typeof a==="string"}function r(a){return a&&a.splice}function l(a,b,c){if(a&&b){var d;for(d in a)if(c||!(d in b))b[d]=a[d]}return b}function y(){i.event.trigger.apply(this,arguments)}function v(a,b){a&&b&&b.error&&a(b.error)}function ca(a,b){var c="";if(a)c+=a.getTime()-a.getTimezoneOffset()*6E4;if(b)c+=", "+(b.getTime()-b.getTimezoneOffset()* 5 | 6E4);return c}function I(a,b){b=Math.min(Math.max(b,0),1);if(a){var c=a.style;if(typeof c.opacity!=="undefined")c.opacity=b;if(typeof c.filters!=="undefined")c.filters.alpha.opacity=Math.floor(100*b);if(typeof c.filter!=="undefined")c.filter="alpha(opacity:"+Math.floor(b*100)+")"}}function U(a){var b="";for(var c in a)if(a.hasOwnProperty(c)){if(b.length>0)b+=";";b+=c+":"+a[c]}return b}function ma(){if(typeof XMLHttpRequest==="undefined"){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(c){}throw new Error("This browser does not support XMLHttpRequest."); 6 | }else return new XMLHttpRequest}function S(a){var b=a;if(r(a)&&a.length>0)b=a[0];if(b instanceof i.LatLng||b instanceof i.Marker)return r(a)&&a.length>1?s.MULTIPOINT:s.POINT;else if(b instanceof i.Polyline)return s.POLYLINE;else if(b instanceof i.Polygon)return s.POLYGON;else if(b instanceof i.LatLngBounds)return s.ENVELOPE;else if(b.x!==undefined&&b.y!==undefined)return s.POINT;else if(b.points)return s.MULTIPOINT;else if(b.paths)return s.POLYLINE;else if(b.rings)return s.POLYGON;return null}function V(a){var b= 7 | a;if(r(a)&&a.length>0)b=a[0];if(r(b)&&b.length>0)b=b[0];if(b instanceof i.LatLng||b instanceof i.Marker||b instanceof i.Polyline||b instanceof i.Polygon||b instanceof i.LatLngBounds)return true;return false}function N(a){if(!a)return null;return typeof a==="number"?a:a.wkid?a.wkid:a.toJSON()}function da(a,b){for(var c=[],d,e=0,f=a.getLength();e0&&c.push("["+a.getAt(0).lng()+","+a.getAt(0).lat()+"]");return c.join(",")}function J(a){var b, 8 | c,d,e="{";switch(S(a)){case s.POINT:b=r(a)?a[0]:a;if(b instanceof i.Marker)b=b.getPosition();e+="x:"+b.lng()+",y:"+b.lat();break;case s.MULTIPOINT:d=[];for(c=0;c0)b+=", ";b+=c+":"+X(a[c])}return"{"+b+"}"}return a.toString()}function ga(a){var b,c,d,e=[];b=0;for(c=a.length;b< 13 | c;b++){d=a[b];if(d instanceof i.Marker)d=d.getPosition();e.push({geometry:{x:d.lng(),y:d.lat(),spatialReference:{wkid:4326}}})}return{type:'"features"',features:e,doNotLocateOnRestrictedElements:false}}function ha(a){var b={};if(!a)return null;var c=[],d,e;if(a.geometries&&a.geometries.length>0){d=a.geometries[0];e=V(d);for(var f=0,g=a.geometries.length;f0?"&":"")+(c+"="+(escape?escape(d):encodeURIComponent(d)))}}return b}function oa(a,b){for(var c=[],d=2,e=arguments.length;d")}}function o(a, 17 | b,c,d){var e="ags_jsonp_"+pa++ +"_"+Math.floor(Math.random()*1E6),f=null;b=b||{};b[c||"callback"]="ags_jsonp."+e;b=ia(b);var g=document.getElementsByTagName("head")[0];if(!g)throw new Error("document must have header tag");window.ags_jsonp[e]=function(){window.ags_jsonp[e]&&delete window.ags_jsonp[e];f&&g.removeChild(f);f=null;d.apply(null,arguments);y(z,"jsonpend",e)};if((b+a).length<2E3&&!O.alwaysUseProxy){f=document.createElement("script");f.src=a+(a.indexOf("?")===-1?"?":"&")+b;f.id=e;g.appendChild(f)}else{c= 18 | window.location;c=c.protocol+"//"+c.hostname+(!c.port||c.port===80?"":":"+c.port+"/");var h=true;if(a.toLowerCase().indexOf(c.toLowerCase())!==-1)h=false;if(O.alwaysUseProxy)h=true;if(h&&!O.proxyUrl)throw new Error("No proxyUrl property in Config is defined");var j=ma();j.onreadystatechange=function(){if(j.readyState===4)if(j.status===200)eval(j.responseText);else throw new Error("Error code "+j.status);};j.open("POST",h?O.proxyUrl+"?"+a:a,true);j.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 19 | j.send(b)}y(z,"jsonpstart",e);return e}function m(a){a=a||{};this.wkid=a.wkid;this.wkt=a.wkt}function T(a){a=a||{};m.call(this,a)}function w(a){a=a||{};m.call(this,a);var b=a.inverse_flattening,c=a.standard_parallel_1*k,d=a.standard_parallel_2*k,e=a.latitude_of_origin*k;this.a_=a.semi_major/a.unit;this.lamda0_=a.central_meridian*k;this.FE_=a.false_easting;this.FN_=a.false_northing;a=1/b;b=2*a-a*a;this.e_=Math.sqrt(b);a=this.calc_m_(c,b);b=this.calc_m_(d,b);e=this.calc_t_(e,this.e_);c=this.calc_t_(c, 20 | this.e_);d=this.calc_t_(d,this.e_);this.n_=Math.log(a/b)/Math.log(c/d);this.F_=a/(this.n_*Math.pow(c,this.n_));this.rho0_=this.calc_rho_(this.a_,this.F_,e,this.n_)}function E(a){a=a||{};m.call(this,a);this.a_=a.semi_major/a.unit;var b=a.inverse_flattening;this.k0_=a.scale_factor;var c=a.latitude_of_origin*k;this.lamda0_=a.central_meridian*k;this.FE_=a.false_easting;this.FN_=a.false_northing;a=1/b;this.es_=2*a-a*a;this.ep4_=this.es_*this.es_;this.ep6_=this.ep4_*this.es_;this.eas_=this.es_/(1-this.es_); 21 | this.M0_=this.calc_m_(c,this.a_,this.es_,this.ep4_,this.ep6_)}function F(a){a=a||{};m.call(this,a);this.a_=(a.semi_major||6378137)/(a.unit||1);this.lamda0_=(a.central_meridian||0)*k}function x(a){a=a||{};m.call(this,a);var b=a.inverse_flattening,c=a.standard_parallel_1*k,d=a.standard_parallel_2*k,e=a.latitude_of_origin*k;this.a_=a.semi_major/a.unit;this.lamda0_=a.central_meridian*k;this.FE_=a.false_easting;this.FN_=a.false_northing;a=1/b;b=2*a-a*a;this.e_=Math.sqrt(b);a=this.calc_m_(c,b);b=this.calc_m_(d, 22 | b);c=this.calc_q_(c,this.e_);d=this.calc_q_(d,this.e_);e=this.calc_q_(e,this.e_);this.n_=(a*a-b*b)/(d-c);this.C_=a*a+this.n_*c;this.rho0_=this.calc_rho_(this.a_,this.C_,this.n_,e)}function G(a){this.url=a;this.definition=null}function n(a,b){this.url=a;this.loaded_=false;var c=a.split("/");this.name=c[c.length-2].replace(/_/g," ");b=b||{};if(b.delayLoad){var d=this;window.setTimeout(function(){d.loadServiceInfo()},b.delayLoad*1E3)}else this.loadServiceInfo()}function P(a){this.url=a;this.loaded_= 23 | false;var b=this;o(a,{},"",function(c){b.init_(c)})}function Z(a){this.url=a;this.t="geocodeservice"}function ja(a){this.url=a;this.loaded_=false;var b=this;o(a,{},"",function(c){l(c,b);b.loaded_=true;y(b,"load")})}function ka(a){this.url=a}function t(a){this.lods_=a?a.lods:null;this.spatialReference_=a?B[a.spatialReference.wkid||a.spatialReference.wkt]:Q;if(!this.spatialReference_)throw new Error("unsupported Spatial Reference");this.resolution0_=a?a.lods[0].resolution:156543.033928;this.minZoom= 24 | Math.floor(Math.log(this.spatialReference_.getCircum()/this.resolution0_/256)/Math.LN2+0.5);this.maxZoom=a?this.minZoom+this.lods_.length-1:20;if(i.Size)this.tileSize_=a?new i.Size(a.cols,a.rows):new i.Size(256,256);this.scale_=Math.pow(2,this.minZoom)*this.resolution0_;this.originX_=a?a.origin.x:-2.0037508342787E7;this.originY_=a?a.origin.y:2.0037508342787E7;if(a)for(var b,c=0;c2.001||b<1.999)throw new Error("This type of map cache is not supported in V3. \nScale ratio between zoom levels must be 2"); 25 | }}function A(a,b){b=b||{};if(b.opacity){this.opacity_=b.opacity;delete b.opacity}l(b,this);this.mapService_=a instanceof n?a:new n(a);if(b.hosts){var c=q(this.mapService_.url,"","://"),d=q(this.mapService_.url,"://","/");d=q(this.mapService_.url,c+"://"+d,"");this.urlTemplate_=c+"://"+b.hosts+d;this.numOfHosts_=parseInt(q(b.hosts,"[","]"),10)}this.name=b.name||this.mapService_.name;this.maxZoom=b.maxZoom||19;this.minZoom=b.minZoom||0;this.dynaZoom=b.dynaZoom||this.maxZoom;if(this.mapService_.loaded_)this.init_(b); 26 | else{var e=this;i.event.addListenerOnce(this.mapService_,"load",function(){e.init_(b)})}this.tiles_={};this.map_=b.map}function u(a,b){b=b||{};var c;if(b.opacity){this.opacity_=b.opacity;delete b.opacity}l(b,this);var d=a;if(H(a))d=[new A(a,b)];else if(a instanceof n)d=[new A(a,b)];else if(a instanceof A)d=[a];else if(a.length>0&&H(a[0])){d=[];for(c=0;c1.0E-9&&d<10;){d++;c=e;e=this.calc_phi_(a,b,c)}return e};w.prototype.forward=function(a){var b= 31 | a[0]*k;a=this.calc_rho_(this.a_,this.F_,this.calc_t_(a[1]*k,this.e_),this.n_);b=this.n_*(b-this.lamda0_);return[this.FE_+a*Math.sin(b),this.FN_+this.rho0_-a*Math.cos(b)]};w.prototype.inverse=function(a){var b=a[0]-this.FE_,c=a[1]-this.FN_;a=Math.atan(b/(this.rho0_-c));b=Math.pow((this.n_>0?1:-1)*Math.sqrt(b*b+(this.rho0_-c)*(this.rho0_-c))/(this.a_*this.F_),1/this.n_);b=this.solve_phi_(b,this.e_,Math.PI/2-2*Math.atan(b));return[(a/this.n_+this.lamda0_)/k,b/k]};w.prototype.getCircum=function(){return Math.PI* 32 | 2*this.a_};E.prototype=new m;E.prototype.calc_m_=function(a,b,c,d,e){return b*((1-c/4-3*d/64-5*e/256)*a-(3*c/8+3*d/32+45*e/1024)*Math.sin(2*a)+(15*d/256+45*e/1024)*Math.sin(4*a)-35*e/3072*Math.sin(6*a))};E.prototype.forward=function(a){var b=a[1]*k,c=a[0]*k;a=this.a_/Math.sqrt(1-this.es_*Math.pow(Math.sin(b),2));var d=Math.pow(Math.tan(b),2),e=this.eas_*Math.pow(Math.cos(b),2);c=(c-this.lamda0_)*Math.cos(b);var f=this.calc_m_(b,this.a_,this.es_,this.ep4_,this.ep6_);return[this.FE_+this.k0_*a*(c+(1- 33 | d+e)*Math.pow(c,3)/6+(5-18*d+d*d+72*e-58*this.eas_)*Math.pow(c,5)/120),this.FN_+this.k0_*(f-this.M0_)+a*Math.tan(b)*(c*c/2+(5-d+9*e+4*e*e)*Math.pow(c,4)/120+(61-58*d+d*d+600*e-330*this.eas_)*Math.pow(c,6)/720)]};E.prototype.inverse=function(a){var b=a[0],c=a[1];a=(1-Math.sqrt(1-this.es_))/(1+Math.sqrt(1-this.es_));c=(this.M0_+(c-this.FN_)/this.k0_)/(this.a_*(1-this.es_/4-3*this.ep4_/64-5*this.ep6_/256));a=c+(3*a/2-27*Math.pow(a,3)/32)*Math.sin(2*c)+(21*a*a/16-55*Math.pow(a,4)/32)*Math.sin(4*c)+151* 34 | Math.pow(a,3)/6*Math.sin(6*c)+1097*Math.pow(a,4)/512*Math.sin(8*c);c=this.eas_*Math.pow(Math.cos(a),2);var d=Math.pow(Math.tan(a),2),e=this.a_/Math.sqrt(1-this.es_*Math.pow(Math.sin(a),2)),f=this.a_*(1-this.es_)/Math.pow(1-this.es_*Math.pow(Math.sin(a),2),1.5);b=(b-this.FE_)/(e*this.k0_);e=a-e*Math.tan(a)/f*(b*b/2-(5+3*d+10*c-4*c*c-9*this.eas_)*Math.pow(b,4)/24+(61+90*d+28*c+45*d*d-252*this.eas_-3*c*c)*Math.pow(b,6)/720);return[(this.lamda0_+(b-(1+2*d+c)*Math.pow(b,3)/6+(5-2*c+28*d-3*c*c+8*this.eas_+ 35 | 24*d*d)*Math.pow(b,5)/120)/Math.cos(a))/k,e/k]};E.prototype.getCircum=function(){return Math.PI*2*this.a_};F.prototype=new m;F.prototype.forward=function(a){var b=a[1]*k;return[this.a_*(a[0]*k-this.lamda0_),this.a_/2*Math.log((1+Math.sin(b))/(1-Math.sin(b)))]};F.prototype.inverse=function(a){return[(a[0]/this.a_+this.lamda0_)/k,(Math.PI/2-2*Math.atan(Math.exp(-a[1]/this.a_)))/k]};F.prototype.getCircum=function(){return Math.PI*2*this.a_};x.prototype=new m;x.prototype.calc_m_=function(a,b){var c=Math.sin(a); 36 | return Math.cos(a)/Math.sqrt(1-b*c*c)};x.prototype.calc_q_=function(a,b){var c=b*Math.sin(a);return(1-b*b)*(Math.sin(a)/(1-c*c)-1/(2*b)*Math.log((1-c)/(1+c)))};x.prototype.calc_rho_=function(a,b,c,d){return a*Math.sqrt(b-c*d)/c};x.prototype.calc_phi_=function(a,b,c){var d=b*Math.sin(c);return c+(1-d*d)*(1-d*d)/(2*Math.cos(c))*(a/(1-b*b)-Math.sin(c)/(1-d*d)+Math.log((1-d)/(1+d))/(2*b))};x.prototype.solve_phi_=function(a,b,c){var d=0;c=c;for(var e=this.calc_phi_(a,b,c);Math.abs(e-c)>1.0E-8&&d<10;){d++; 37 | c=e;e=this.calc_phi_(a,b,c)}return e};x.prototype.forward=function(a){var b=a[0]*k;a=this.calc_rho_(this.a_,this.C_,this.n_,this.calc_q_(a[1]*k,this.e_));b=this.n_*(b-this.lamda0_);return[this.FE_+a*Math.sin(b),this.FN_+this.rho0_-a*Math.cos(b)]};x.prototype.inverse=function(a){var b=a[0]-this.FE_,c=a[1]-this.FN_;a=Math.sqrt(b*b+(this.rho0_-c)*(this.rho0_-c));var d=this.n_>0?1:-1;b=Math.atan(d*b/(d*this.rho0_-d*c));a=(this.C_-a*a*this.n_*this.n_/(this.a_*this.a_))/this.n_;a=this.solve_phi_(a,this.e_, 38 | Math.asin(a/2));return[(b/this.n_+this.lamda0_)/k,a/k]};x.prototype.getCircum=function(){return Math.PI*2*this.a_};x.prototype.getCircum=function(){return Math.PI*2*this.a_};K=new T({wkid:4326});aa=new T({wkid:4269});Q=new F({wkid:102113,semi_major:6378137,central_meridian:0,unit:1});ba=new F({wkid:102100,semi_major:6378137,central_meridian:0,unit:1});B={"4326":K,"4269":aa,"102113":Q,"102100":ba};m.WGS84=K;m.NAD83=aa;m.WEB_MERCATOR=Q;m.WEB_MERCATOR_AUX=ba;z.registerSR=function(a,b){var c=B[""+a]; 39 | if(c)return c;if(b instanceof m)c=B[""+a]=b;else{c=b||a;var d={wkt:a};if(a===parseInt(a,10))d={wkid:a};var e=q(c,'PROJECTION["','"]'),f=q(c,"SPHEROID[","]").split(",");if(e!==""){d.unit=parseFloat(q(q(c,"PROJECTION",""),"UNIT[","]").split(",")[1]);d.semi_major=parseFloat(f[1]);d.inverse_flattening=parseFloat(f[2]);d.latitude_of_origin=parseFloat(q(c,'"Latitude_Of_Origin",',"]"));d.central_meridian=parseFloat(q(c,'"Central_Meridian",',"]"));d.false_easting=parseFloat(q(c,'"False_Easting",',"]"));d.false_northing= 40 | parseFloat(q(c,'"False_Northing",',"]"))}switch(e){case "":c=new m(d);break;case "Lambert_Conformal_Conic":d.standard_parallel_1=parseFloat(q(c,'"Standard_Parallel_1",',"]"));d.standard_parallel_2=parseFloat(q(c,'"Standard_Parallel_2",',"]"));c=new w(d);break;case "Transverse_Mercator":d.scale_factor=parseFloat(q(c,'"Scale_Factor",',"]"));c=new E(d);break;case "Albers":d.standard_parallel_1=parseFloat(q(c,'"Standard_Parallel_1",',"]"));d.standard_parallel_2=parseFloat(q(c,'"Standard_Parallel_2",', 41 | "]"));c=new x(d);break;default:throw new Error(e+" not supported");}if(c)B[""+a]=c}return c};G.prototype.load=function(){var a=this;this.loaded_||o(this.url,{},"",function(b){l(b,a);a.loaded_=true;y(a,"load")})};G.prototype.isInScale=function(a){if(this.maxScale&&this.maxScale>a)return false;if(this.minScale&&this.minScale0||b.visible===true&&a.push(b.id)}}return a};n.prototype.getInitialBounds=function(){if(this.initialExtent)return this.initBounds_=this.initBounds_||W(this.initialExtent);return null};n.prototype.getFullBounds=function(){if(this.fullExtent)return this.fullBounds_=this.fullBounds_||W(this.fullExtent);return null};n.prototype.exportMap=function(a,b,c){if(a&&a.bounds){var d={};d.f=a.f; 48 | var e=a.bounds;d.bbox=""+e.getSouthWest().lng()+","+e.getSouthWest().lat()+","+e.getNorthEast().lng()+","+e.getNorthEast().lat();d.size=""+a.width+","+a.height;d.dpi=a.dpi;if(a.imageSR)d.imageSR=a.imageSR.wkid?a.imageSR.wkid:"{wkt:"+a.imageSR.wkt+"}";d.bboxSR="4326";d.format=a.format;e=a.layerDefinitions;if(e===undefined)e=this.getLayerDefs_();d.layerDefs=U(e);e=a.layerIds;var f=a.layerOption||"show";if(e===undefined)e=this.getVisibleLayerIds_();if(e.length>0)d.layers=f+":"+e.join(",");else if(this.loaded_&& 49 | b){b({href:null});return}d.transparent=a.transparent===false?false:true;if(a.time)d.time=ca(a.time,a.endTime);d.layerTimeOptions=a.layerTimeOptions;if(d.f==="image")return this.url+"/export?"+ia(d);else o(this.url+"/export",d,"",function(g){if(g.extent){g.bounds=W(g.extent);delete g.extent;b(g)}else v(c,g.error)})}};n.prototype.identify=function(a,b,c){if(a){var d={};d.geometry=J(a.geometry);d.geometryType=S(a.geometry);d.mapExtent=J(a.bounds);d.tolerance=a.tolerance||2;d.sr=4326;d.imageDisplay=""+ 50 | a.width+","+a.height+","+(a.dpi||96);d.layers=a.layerOption||"all";if(a.layerIds)d.layers+=":"+a.layerIds.join(",");if(a.layerDefs)d.layerDefs=U(a.layerDefs);d.maxAllowableOffset=a.maxAllowableOffset;d.returnGeometry=a.returnGeometry===false?false:true;o(this.url+"/identify",d,"",function(e){var f,g,h;if(e.results)for(f=0;f0)d.barriers=ga(a.barriers);else delete d.barriers;d.returnRoutes=a.returnRoutes===false? 57 | false:true;d.returnDirections=a.returnDirections===true?true:false;d.returnBarriers=a.returnBarriers===true?true:false;d.returnStops=a.returnStops===true?true:false;o(this.url+"/solve",d,"",function(e){e.routes&&fa(e.routes.features,a.overlayOptions);b(e);v(c,e)})}};t.prototype.fromLatLngToPoint=function(a,b){if(!a||isNaN(a.lat())||isNaN(a.lng()))return null;var c=this.spatialReference_.forward([a.lng(),a.lat()]),d=b||new i.Point(0,0);d.x=(c[0]-this.originX_)/this.scale_;d.y=(this.originY_-c[1])/ 58 | this.scale_;return d};t.prototype.fromLatLngToPoint=t.prototype.fromLatLngToPoint;t.prototype.fromPointToLatLng=function(a){if(a===null)return null;a=this.spatialReference_.inverse([a.x*this.scale_+this.originX_,this.originY_-a.y*this.scale_]);return new i.LatLng(a[1],a[0])};t.prototype.getScale=function(a){a=a-this.minZoom;var b=0;if(this.lods_[a])b=this.lods_[a].scale;return b};t.WEB_MECATOR=new t;A.prototype.init_=function(a){if(this.mapService_.tileInfo){this.projection_=new t(this.mapService_.tileInfo); 59 | this.minZoom=a.minZoom||this.projection_.minZoom;this.maxZoom=a.maxZoom||this.projection_.maxZoom}};A.prototype.getTileUrl=function(a,b){var c=b-(this.projection_?this.projection_.minZoom:this.minZoom),d="";if(!isNaN(a.x)&&!isNaN(a.y)&&c>=0&&a.x>=0&&a.y>=0){var e=this.mapService_.url;if(this.urlTemplate_)e=this.urlTemplate_.replace("["+this.numOfHosts_+"]",""+(a.y+a.x)%this.numOfHosts_);d=this.projection_||(this.map_?this.map_.getProjection():t.WEB_MECATOR);if(!d instanceof t)d=t.WEB_MECATOR;var f= 60 | d.tileSize_,g=1<this.dynaZoom){c={f:"image"};c.bounds=h;c.format="png32";c.width=f.width;c.height=f.height;c.imageSR=d.spatialReference_;d=this.mapService_.exportMap(c)}else d=g&&!g.intersects(h)?"":e+"/tile/"+c+"/"+a.y+"/"+a.x}return d};A.prototype.setOpacity= 61 | function(a){this.opacity_=a;var b=this.tiles_;for(var c in b)b.hasOwnProperty(c)&&I(b[c],a)};A.prototype.getOpacity=function(){return this.opacity_};A.prototype.getMapService=function(){return this.mapService_};u.prototype.getTile=function(a,b,c){for(var d=c.createElement("div"),e="_"+a.x+"_"+a.y+"_"+b,f=0;f=g.minZoom){var h=g.getTileUrl(a,b);if(h){var j=c.createElement(document.all?"img":"div");j.style.border="0px none";j.style.margin= 62 | "0px";j.style.padding="0px";j.style.overflow="hidden";j.style.position="absolute";j.style.top="0px";j.style.left="0px";j.style.width=""+this.tileSize.width+"px";j.style.height=""+this.tileSize.height+"px";if(document.all)j.src=h;else j.style.backgroundImage="url("+h+")";d.appendChild(j);g.tiles_[e]=j;if(g.opacity_!==undefined)I(j,g.opacity_);else this.opacity_!==undefined&&I(j,this.opacity_)}}}this.tiles_[e]=d;d.setAttribute("tid",e);return d};u.prototype.getTile=u.prototype.getTile;u.prototype.releaseTile= 63 | function(a){if(a.getAttribute("tid")){a=a.getAttribute("tid");this.tiles_[a]&&delete this.tiles_[a];for(var b=0;bthis.maxZoom)return false;return true};p.prototype.show=function(){this.visible_=true;this.div_.style.visibility="visible";this.refresh()};p.prototype.hide=function(){this.visible_=false;this.div_.style.visibility="hidden"};R.prototype=new i.OverlayView;R.prototype.onAdd=function(){var a=document.createElement("DIV");a.style.border="none";a.style.borderWidth= 69 | "0px";a.style.position="absolute";a.style.backgroundImage="url("+this.url_+")";this.div_=a;var b=this.getPanes();I(a,this.op_);b.overlayLayer.appendChild(a)};R.prototype.draw=function(){var a=this.getProjection(),b=a.fromLatLngToDivPixel(this.bounds_.getSouthWest());a=a.fromLatLngToDivPixel(this.bounds_.getNorthEast());var c=this.div_;c.style.left=b.x+"px";c.style.top=a.y+"px";c.style.width=a.x-b.x+"px";c.style.height=b.y-a.y+"px"};R.prototype.onRemove=function(){this.div_.parentNode.removeChild(this.div_); 70 | this.div_=null};la.prototype.refresh=function(){M(this.map_)};$.ags={SpatialReference:m,Geographic:T,LambertConformalConic:w,SphereMercator:F,TransverseMercator:E,SpatialRelationship:{INTERSECTS:"esriSpatialRelIntersects",CONTAINS:"esriSpatialRelContains",CROSSES:"esriSpatialRelCrosses",ENVELOPE_INTERSECTS:"esriSpatialRelEnvelopeIntersects",INDEX_INTERSECTS:"esriSpatialRelIndexIntersects",OVERLAPS:"esriSpatialRelOverlaps",TOUCHES:"esriSpatialRelTouches",WITHIN:"esriSpatialRelWithin"},GeometryType:s, 71 | SRUnit:{METER:9001,FOOT:9002,SURVEY_FOOT:9003,SURVEY_MILE:9035,KILLOMETER:9036,RADIAN:9101,DEGREE:9102},Catalog:function(a){this.url=a;var b=this;o(a,{},"",function(c){l(c,b);y(b,"load")})},MapService:n,Layer:G,GeocodeService:P,GeometryService:Z,GPService:function(a){this.url=a;this.loaded_=false;var b=this;o(a,{},"",function(c){l(c,b);b.loaded_=true;y(b,"load")})},GPTask:ja,RouteTask:ka,Util:z,Config:O,Projection:t,TileLayer:A,MapOverlay:p,MapType:u,CopyrightControl:la};window.gmaps=$})(); 72 | --------------------------------------------------------------------------------