Google Maps Plugin by Intergeo - Version 1.0.2

Version Description

  • Fixed minZoom and maxZoom settings.
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 Google Maps Plugin by Intergeo
Version 1.0.2
Comparing to
See all releases

Code changes from version 1.0.1 to 1.0.2

css/editor.css CHANGED
@@ -1 +1,65 @@
1
- @font-face{font-family:'Elsie Swash Caps';font-style:normal;font-weight:900;src:local('Elsie Swash Caps Blacks'),local('ElsieSwashCapsBlack-Regular'),url(http://themes.googleusercontent.com/static/fonts/elsieswashcaps/v1/iZnus9qif0tR5pGaDv5zdEd2CPfIv3tbBh_qUxvoikM.woff) format('woff')}#intergeo_canvas_wrapper{position:absolute;top:0;right:300px;bottom:60px;left:0;z-index:75}#intergeo_canvas{width:100%;height:100%}#intergeo_canvas_center{width:10px;height:10px;position:absolute;top:50%;left:50%;margin:-5px 0 0 -5px;border-radius:2px;background-image:url(../images/map_center.png);background-position:center center;background-repeat:no-repeat}#intergeo_footer{height:36px;padding:12px 16px;position:absolute;z-index:100;left:0;right:0;bottom:0;border-top:1px solid #dfdfdf;overflow:hidden;-webkit-box-shadow:0 -4px 4px -4px rgba(0,0,0,0.1);box-shadow:0 -4px 4px -4px rgba(0,0,0,0.1);text-align:right}#intergeo_tlbr{position:absolute;top:0;right:0;bottom:60px;width:299px;z-index:75;background:whitesmoke;border-left:1px solid #dfdfdf;overflow:auto;-webkit-overflow-scrolling:touch}#intergeo_tlbr_ttl{font-family:'Elsie Swash Caps',cursive;font-size:34px;padding:30px 20px 10px;display:block}#intergeo_tlbr_ul{border-top:1px solid #dfdfdf}.intergeo_tlbr_ul_li{margin:0}.intergeo_tlbr_ul_li.open{border-bottom:1px solid #dfdfdf}.intergeo_tlbr_ul_li_h3{border-top:1px solid white;border-bottom:1px solid #dfdfdf;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:0;padding:10px 20px;font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:normal;text-shadow:0 1px 0 white;background:whiteSmoke;background-image:-webkit-gradient(linear,left bottom,left top,from(#EEE),to(whiteSmoke));background-image:-webkit-linear-gradient(bottom,#EEE,whiteSmoke);background-image:-moz-linear-gradient(bottom,#EEE,whiteSmoke);background-image:-o-linear-gradient(bottom,#EEE,whiteSmoke);background-image:-ms-linear-gradient(bottom,#EEE,whiteSmoke);background-image:linear-gradient(bottom,#EEE,whiteSmoke)}.intergeo_tlbr_ul_li_h3:hover,.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3{color:white;text-shadow:0 -1px 0 #333;background:gray;background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(gray));background-image:-webkit-linear-gradient(bottom,#6d6d6d,gray);background-image:-moz-linear-gradient(bottom,#6d6d6d,gray);background-image:-o-linear-gradient(bottom,#6d6d6d,gray);background-image:-ms-linear-gradient(bottom,#6d6d6d,gray);background-image:linear-gradient(bottom,#6d6d6d,gray)}.intergeo_tlbr_ul_li_h3::after{content:'';width:0;height:0;border-color:#CCC transparent;border-style:solid;border-width:6px 6px 0;position:absolute;top:15px;right:20px;z-index:1}.intergeo_tlbr_ul_li_h3:hover::after,.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3::after{border-color:#EEE transparent}.intergeo_tlbr_ul_li:hover .intergeo_tlbr_ul_li_h3{border-top-color:gray}.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3{border-top-color:#6d6d6d}.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3::after{border-width:0 6px 6px}.intergeo_tlbr_ul_li_ul{margin:0;display:none;background-color:#fdfdfd;padding:10px 0 20px 0;overflow:hidden}.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_ul{display:block}.intergeo_tlbr_cntrl_ttl{display:block;font-weight:bold;line-height:22px;position:relative;cursor:pointer;padding:4px 20px;margin-bottom:5px;background-color:rgba(0,0,0,0.02);border-top:1px solid #eee;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,0.1);box-shadow:0 4px 4px -4px rgba(0,0,0,0.1);border-bottom:1px solid #eee}.intergeo_tlbr_cntrl_ttl::after{content:'';width:0;height:0;border-color:#CCC transparent;border-style:solid;border-width:4px 4px 0;position:absolute;top:13px;right:20px;z-index:1}.intergeo_tlbr_cntrl_ttl.open::after{border-width:0 4px 4px}.intergeo_tlbr_cntrl_items{display:none;padding:5px 20px 10px 20px}.intergeo_tlbr_cntrl_more_info{text-decoration:none;color:#21759b;font-size:85%;font-weight:normal;float:right}.intergeo_tlbr_cntrl_dsc{display:none;padding:0}.intergeo_tlbr_cntrl_tbl{width:100%;margin-bottom:10px}.intergeo_tlbr_cntrl_tbl_clmn{width:50%;text-align:left;vertical-align:top;padding:0 1px}.intergeo_tlbr_cntrl_item{margin-bottom:10px}#intergeo_map_zoom_range{margin:10px 6px}.intergeo_tlbr_style_preview{display:block;width:220px;height:90px;padding:10px;background-image:url(../images/styles.jpg);background-repeat:no-repeat;background-position:top left;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.5);box-shadow:0 0 5px rgba(0,0,0,0.5)}#intergeo_tlbr_style_red{background-position:0 -110px}#intergeo_tlbr_style_night{background-position:0 -220px}#intergeo_tlbr_style_blue{background-position:0 -330px}#intergeo_tlbr_style_grayscale{background-position:0 -440px}#intergeo_tlbr_style_no_roads{background-position:0 -550px}#intergeo_tlbr_style_mixed{background-position:0 -660px}#intergeo_tlbr_style_chilled{background-position:0 -770px}.intergeo_tlbr_overlay{border-bottom:1px dotted black;margin-bottom:5px;padding-bottom:5px}.intergeo_tlbr_actn{float:right;margin:4px 0 0 10px;background-repeat:no-repeat;display:block;height:16px;width:16px;background-image:url('../images/ui-icons.png')}.intergeo_tlbr_actn_delete{background-position:-176px -96px}.intergeo_tlbr_actn_edit{background-position:-64px -112px}.intergeo_tlbr_clr_prvw{float:right;margin:4px 0 0 10px;height:16px;width:16px;-webkit-box-shadow:0 0 2px #aaa;box-shadow:0 0 2px #aaa}.intergeo_tlbr_cntrl_slct{width:100%}.intergeo_tlbr_cntrl_txt{width:100%}.intergeo_tlbr_grp_dsc{padding:5px 20px 10px 20px;margin:0}.intergeo_ppp{position:absolute;top:0;right:0;left:0;bottom:0;z-index:150;background-image:url('../images/bg.png');background-repeat:repeat;display:none}.intergeo_ppp_frm{position:absolute;top:10%;left:50%;max-height:530px;-ms-overflow-y:auto;overflow-y:auto;margin-left:-222px;width:400px;border:2px solid #555;background-color:white;-webkit-box-shadow:0 0 15px #555;box-shadow:0 0 15px #555;padding:10px 20px 15px;border-radius:3px}.intergeo_ppp_ttl{font-weight:bold;font-size:115%;color:#333;border-bottom:1px solid whitesmoke;display:block;padding:5px 0;margin-bottom:10px}.intergeo_ppp_cls{float:right;background-image:url('../images/ui-icons.png');background-repeat:no-repeat;background-position:-80px -128px;display:block;width:16px;height:16px}.intergeo_ppp_tbl{width:100%}.intergeo_ppp_tbl td{padding-bottom:5px}.intergeo_ppp_txt{width:100%}#intergeo_tlbr_drctn_icon{margin-top:1px;margin-left:-5px;float:left;display:block;width:16px;height:16px;background-repeat:no-repeat;background-image:url('../images/ui-icons.png');background-position:-16px -128px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face{font-family:'Elsie Swash Caps';font-style:normal;font-weight:900;src:local('Elsie Swash Caps Blacks'),local('ElsieSwashCapsBlack-Regular'),url(http://themes.googleusercontent.com/static/fonts/elsieswashcaps/v1/iZnus9qif0tR5pGaDv5zdEd2CPfIv3tbBh_qUxvoikM.woff) format('woff')}#intergeo_canvas_wrapper{position:absolute;top:0;right:300px;bottom:60px;left:0;z-index:75}#intergeo_canvas{width:100%;height:100%}#intergeo_canvas_center{width:10px;height:10px;position:absolute;top:50%;left:50%;margin:-5px 0 0 -5px;border-radius:2px;background-image:url(../images/map_center.png);background-position:center center;background-repeat:no-repeat}#intergeo_footer{height:36px;padding:12px 16px;position:absolute;z-index:100;left:0;right:0;bottom:0;border-top:1px solid #dfdfdf;overflow:hidden;-webkit-box-shadow:0 -4px 4px -4px rgba(0,0,0,0.1);box-shadow:0 -4px 4px -4px rgba(0,0,0,0.1);text-align:right}#intergeo_tlbr{position:absolute;top:0;right:0;bottom:60px;width:299px;z-index:75;background:whitesmoke;border-left:1px solid #dfdfdf;overflow:auto;-webkit-overflow-scrolling:touch}#intergeo_tlbr_ttl{font-family:'Elsie Swash Caps',cursive;font-size:34px;padding:30px 20px 10px;display:block}#intergeo_tlbr_ul{border-top:1px solid #dfdfdf}.intergeo_tlbr_ul_li{margin:0}.intergeo_tlbr_ul_li.open{border-bottom:1px solid #dfdfdf}.intergeo_tlbr_ul_li_h3{border-top:1px solid white;border-bottom:1px solid #dfdfdf;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:0;padding:10px 20px;font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:normal;text-shadow:0 1px 0 white;background:whiteSmoke;background-image:-webkit-gradient(linear,left bottom,left top,from(#EEE),to(whiteSmoke));background-image:-webkit-linear-gradient(bottom,#EEE,whiteSmoke);background-image:-moz-linear-gradient(bottom,#EEE,whiteSmoke);background-image:-o-linear-gradient(bottom,#EEE,whiteSmoke);background-image:-ms-linear-gradient(bottom,#EEE,whiteSmoke);background-image:linear-gradient(bottom,#EEE,whiteSmoke)}.intergeo_tlbr_ul_li_h3:hover,.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3{color:white;text-shadow:0 -1px 0 #333;background:gray;background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(gray));background-image:-webkit-linear-gradient(bottom,#6d6d6d,gray);background-image:-moz-linear-gradient(bottom,#6d6d6d,gray);background-image:-o-linear-gradient(bottom,#6d6d6d,gray);background-image:-ms-linear-gradient(bottom,#6d6d6d,gray);background-image:linear-gradient(bottom,#6d6d6d,gray)}.intergeo_tlbr_ul_li_h3::after{content:'';width:0;height:0;border-color:#CCC transparent;border-style:solid;border-width:6px 6px 0;position:absolute;top:15px;right:20px;z-index:1}.intergeo_tlbr_ul_li_h3:hover::after,.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3::after{border-color:#EEE transparent}.intergeo_tlbr_ul_li:hover .intergeo_tlbr_ul_li_h3{border-top-color:gray}.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3{border-top-color:#6d6d6d}.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_h3::after{border-width:0 6px 6px}.intergeo_tlbr_ul_li_ul{margin:0;display:none;background-color:#fdfdfd;padding:10px 0 20px 0;overflow:hidden}.intergeo_tlbr_ul_li.open .intergeo_tlbr_ul_li_ul{display:block}.intergeo_tlbr_cntrl_ttl{display:block;font-weight:bold;line-height:22px;position:relative;cursor:pointer;padding:4px 20px;margin-bottom:5px;background-color:rgba(0,0,0,0.02);border-top:1px solid #eee;-webkit-box-shadow:0 4px 4px -4px rgba(0,0,0,0.1);box-shadow:0 4px 4px -4px rgba(0,0,0,0.1);border-bottom:1px solid #eee}.intergeo_tlbr_cntrl_ttl::after{content:'';width:0;height:0;border-color:#CCC transparent;border-style:solid;border-width:4px 4px 0;position:absolute;top:13px;right:20px;z-index:1}.intergeo_tlbr_cntrl_ttl.open::after{border-width:0 4px 4px}.intergeo_tlbr_cntrl_items{display:none;padding:5px 20px 10px 20px}.intergeo_tlbr_cntrl_more_info{text-decoration:none;color:#21759b;font-size:85%;font-weight:normal;float:right}.intergeo_tlbr_cntrl_dsc{display:none;padding:0}.intergeo_tlbr_cntrl_tbl{width:100%;margin-bottom:10px}.intergeo_tlbr_cntrl_tbl_clmn{width:50%;text-align:left;vertical-align:top;padding:0 1px}.intergeo_tlbr_cntrl_item{margin-bottom:10px}#intergeo_map_zoom_range{margin:10px 6px}.intergeo_tlbr_style_preview{display:block;width:220px;height:90px;padding:10px;background-image:url(../images/styles.jpg);background-repeat:no-repeat;background-position:top left;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.5);box-shadow:0 0 5px rgba(0,0,0,0.5)}#intergeo_tlbr_style_red{background-position:0 -110px}#intergeo_tlbr_style_night{background-position:0 -220px}#intergeo_tlbr_style_blue{background-position:0 -330px}#intergeo_tlbr_style_grayscale{background-position:0 -440px}#intergeo_tlbr_style_no_roads{background-position:0 -550px}#intergeo_tlbr_style_mixed{background-position:0 -660px}#intergeo_tlbr_style_chilled{background-position:0 -770px}.intergeo_tlbr_overlay{border-bottom:1px dotted black;margin-bottom:5px;padding-bottom:5px}.intergeo_tlbr_actn{float:right;margin:4px 0 0 10px;background-repeat:no-repeat;display:block;height:16px;width:16px;background-image:url('../images/ui-icons.png')}.intergeo_tlbr_actn_delete{background-position:-176px -96px}.intergeo_tlbr_actn_edit{background-position:-64px -112px}.intergeo_tlbr_clr_prvw{float:right;margin:4px 0 0 10px;height:16px;width:16px;-webkit-box-shadow:0 0 2px #aaa;box-shadow:0 0 2px #aaa}.intergeo_tlbr_cntrl_slct{width:100%}.intergeo_tlbr_cntrl_txt{width:100%}.intergeo_tlbr_grp_dsc{padding:5px 20px 10px 20px;margin:0}.intergeo_ppp{position:absolute;top:0;right:0;left:0;bottom:0;z-index:150;background-image:url('../images/bg.png');background-repeat:repeat;display:none}.intergeo_ppp_frm{position:absolute;top:10%;left:50%;max-height:530px;-ms-overflow-y:auto;overflow-y:auto;margin-left:-222px;width:400px;border:2px solid #555;background-color:white;-webkit-box-shadow:0 0 15px #555;box-shadow:0 0 15px #555;padding:10px 20px 15px;border-radius:3px}.intergeo_ppp_ttl{font-weight:bold;font-size:115%;color:#333;border-bottom:1px solid whitesmoke;display:block;padding:5px 0;margin-bottom:10px}.intergeo_ppp_cls{float:right;background-image:url('../images/ui-icons.png');background-repeat:no-repeat;background-position:-80px -128px;display:block;width:16px;height:16px}.intergeo_ppp_tbl{width:100%}.intergeo_ppp_tbl td{padding-bottom:5px}.intergeo_ppp_txt{width:100%}#intergeo_tlbr_drctn_icon{margin-top:1px;margin-left:-5px;float:left;display:block;width:16px;height:16px;background-repeat:no-repeat;background-image:url('../images/ui-icons.png');background-position:-16px -128px}
2
+
3
+ .computer-btn{
4
+ color: #646464 !important;
5
+ border: medium none rgb(100, 100, 100) !important;
6
+ background: #E6E6E6 url("../images/computer.png") no-repeat scroll 7px 1px !important;
7
+ padding-left: 27px !important;
8
+ transition: all 0.3s ease 0s;
9
+ font-family: "Open Sans",sans-serif;
10
+ font-weight: 700;
11
+ border: 1px solid #B0B0B0 !important;
12
+ box-shadow: none !important;
13
+
14
+ }
15
+
16
+ .computer-btn:hover{
17
+ color: white !important;
18
+ background: #2f8cea url("../images/computer.png") no-repeat scroll 7px -36px !important;
19
+ transition: all 0.3s ease 0s;
20
+ padding-left: 27px !important;
21
+ -webkit-transition: all .3s ease;
22
+ -moz-transition: all .3s ease;
23
+ -ms-transition: all .3s ease;
24
+ -o-transition: all .3s ease;
25
+ transition: all .3s ease;
26
+ box-shadow: 0px 1px 0px rgba(171, 171, 171, 0.5) inset, 0px 1px 0px rgba(0, 0, 0, 0.15) !important;
27
+ border: 1px solid #2f8cea !important;
28
+ box-shadow: none !important;
29
+
30
+
31
+ }
32
+
33
+ .file-wrapper {
34
+ position: relative;
35
+ overflow: hidden;
36
+ }
37
+
38
+ .form-inline {
39
+ display: inline-block;
40
+ margin-bottom: 0;
41
+ vertical-align: middle;
42
+ }
43
+
44
+ #thehole {
45
+ position: absolute;
46
+ left: 0;
47
+ top: 0;
48
+ width: 1px;
49
+ height: 1px;
50
+ border: 0;
51
+ opacity: 0;
52
+ -moz-opacity: 0;
53
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
54
+ }
55
+
56
+ .file {
57
+ font-size: 200px;
58
+ position: absolute;
59
+ top: 0;
60
+ right: 0;
61
+ opacity: 0;
62
+ -moz-opacity: 0;
63
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
64
+ cursor: pointer;
65
+ }
index.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: Intergeo Maps - Google Maps Plugin
4
- Plugin URI: http://github.com/codeinwp/intergeo-maps/
5
  Description: A simple, easy and quite powerful Google Map tool to create, manage and embed custom Google Maps into your WordPress posts and pages. The plugin allows you to deeply customize look and feel of a map, add overlays like markers, rectangles, circles, polylines and polygons to your map. It could even be integraded with your Google Adsense account and show ad on your maps.
6
- Version: 1.0.1
7
  Author: Themeisle
8
  Author URI: http://themeisle.com
9
  License: GPL v2.0 or later
@@ -13,9 +13,18 @@ License URI: http://www.opensource.org/licenses/gpl-license.php
13
  // <editor-fold defaultstate="collapsed" desc="constants">
14
 
15
  define( 'INTERGEO_PLUGIN_NAME', 'intergeo' ); // don't change it whatever
16
- define( 'INTERGEO_VERSION', '1.0.1' );
17
  define( 'INTERGEO_ABSPATH', dirname( __FILE__ ) );
18
  define( 'INTERGEO_ABSURL', plugins_url( '/', __FILE__ ) );
 
 
 
 
 
 
 
 
 
19
 
20
  // </editor-fold>
21
 
@@ -219,6 +228,13 @@ function intergeo_map_popup_init() {
219
  wp_enqueue_style( 'wp-color-picker' );
220
  wp_enqueue_style( 'intergeo-editor', INTERGEO_ABSURL . 'css/editor.css', array(), INTERGEO_VERSION );
221
 
 
 
 
 
 
 
 
222
  wp_iframe( 'intergeo_iframe', $post_id, $map_id );
223
  }
224
 
@@ -413,7 +429,7 @@ function intergeo_filter_input() {
413
  $color_regexp = '/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/';
414
  $postion_filter = array( 'filter' => FILTER_CALLBACK, 'options' => 'intergeo_filter_position' );
415
 
416
- $options = filter_input_array( INPUT_POST, array (
417
  'lat' => array( 'filter' => FILTER_VALIDATE_FLOAT, 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'min_range' => -90, 'max_range' => 90, 'default' => 48.1366069 ) ),
418
  'lng' => array( 'filter' => FILTER_VALIDATE_FLOAT, 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'min_range' => -180, 'max_range' => 180, 'default' => 11.577085099999977 ) ),
419
  'zoom' => array( 'filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'min_range' => 0, 'max_range' => 19, 'default' => 5 ) ),
@@ -468,7 +484,7 @@ function intergeo_filter_input() {
468
  'overlays_rectangle' => array( 'filter' => FILTER_DEFAULT, 'flags' => FILTER_REQUIRE_ARRAY ),
469
  'overlays_circle' => array( 'filter' => FILTER_DEFAULT, 'flags' => FILTER_REQUIRE_ARRAY ),
470
  'directions' => array( 'filter' => FILTER_DEFAULT, 'flags' => FILTER_REQUIRE_ARRAY ),
471
- ) );
472
 
473
  $defaults = array (
474
  'lat' => 48.1366069,
@@ -527,6 +543,15 @@ function intergeo_filter_input() {
527
  'directions' => array(),
528
  );
529
 
 
 
 
 
 
 
 
 
 
530
  $results = array();
531
  foreach ( $options as $key => $value ) {
532
  if ( array_key_exists( $key, $defaults ) ) {
@@ -560,6 +585,13 @@ function intergeo_filter_input() {
560
  }
561
  }
562
 
 
 
 
 
 
 
 
563
  return $results;
564
  }
565
 
@@ -729,6 +761,7 @@ function intergeo_shortcode( $attrs, $address = '' ) {
729
  /* <![CDATA[ */
730
  if (!window.intergeo_maps) window.intergeo_maps = [];
731
  window.intergeo_maps.push( { container: \'intergeo_map%1$s\', options: %5$s } );
 
732
  /* ]]> */
733
  </script>
734
  ',
@@ -816,6 +849,14 @@ function intergeo_library() {
816
  wp_localize_script( 'intergeo-rendering', 'intergeo_options', array(
817
  'adsense' => array( 'publisher_id' => get_option( 'intergeo_adsense_publisher_id' ) )
818
  ) );
 
 
 
 
 
 
 
 
819
  }
820
 
821
  function intergeo_library_delete() {
1
  <?php
2
  /*
3
  Plugin Name: Intergeo Maps - Google Maps Plugin
4
+ Plugin URI: http://plugins.svn.wordpress.org/intergeo-maps/
5
  Description: A simple, easy and quite powerful Google Map tool to create, manage and embed custom Google Maps into your WordPress posts and pages. The plugin allows you to deeply customize look and feel of a map, add overlays like markers, rectangles, circles, polylines and polygons to your map. It could even be integraded with your Google Adsense account and show ad on your maps.
6
+ Version: 1.0.2
7
  Author: Themeisle
8
  Author URI: http://themeisle.com
9
  License: GPL v2.0 or later
13
  // <editor-fold defaultstate="collapsed" desc="constants">
14
 
15
  define( 'INTERGEO_PLUGIN_NAME', 'intergeo' ); // don't change it whatever
16
+ define( 'INTERGEO_VERSION', '1.0.2' );
17
  define( 'INTERGEO_ABSPATH', dirname( __FILE__ ) );
18
  define( 'INTERGEO_ABSURL', plugins_url( '/', __FILE__ ) );
19
+ // Added by Ash/Upwork
20
+ defined('WPLANG') || define( 'WPLANG', '' );
21
+ // Added by Ash/Upwork
22
+
23
+ // Added by Ash/Upwork
24
+ if ( class_exists( 'IntergeoMaps_Pro', false ) ){
25
+ define( 'IntergeoMaps_Pro', true);
26
+ }
27
+ // Added by Ash/Upwork
28
 
29
  // </editor-fold>
30
 
228
  wp_enqueue_style( 'wp-color-picker' );
229
  wp_enqueue_style( 'intergeo-editor', INTERGEO_ABSURL . 'css/editor.css', array(), INTERGEO_VERSION );
230
 
231
+ // Added by Ash/Upwork
232
+ if( defined( 'IntergeoMaps_Pro' ) ){
233
+ global $IntergeoMaps_Pro;
234
+ $IntergeoMaps_Pro->enqueueScriptsAndStyles(array('intergeo-editor'), array("mapID" => $map_id));
235
+ }
236
+ // Added by Ash/Upwork
237
+
238
  wp_iframe( 'intergeo_iframe', $post_id, $map_id );
239
  }
240
 
429
  $color_regexp = '/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/';
430
  $postion_filter = array( 'filter' => FILTER_CALLBACK, 'options' => 'intergeo_filter_position' );
431
 
432
+ $validationArray = array (
433
  'lat' => array( 'filter' => FILTER_VALIDATE_FLOAT, 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'min_range' => -90, 'max_range' => 90, 'default' => 48.1366069 ) ),
434
  'lng' => array( 'filter' => FILTER_VALIDATE_FLOAT, 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'min_range' => -180, 'max_range' => 180, 'default' => 11.577085099999977 ) ),
435
  'zoom' => array( 'filter' => FILTER_VALIDATE_INT, 'flags' => FILTER_REQUIRE_SCALAR, 'options' => array( 'min_range' => 0, 'max_range' => 19, 'default' => 5 ) ),
484
  'overlays_rectangle' => array( 'filter' => FILTER_DEFAULT, 'flags' => FILTER_REQUIRE_ARRAY ),
485
  'overlays_circle' => array( 'filter' => FILTER_DEFAULT, 'flags' => FILTER_REQUIRE_ARRAY ),
486
  'directions' => array( 'filter' => FILTER_DEFAULT, 'flags' => FILTER_REQUIRE_ARRAY ),
487
+ );
488
 
489
  $defaults = array (
490
  'lat' => 48.1366069,
543
  'directions' => array(),
544
  );
545
 
546
+ // Added by Ash/Upwork
547
+ if( defined( 'IntergeoMaps_Pro' ) ){
548
+ global $IntergeoMaps_Pro;
549
+ $IntergeoMaps_Pro->addValidations($validationArray, $defaults);
550
+ }
551
+ // Added by Ash/Upwork
552
+
553
+ $options = filter_input_array( INPUT_POST, $validationArray );
554
+
555
  $results = array();
556
  foreach ( $options as $key => $value ) {
557
  if ( array_key_exists( $key, $defaults ) ) {
585
  }
586
  }
587
 
588
+ // Added by Ash/Upwork
589
+ if( defined( 'IntergeoMaps_Pro' ) ){
590
+ global $IntergeoMaps_Pro;
591
+ $IntergeoMaps_Pro->processResults($results);
592
+ }
593
+ // Added by Ash/Upwork
594
+
595
  return $results;
596
  }
597
 
761
  /* <![CDATA[ */
762
  if (!window.intergeo_maps) window.intergeo_maps = [];
763
  window.intergeo_maps.push( { container: \'intergeo_map%1$s\', options: %5$s } );
764
+ if (!window.intergeo_maps_current) window.intergeo_maps_current = null;
765
  /* ]]> */
766
  </script>
767
  ',
849
  wp_localize_script( 'intergeo-rendering', 'intergeo_options', array(
850
  'adsense' => array( 'publisher_id' => get_option( 'intergeo_adsense_publisher_id' ) )
851
  ) );
852
+
853
+ // Added by Ash/Upwork
854
+ if( defined( 'IntergeoMaps_Pro' ) ){
855
+ global $IntergeoMaps_Pro;
856
+ $IntergeoMaps_Pro->enqueueScriptsAndStyles(array('intergeo-rendering'));
857
+ }
858
+ // Added by Ash/Upwork
859
+
860
  }
861
 
862
  function intergeo_library_delete() {
js/editor.js CHANGED
@@ -1 +1,1123 @@
1
- (function(){var a=window.dialogArguments||opener||parent||top;if(intergeo_options.send_to_editor&&a.send_to_editor){a.send_to_editor(intergeo_options.send_to_editor)}})();(function(a,b){if(typeof define=="function"){define(b)}else{if(typeof module!="undefined"){module.exports=b()}else{this[a]=b()}}})("klass",function(){var c=this,d=c.klass,h="function",k=/xyz/.test(function(){xyz})?/\bsupr\b/:/.*/,e="prototype";function i(f){return j.call(g(f)?f:function(){},f,1)}function g(f){return typeof f===h}function b(l,m,f){return function(){var o=this.supr;this.supr=f[e][l];var p={}.fabricatedUndefined;var n=p;try{n=m.apply(this,arguments)}finally{this.supr=o}return n}}function a(m,n,f){for(var l in n){if(n.hasOwnProperty(l)){m[l]=g(n[l])&&g(f[e][l])&&k.test(n[l])?b(l,n[l],f):n[l]}}}function j(m,p){function t(){}t[e]=this[e];var q=this,s=new t(),n=g(m),f=n?m:this,l=n?{}:m;function r(){if(this.initialize){this.initialize.apply(this,arguments)}else{p||n&&q.apply(this,arguments);f.apply(this,arguments)}}r.methods=function(u){a(s,u,q);r[e]=s;return this};r.methods.call(r,l).prototype.constructor=r;r.extend=arguments.callee;r[e].implement=r.statics=function(v,u){v=typeof v=="string"?(function(){var o={};o[v]=u;return o}()):v;a(this,v,q);return this};return r}i.noConflict=function(){c.klass=d;return this};c.klass=i;return i});if(!window.intergeo){window.intergeo={maps:{}}}if(!window.intergeo.maps){window.intergeo.maps={}}(function(c,b,a){a.Overlay=klass({initialize:function(h,f,g,d,i){var e=this;e.map=h;e.overlay=f;e.html=g;e.position=d;e.array=i;e.timeout=null;e.bindRemoveEvent(i)},bindRemoveEvent:function(e){var d=this;d.html.find(".intergeo_tlbr_actn_delete").click(function(){if(showNotice.warn()){d.overlay.setMap(null);d.map[e][d.position]=null;d.html.remove()}})}});a.Marker=a.Overlay.extend({initialize:function(i,f,g,d){var e=this,h=new b.InfoWindow();e.supr(i,f,g,d,"markers");g.hover(function(){if(i.markers[d]){f.setAnimation(b.Animation.BOUNCE)}},function(){if(i.markers[d]){f.setAnimation(null)}});e.html.find(".intergeo_tlbr_actn_edit").click(function(){var j=c("#intergeo_marker_ppp");j.find(".intergeo_ppp_frm").attr("data-position",d);j.find(".intergeo_tlbr_marker_title").val(g.find(".intergeo_tlbr_marker_title").val());j.find(".intergeo_tlbr_marker_icon").val(g.find(".intergeo_tlbr_marker_icon").val());j.find(".intergeo_tlbr_marker_info").val(g.find(".intergeo_tlbr_marker_info").val());j.fadeIn(150)});b.event.addListener(f,"dragend",function(j){g.find(".intergeo_tlbr_marker_location").val(j.latLng.toUrlValue())});b.event.addListener(f,"click",function(){var j=c.trim(g.find(".intergeo_tlbr_marker_info").val());if(j.length){if(i.infowindow){i.infowindow.close()}h.setContent(j);h.open(i.map,f);i.infowindow=h}})},update:function(g){var d=this,e={},i=c.trim(g.find(".intergeo_tlbr_marker_title").val()),f=c.trim(g.find(".intergeo_tlbr_marker_icon").val()),h=c.trim(g.find(".intergeo_tlbr_marker_info").val()),j=d.html.find(".intergeo_tlbr_marker_title_td");e.title=i;if(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(f)){e.icon=f}else{e.icon=null}d.html.find(".intergeo_tlbr_marker_title").val(i);d.html.find(".intergeo_tlbr_marker_icon").val(f);d.html.find(".intergeo_tlbr_marker_info").val(h);d.overlay.setOptions(e);if(i!=""){j.text(i)}else{j.text("#"+(d.position+1)+" "+intergeo_options.l10n.marker)}}});a.PolyOverlay=a.Overlay.extend({initialize:function(h,f,g,d,i){var e=this;e.supr(h,f,g,d,i);e.html.find(".intergeo_tlbr_actn_edit").click(function(){e.edit();return false})},pathToString:function(){var d=[];this.overlay.getPath().forEach(function(e){d.push(e.toUrlValue())});return d.join(";")},bindChangeEvent:function(e){var d=this;b.event.addListener(d.overlay,e,function(){d.html.find(".intergeo_tlbr_"+d.array+"_path").val(d.pathToString())})},edit:function(){var d=this,e=c("#intergeo_polyoverlay_ppp"),g=c.trim(d.html.find(".intergeo_tlbr_"+d.array+"_fill_color").val()),f=c.trim(d.html.find(".intergeo_tlbr_"+d.array+"_stroke_color").val());e.find(".intergeo_ppp_frm").attr("data-position",d.position).attr("data-target",d.array);if(!g){g="#000000"}e.find(".intergeo_tlbr_polyoverlay_fill_color").val(g).wpColorPicker("color",g);e.find(".intergeo_tlbr_polyoverlay_fill_opacity").val(d.html.find(".intergeo_tlbr_"+d.array+"_fill_opacity").val());if(!f){f="#000000"}e.find(".intergeo_tlbr_polyoverlay_stroke_color").val(f).wpColorPicker("color",f);e.find(".intergeo_tlbr_polyoverlay_weight").val(d.html.find(".intergeo_tlbr_"+d.array+"_weight").val());e.find(".intergeo_tlbr_polyoverlay_stroke_opacity").val(d.html.find(".intergeo_tlbr_"+d.array+"_stroke_opacity").val());e.find(".intergeo_tlbr_polyoverlay_position").val(d.html.find(".intergeo_tlbr_"+d.array+"_position").val());e.fadeIn(150)},update:function(e){var n=this,o={},k=e.find(".intergeo_tlbr_polyoverlay_position").val(),j=parseInt(e.find(".intergeo_tlbr_polyoverlay_weight").val()),i=!isNaN(j)&&0<=j,f=parseFloat(e.find(".intergeo_tlbr_polyoverlay_stroke_opacity").val()),d=!isNaN(f)&&0<=f&&f<=1,h=c.trim(e.find(".intergeo_tlbr_polyoverlay_stroke_color").val()),g=parseFloat(e.find(".intergeo_tlbr_polyoverlay_fill_opacity").val()),l=!isNaN(g)&&0<=g&&g<=1,m=c.trim(e.find(".intergeo_tlbr_polyoverlay_fill_color").val());o.strokePosition=b.StrokePosition[k]||b.StrokePosition.CENTER;o.strokeWeight=i?j:3;o.strokeOpacity=d?f:1;o.strokeColor=h;o.fillOpacity=l?g:0.3;o.fillColor=m;n.html.find(".intergeo_tlbr_"+n.array+"_position").val(k);n.html.find(".intergeo_tlbr_"+n.array+"_weight").val(i?j:"");n.html.find(".intergeo_tlbr_"+n.array+"_stroke_opacity").val(d?f:"");n.html.find(".intergeo_tlbr_"+n.array+"_stroke_color").val(h);n.html.find(".intergeo_tlbr_"+n.array+"_fill_opacity").val(l?g:"");n.html.find(".intergeo_tlbr_"+n.array+"_fill_color").val(m);n.html.find(".intergeo_tlbr_clr_prvw:last").css("background-color",h).fadeTo(0,d?f:1);n.html.find(".intergeo_tlbr_clr_prvw:first").css("background-color",m).fadeTo(0,l?g:0.3);n.overlay.setOptions(o)}});a.PolyOverlay.stringToPath=function(e,d){var f=[];c.each(e.find(d).val().split(";"),function(h,i){var g=i.split(",");if(g.length==2){f.push(new b.LatLng(g[0],g[1]))}});return f};a.PolyOverlay.stringToBounds=function(e,d){var f=a.PolyOverlay.stringToPath(e,d);return new b.LatLngBounds(f[0],f[1])};a.Polyline=a.PolyOverlay.extend({initialize:function(g,e,f,d){this.supr(g,e,f,d,"polyline");this.bindChangeEvent("mouseup")},edit:function(){var e=this,f=c("#intergeo_polyline_ppp"),d=c.trim(e.html.find(".intergeo_tlbr_polyline_color").val());f.find(".intergeo_ppp_frm").attr("data-position",e.position).attr("data-target","polyline");f.find(".intergeo_tlbr_polyline_weight").val(e.html.find(".intergeo_tlbr_polyline_weight").val());f.find(".intergeo_tlbr_polyline_opacity").val(e.html.find(".intergeo_tlbr_polyline_opacity").val());if(!d){d="#000000"}f.find(".intergeo_tlbr_polyline_color").val(d).wpColorPicker("color",d);f.fadeIn(150)},update:function(i){var e=this,g={},j=parseInt(i.find(".intergeo_tlbr_polyline_weight").val()),k=!isNaN(j)&&0<=j,f=parseFloat(i.find(".intergeo_tlbr_polyline_opacity").val()),h=!isNaN(f)&&0<=f&&f<=1,d=c.trim(i.find(".intergeo_tlbr_polyline_color").val());g.strokeOpacity=h?f:1;g.strokeWeight=k?j:3;g.strokeColor=d;e.html.find(".intergeo_tlbr_polyline_weight").val(k?j:"");e.html.find(".intergeo_tlbr_polyline_opacity").val(h?f:"");e.html.find(".intergeo_tlbr_polyline_color").val(d);e.html.find(".intergeo_tlbr_clr_prvw").css("background-color",d).fadeTo(0,h?f:1);e.overlay.setOptions(g)}});a.Polygon=a.PolyOverlay.extend({initialize:function(g,e,f,d){this.supr(g,e,f,d,"polygon");this.bindChangeEvent("mouseup")}});a.Rectangle=a.PolyOverlay.extend({initialize:function(g,e,f,d){this.supr(g,e,f,d,"rectangle");this.bindChangeEvent("bounds_changed")},pathToString:function(){var d=this.overlay.getBounds();return[d.getSouthWest().toUrlValue(),d.getNorthEast().toUrlValue()].join(";")}});a.Circle=a.PolyOverlay.extend({initialize:function(g,e,f,d){this.supr(g,e,f,d,"circle");this.bindChangeEvent("center_changed");this.bindChangeEvent("radius_changed")},pathToString:function(){var d=this.overlay;return d.getCenter().toUrlValue()+";"+d.getRadius()+",0"}});a.Direction=a.PolyOverlay.extend({initialize:function(g,e,f,d){this.supr(g,e,f,d,"direction")},edit:function(){var d=this,e=c("#intergeo_drctn_ppp");e.find(".intergeo_ppp_frm").attr("data-position",d.position).attr("data-target",d.array);e.find("#intergeo_ppp_drctn_from").val(d.html.find(".intergeo_tlbr_drctn_from").val());e.find("#intergeo_ppp_drctn_to").val(d.html.find(".intergeo_tlbr_drctn_to").val());e.find("#intergeo_ppp_drctn_mode").val(d.html.find(".intergeo_tlbr_drctn_mode").val());e.fadeIn(150)},update:function(f){var d=this,i=f.find("#intergeo_ppp_drctn_from").val(),h=f.find("#intergeo_ppp_drctn_to").val(),g=f.find("#intergeo_ppp_drctn_mode").val(),e={origin:i,destination:h,travelMode:b.TravelMode[g]||b.TravelMode.DRIVING};d.map.directions.route(e,function(k,j){if(j==b.DirectionsStatus.OK){d.overlay.setDirections(k);d.html.find(".intergeo_tlbr_direction_title_td").text(c("#intergeo_tlbr_drctn_ttl_tmpl").text().replaceByHash({"%num%":d.position+1,"%from%":i,"%to%":h,"%mode%":f.find("#intergeo_ppp_drctn_mode > :selected").text()}))}else{alert(intergeo_options.l10n.error.directions)}});d.html.find(".intergeo_tlbr_drctn_from").val(i);d.html.find(".intergeo_tlbr_drctn_to").val(h);d.html.find(".intergeo_tlbr_drctn_mode").val(g)}})})(jQuery,google.maps,intergeo.maps);(function(d,c,b){var a;String.prototype.replaceByHash=function(e){var f=this;d.each(e,function(g,h){f=f.split(g).join(h)});return f};a=function(e,g){var f=this;f.map=new c.Map(document.getElementById(e),g);f.drawing=new c.drawing.DrawingManager({drawingControl:false,map:f.map,circleOptions:{editable:true},markerOptions:{draggable:true},polygonOptions:{editable:true},polylineOptions:{editable:true},rectangleOptions:{editable:true}});f.directions=new c.DirectionsService();f.geocoder=null;f.traffic=null;f.bicycling=null;f.weather=null;f.cloud=null;f.panoramio=null;f.adunit=null;f.markers=[];f.polyline=[];f.polygon=[];f.rectangle=[];f.circle=[];f.direction=[];f.infowindow=null;c.event.addListener(f.map,"center_changed",function(){var h=f.map.getCenter();d("#intergeo_map_lat").val(h.lat());d("#intergeo_map_lng").val(h.lng())});c.event.addListener(f.map,"zoom_changed",function(){d("#intergeo_map_zoom").val(f.map.getZoom())});c.event.addListener(f.drawing,"overlaycomplete",function(h){switch(h.type){case c.drawing.OverlayType.MARKER:f._markerComplete(h);break;case c.drawing.OverlayType.CIRCLE:f._polyComplete(h,"circle",b.Circle);break;case c.drawing.OverlayType.POLYGON:f._polyComplete(h,"polygon",b.Polygon);break;case c.drawing.OverlayType.POLYLINE:f._polyComplete(h,"polyline",b.Polyline);break;case c.drawing.OverlayType.RECTANGLE:f._polyComplete(h,"rectangle",b.Rectangle);break}});f._initOverlays()};a.Styles={DEFAULT:[],RED:[{featureType:"all",stylers:[{hue:"#ff0000"}]}],NIGHT:[{featureType:"all",stylers:[{invert_lightness:"true"}]}],BLUE:[{featureType:"all",stylers:[{hue:"#0000b0"},{invert_lightness:"true"},{saturation:-30}]}],GREYSCALE:[{featureType:"all",stylers:[{saturation:-100},{gamma:0.5}]}],NO_ROADS:[{featureType:"road",stylers:[{visibility:"off"}]}],MIXED:[{featureType:"landscape",stylers:[{hue:"#00dd00"}]},{featureType:"road",stylers:[{hue:"#dd0000"}]},{featureType:"water",stylers:[{hue:"#000040"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"road.arterial",stylers:[{hue:"#ffff00"}]},{featureType:"road.local",stylers:[{visibility:"off"}]}],CHILLED:[{featureType:"road",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{hue:149},{saturation:-78},{lightness:0}]},{featureType:"road.highway",stylers:[{hue:-31},{saturation:-40},{lightness:2.8}]},{featureType:"poi",elementType:"label",stylers:[{visibility:"off"}]},{featureType:"landscape",stylers:[{hue:163},{saturation:-26},{lightness:-1.1}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"water",stylers:[{hue:3},{saturation:-24.24},{lightness:-38.57}]}]};a.prototype={_initOverlays:function(){var e=this;d(".intergeo_tlbr_marker").each(function(f,i){var h=d(i),g=h.find(".intergeo_tlbr_marker_location").val().split(",");e.markers.push(new b.Marker(e,new c.Marker({position:new c.LatLng(parseFloat(g[0]),parseFloat(g[1])),map:e.map,title:h.find(".intergeo_tlbr_marker_title").val(),icon:h.find(".intergeo_tlbr_marker_icon").val(),draggable:true}),h,f))});d(".intergeo_tlbr_polyline").each(function(f,j){var i=d(j),g=d.trim(i.find(".intergeo_tlbr_polyline_color").val()),h=parseFloat(i.find(".intergeo_tlbr_polyline_opacity").val()),k=parseInt(i.find(".intergeo_tlbr_polyline_weight").val());e.polyline.push(new b.Polyline(e,new c.Polyline({map:e.map,path:b.PolyOverlay.stringToPath(i,".intergeo_tlbr_polyline_path"),editable:true,strokeColor:g.length==0?"#000000":g,strokeOpacity:isNaN(h)?1:h,strokeWeight:isNaN(k)?3:k}),i,f))});d(".intergeo_tlbr_polygon").each(function(f,i){var h=d(i),l=d.trim(h.find(".intergeo_tlbr_polygon_fill_color").val()),g=parseFloat(h.find(".intergeo_tlbr_polygon_fill_opacity").val()),k=d.trim(h.find(".intergeo_tlbr_polygon_stroke_color").val()),m=parseFloat(h.find(".intergeo_tlbr_polygon_stroke_opacity").val()),f=d.trim(h.find(".intergeo_tlbr_plygon_position").val()),j=parseInt(h.find(".intergeo_tlbr_polygon_weight").val());e.polygon.push(new b.Polygon(e,new c.Polygon({map:e.map,path:b.PolyOverlay.stringToPath(h,".intergeo_tlbr_polygon_path"),editable:true,fillColor:l.length==0?"#000000":l,fillOpacity:isNaN(g)?0.3:g,strokeColor:k.length==0?"#000000":k,strokeOpacity:isNaN(m)?1:m,strokePosition:c.StrokePosition[f]||c.StrokePosition.CENTER,strokeWeight:isNaN(j)?3:j}),h,f))});d(".intergeo_tlbr_rectangle").each(function(f,i){var h=d(i),l=d.trim(h.find(".intergeo_tlbr_rectangle_fill_color").val()),g=parseFloat(h.find(".intergeo_tlbr_rectangle_fill_opacity").val()),k=d.trim(h.find(".intergeo_tlbr_rectangle_stroke_color").val()),m=parseFloat(h.find(".intergeo_tlbr_rectangle_stroke_opacity").val()),f=d.trim(h.find(".intergeo_tlbr_rectangle_position").val()),j=parseInt(h.find(".intergeo_tlbr_rectangle_weight").val());e.rectangle.push(new b.Rectangle(e,new c.Rectangle({map:e.map,bounds:b.PolyOverlay.stringToBounds(h,".intergeo_tlbr_rectangle_path"),editable:true,fillColor:l.length==0?"#000000":l,fillOpacity:isNaN(g)?0.3:g,strokeColor:k.length==0?"#000000":k,strokeOpacity:isNaN(m)?1:m,strokePosition:c.StrokePosition[f]||c.StrokePosition.CENTER,strokeWeight:isNaN(j)?3:j}),h,f))});d(".intergeo_tlbr_circle").each(function(m,j){var l=d(j),p=d.trim(l.find(".intergeo_tlbr_circle_fill_color").val()),i=parseFloat(l.find(".intergeo_tlbr_circle_fill_opacity").val()),h=d.trim(l.find(".intergeo_tlbr_circle_stroke_color").val()),g=parseFloat(l.find(".intergeo_tlbr_circle_stroke_opacity").val()),o=d.trim(l.find(".intergeo_tlbr_circle_position").val()),k=parseInt(l.find(".intergeo_tlbr_circle_weight").val()),q=d.trim(l.find(".intergeo_tlbr_circle_path").val()).split(";"),f=q[0].split(","),n=q[1].split(",");e.circle.push(new b.Circle(e,new c.Circle({map:e.map,center:new c.LatLng(f[0],f[1]),radius:parseFloat(n[0]),editable:true,fillColor:p.length==0?"#000000":p,fillOpacity:isNaN(i)?0.3:i,strokeColor:h.length==0?"#000000":h,strokeOpacity:isNaN(g)?1:g,strokePosition:c.StrokePosition[o]||c.StrokePosition.CENTER,strokeWeight:isNaN(k)?3:k}),l,m))});d(".intergeo_tlbr_drctn").each(function(f,h){var g=d(h),l=d.trim(g.find(".intergeo_tlbr_drctn_from").val()),k=d.trim(g.find(".intergeo_tlbr_drctn_to").val()),j=d.trim(g.find(".intergeo_tlbr_drctn_mode").val()),i={origin:l,destination:k,travelMode:c.TravelMode[j]||c.TravelMode.DRIVING};e.directions.route(i,function(n,m){if(m==c.DirectionsStatus.OK){var o=new b.Direction(e,new c.DirectionsRenderer({map:e.map,directions:n}),g,f);e.direction.push(o)}else{g.remove();e.direction.push(null)}})})},_markerComplete:function(i){var g=this,e=g.markers.length,h=d(d("#intergeo_tlbr_marker_tmpl").html().replaceByHash({"%pos%":e,"%num%":e+1})),f=new b.Marker(g,i.overlay,h,e);h.find(".intergeo_tlbr_marker_location").val(i.overlay.getPosition().toUrlValue());d("#intergeo_tlbr_markers").append(h);g.markers.push(f);i.overlay.setDraggable(true)},_polyComplete:function(j,i,h){var f=this,e=f[i].length,g=d(d("#intergeo_tlbr_"+i+"_tmpl").html().replaceByHash({"%pos%":e,"%num%":e+1})),k=new h(f,j.overlay,g,e);f[i].push(k);g.find(".intergeo_tlbr_"+i+"_path").val(k.pathToString());d("#intergeo_tlbr_"+i+"s").append(g)},_normalize:function(h){var g=function(j){return j==="1"},f=function(j,k,l){return k[j]||l},e=function(j){return f(j,c.ControlPosition,0)},i={minZoom:parseInt,maxZoom:parseInt,scrollwheel:g,draggable:g,mapTypeId:function(j){return c.MapTypeId[j]||c.MapTypeId.ROADMAP},mapTypeControl:g,mapTypeControlOptions:{position:e,mapTypeIds:function(j){var k=[];d.each(j,function(l,m){if(c.MapTypeId[m]!==undefined){k.push(c.MapTypeId[m])}});return k},style:function(j){return f(j,c.MapTypeControlStyle,c.MapTypeControlStyle.DEFAULT)}},overviewMapControl:g,overviewMapControlOptions:{opened:g},panControl:g,panControlOptions:{position:e},rotateControl:g,rotateControlOptions:{position:e},scaleControl:g,scaleControlOptions:{position:e},streetViewControl:g,streetViewControlOptions:{position:e},zoomControl:g,zoomControlOptions:{position:e,style:function(j){return f(j,c.ZoomControlStyle,c.ZoomControlStyle.DEFAULT)}}};return d.each(h,function(j,k){if(i[j]===undefined){delete h[j]}else{if(typeof k==="string"){h[j]=i[j](k)}else{d.each(k,function(m,l){if(i[j][m]===undefined){delete h[j][m]}else{h[j][m]=i[j][m](l)}})}}})},_traffic:function(f){var e=this;if(f.layer.traffic==1){if(!e.traffic){e.traffic=new c.TrafficLayer()}e.traffic.setMap(e.map)}else{if(e.traffic){e.traffic.setMap(null)}}},_bicycling:function(f){var e=this;if(f.layer.bicycling==1){if(!e.bicycling){e.bicycling=new c.BicyclingLayer()}e.bicycling.setMap(e.map)}else{if(e.bicycling){e.bicycling.setMap(null)}}},_weather:function(f){var e=this;if(f.layer.weather==1){if(!e.weather){e.weather=new c.weather.WeatherLayer({})}e.weather.setMap(e.map);e.weather.setOptions({temperatureUnits:c.weather.TemperatureUnit[f.weather.temperatureUnits]||c.weather.TemperatureUnit.CELSIUS,windSpeedUnits:c.weather.WindSpeedUnit[f.weather.windSpeedUnits]||c.weather.WindSpeedUnit.METERS_PER_SECOND})}else{if(e.weather){e.weather.setMap(null)}}},_cloud:function(f){var e=this;if(f.layer.cloud==1){if(!e.cloud){e.cloud=new c.weather.CloudLayer()}e.cloud.setMap(e.map)}else{if(e.cloud){e.cloud.setMap(null)}}},_panoramio:function(f){var e=this;if(f.layer.panoramio==1){if(!e.panoramio){e.panoramio=new c.panoramio.PanoramioLayer({})}e.panoramio.setMap(e.map);e.panoramio.setTag(f.panoramio.tag);e.panoramio.setUserId(f.panoramio.userId)}else{if(e.panoramio){e.panoramio.setMap(null)}}},_adsense:function(f){var e=this;if(f.layer.adsense==1&&intergeo_options.adsense.publisher_id&&d.trim(intergeo_options.adsense.publisher_id)!=""){if(!e.adunit){e.adunit=new c.adsense.AdUnit(document.createElement("div"),{visible:true,publisherId:intergeo_options.adsense.publisher_id})}e.adunit.setMap(this.map);e.adunit.setBackgroundColor(f.adsense.backgroundColor);e.adunit.setBorderColor(f.adsense.borderColor);e.adunit.setUrlColor(f.adsense.urlColor);e.adunit.setTitleColor(f.adsense.titleColor);e.adunit.setTextColor(f.adsense.textColor);if(c.ControlPosition[f.adsense.position]!==undefined){e.adunit.setPosition(c.ControlPosition[f.adsense.position])}if(c.adsense.AdFormat[f.adsense.format]){e.adunit.setFormat(c.adsense.AdFormat[f.adsense.format])}}else{if(e.adunit){e.adunit.setMap(null)}}},createDirection:function(){var f=this,e=d("#intergeo_drctn_ppp"),g=e.find(".intergeo_ppp_frm");g.bind("submit.firsttime",function(){var h,i,j,l,k;if(g.attr("data-position")!=""){return false}h=f.direction.length;l=d.trim(g.find("#intergeo_ppp_drctn_from").val());k=d.trim(g.find("#intergeo_ppp_drctn_to").val());if(l==""||k==""){return false}j=d(d("#intergeo_tlbr_drctn_tmpl").html().replaceByHash({"%pos%":h,"%num%":h+1,"%from%":l,"%to%":k,"%mode%":d.trim(g.find("#intergeo_ppp_drctn_mode option:selected").text())}));i=new b.Direction(f,new c.DirectionsRenderer({map:f.map}),j,h);d("#intergeo_tlbr_drctns").append(j);f.direction.push(i);i.update(g);g.unbind("submit.firsttime");return false});g.find('select,input[type!="submit"]').val("");g.attr("data-position","");e.fadeIn(150)},updateOverlays:function(){var e=this;d.each(e.polyline,function(g,f){if(f){d('.intergeo_tlbr_polyline_path[data-position="'+g+'"]').val(f.pathToString())}});d.each(e.polygon,function(g,f){if(f){d('.intergeo_tlbr_polygon_path[data-position="'+g+'"]').val(f.pathToString())}})},preview:function(){var f=this,g={};d.each(d("#intergeo_frm").serializeArray(),function(){var l=/\[\]$/,m=g,j=this.name.replace(l,"").split("_"),e=j.pop(),k=this.value||"",i=l.test(this.name);d.each(j,function(n,o){if(m[o]===undefined){m[o]={}}m=m[o]});if(m[e]!==undefined){if(i){m[e].push(k)}else{m[e]=k}}else{m[e]=i?[k]:k}});f._normalize(g.map);if(d("#intergeo_map_lock_preview").is(":checked")){g.map.draggable=false;g.map.scrollwheel=false}f.map.setOptions(g.map);if(g.styles&&g.styles.type){if(g.styles.type==-1){try{f.map.setOptions({styles:d.parseJSON(g.styles.custom||"[]")})}catch(h){alert(intergeo_options.l10n.error.style)}}else{if(a.Styles[g.styles.type]!==undefined){f.map.setOptions({styles:a.Styles[g.styles.type]})}}}f._traffic(g);f._bicycling(g);f._weather(g);f._cloud(g);f._panoramio(g);f._adsense(g)}};d(document).ready(function(){var g,f,e;f=new a("intergeo_canvas",{center:new c.LatLng(parseFloat(d("#intergeo_map_lat").val()),parseFloat(d("#intergeo_map_lng").val())),zoom:parseInt(d("#intergeo_map_zoom").val()),minZoom:0,maxZoom:19,mapTypeId:c.MapTypeId.ROADMAP});e=d("#intergeo_frm");e.find("input[name], select[name], textarea[name]").change(function(){f.preview()});e.find(".intergeo_tlbr_cntrl_onkeyup").keyup(function(){f.preview()});e.submit(function(){f.updateOverlays();return true});f.preview();d("#intergeo_map_lock_preview").change(function(){var h=d(this).is(":checked");f.map.setOptions({draggable:!h,scrollwheel:!h})});d(".intergeo_tlbr_ul_li_h3").click(function(){var h=d(this).parent();if(h.hasClass("open")){h.removeClass("open")}else{d(".intergeo_tlbr_ul_li.open").removeClass("open");h.addClass("open")}});d(".intergeo_tlbr_cntrl_more_info").click(function(){d(this).parent().nextAll(".intergeo_tlbr_cntrl_dsc:first").toggle();return false});d(".intergeo_tlbr_cntrl_ttl").click(function(){d(this).toggleClass("open").parent().find(".intergeo_tlbr_cntrl_items").toggle();return false});d(".color-picker-hex").wpColorPicker({change:function(){clearTimeout(g);g=setTimeout(function(){f.preview()},500)}});d(".intergeo_tlbr_clr").wpColorPicker();d("#intergeo_show_map_center").change(function(){d("#intergeo_canvas_center").toggle();d.post(intergeo_options.ajaxurl,{action:"intergeo_show_map_center",nonce:intergeo_options.nonce||"",status:d(this).is(":checked")?1:0})});d("#intergeo_tlbr_drawing_tools").change(function(){f.drawing.setDrawingMode(null);f.drawing.setOptions({drawingControl:d(this).is(":checked")})});d(".intergeo_ppp_cls").click(function(){d(this).parents(".intergeo_ppp").fadeOut(150);return false});d("#intergeo_go_to_address").click(function(){d("#intergeo_address_ppp").fadeIn(150);return false});d("#intergeo_address_ppp .intergeo_ppp_frm").submit(function(){var h=d(this),j=h.find(".intergeo_ppp_txt"),i=d.trim(j.val());if(i!=""){if(!f.geocoder){f.geocoder=new c.Geocoder()}f.geocoder.geocode({address:i},function(l,k){if(k==c.GeocoderStatus.OK){f.map.setCenter(l[0].geometry.location)}})}j.val("");h.parents(".intergeo_ppp").fadeOut(150);return false});d(".intregeo_ppp_frm_overlay").submit(function(){var j=d(this),h=parseInt(j.attr("data-position")),i=j.attr("data-target");j.parents(".intergeo_ppp").fadeOut(150);if(f[i]&&f[i][h]){f[i][h].update(j)}return false});d("#intergeo_tlbr_new_drctn").click(function(){f.createDirection();return false})})})(jQuery,google.maps,intergeo.maps);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ var a = window.dialogArguments || opener || parent || top;
3
+ if (intergeo_options.send_to_editor && a.send_to_editor) {
4
+ a.send_to_editor(intergeo_options.send_to_editor)
5
+ }
6
+ })();
7
+ (function(a, b) {
8
+ if (typeof define == "function") {
9
+ define(b)
10
+ } else {
11
+ if (typeof module != "undefined") {
12
+ module.exports = b()
13
+ } else {
14
+ this[a] = b()
15
+ }
16
+ }
17
+ })("klass", function() {
18
+ var c = this,
19
+ d = c.klass,
20
+ h = "function",
21
+ k = /xyz/.test(function() {
22
+ xyz
23
+ }) ? /\bsupr\b/ : /.*/,
24
+ e = "prototype";
25
+
26
+ function i(f) {
27
+ return j.call(g(f) ? f : function() {}, f, 1)
28
+ }
29
+
30
+ function g(f) {
31
+ return typeof f === h
32
+ }
33
+
34
+ function b(l, m, f) {
35
+ return function() {
36
+ var o = this.supr;
37
+ this.supr = f[e][l];
38
+ var p = {}.fabricatedUndefined;
39
+ var n = p;
40
+ try {
41
+ n = m.apply(this, arguments)
42
+ } finally {
43
+ this.supr = o
44
+ }
45
+ return n
46
+ }
47
+ }
48
+
49
+ function a(m, n, f) {
50
+ for (var l in n) {
51
+ if (n.hasOwnProperty(l)) {
52
+ m[l] = g(n[l]) && g(f[e][l]) && k.test(n[l]) ? b(l, n[l], f) : n[l]
53
+ }
54
+ }
55
+ }
56
+
57
+ function j(m, p) {
58
+ function t() {}
59
+ t[e] = this[e];
60
+ var q = this,
61
+ s = new t(),
62
+ n = g(m),
63
+ f = n ? m : this,
64
+ l = n ? {} : m;
65
+
66
+ function r() {
67
+ if (this.initialize) {
68
+ this.initialize.apply(this, arguments)
69
+ } else {
70
+ p || n && q.apply(this, arguments);
71
+ f.apply(this, arguments)
72
+ }
73
+ }
74
+ r.methods = function(u) {
75
+ a(s, u, q);
76
+ r[e] = s;
77
+ return this
78
+ };
79
+ r.methods.call(r, l).prototype.constructor = r;
80
+ r.extend = arguments.callee;
81
+ r[e].implement = r.statics = function(v, u) {
82
+ v = typeof v == "string" ? (function() {
83
+ var o = {};
84
+ o[v] = u;
85
+ return o
86
+ }()) : v;
87
+ a(this, v, q);
88
+ return this
89
+ };
90
+ return r
91
+ }
92
+ i.noConflict = function() {
93
+ c.klass = d;
94
+ return this
95
+ };
96
+ c.klass = i;
97
+ return i
98
+ });
99
+ if (!window.intergeo) {
100
+ window.intergeo = {
101
+ maps: {}
102
+ }
103
+ }
104
+ if (!window.intergeo.maps) {
105
+ window.intergeo.maps = {}
106
+ }(function(c, b, a) {
107
+ a.Overlay = klass({
108
+ initialize: function(h, f, g, d, i) {
109
+ var e = this;
110
+ e.map = h;
111
+ e.overlay = f;
112
+ e.html = g;
113
+ e.position = d;
114
+ e.array = i;
115
+ e.timeout = null;
116
+ e.bindRemoveEvent(i)
117
+ },
118
+ bindRemoveEvent: function(e) {
119
+ var d = this;
120
+ d.html.find(".intergeo_tlbr_actn_delete").click(function() {
121
+ if (showNotice.warn()) {
122
+ d.overlay.setMap(null);
123
+ d.map[e][d.position] = null;
124
+ d.html.remove()
125
+ }
126
+ })
127
+ }
128
+ });
129
+ a.Marker = a.Overlay.extend({
130
+ initialize: function(i, f, g, d) {
131
+ var e = this,
132
+ h = new b.InfoWindow();
133
+ e.supr(i, f, g, d, "markers");
134
+ g.hover(function() {
135
+ if (i.markers[d]) {
136
+ f.setAnimation(b.Animation.BOUNCE)
137
+ }
138
+ }, function() {
139
+ if (i.markers[d]) {
140
+ f.setAnimation(null)
141
+ }
142
+ });
143
+ e.html.find(".intergeo_tlbr_actn_edit").click(function() {
144
+ var j = c("#intergeo_marker_ppp");
145
+ j.find(".intergeo_ppp_frm").attr("data-position", d);
146
+ j.find(".intergeo_tlbr_marker_title").val(g.find(".intergeo_tlbr_marker_title").val());
147
+ j.find(".intergeo_tlbr_marker_icon").val(g.find(".intergeo_tlbr_marker_icon").val());
148
+ j.find(".intergeo_tlbr_marker_info").val(g.find(".intergeo_tlbr_marker_info").val());
149
+ j.fadeIn(150)
150
+ });
151
+ b.event.addListener(f, "dragend", function(j) {
152
+ g.find(".intergeo_tlbr_marker_location").val(j.latLng.toUrlValue())
153
+ });
154
+ b.event.addListener(f, "click", function() {
155
+ var j = c.trim(g.find(".intergeo_tlbr_marker_info").val());
156
+ if (j.length) {
157
+ if (i.infowindow) {
158
+ i.infowindow.close()
159
+ }
160
+ h.setContent(j);
161
+ h.open(i.map, f);
162
+ i.infowindow = h
163
+ }
164
+ })
165
+ },
166
+ update: function(g) {
167
+ var d = this,
168
+ e = {},
169
+ i = c.trim(g.find(".intergeo_tlbr_marker_title").val()),
170
+ f = c.trim(g.find(".intergeo_tlbr_marker_icon").val()),
171
+ h = c.trim(g.find(".intergeo_tlbr_marker_info").val()),
172
+ j = d.html.find(".intergeo_tlbr_marker_title_td");
173
+ e.title = i;
174
+ if (/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(f)) {
175
+ e.icon = f
176
+ } else {
177
+ e.icon = null
178
+ }
179
+ d.html.find(".intergeo_tlbr_marker_title").val(i);
180
+ d.html.find(".intergeo_tlbr_marker_icon").val(f);
181
+ d.html.find(".intergeo_tlbr_marker_info").val(h);
182
+ d.overlay.setOptions(e);
183
+ if (i != "") {
184
+ j.text(i)
185
+ } else {
186
+ j.text("#" + (d.position + 1) + " " + intergeo_options.l10n.marker)
187
+ }
188
+ }
189
+ });
190
+ a.PolyOverlay = a.Overlay.extend({
191
+ initialize: function(h, f, g, d, i) {
192
+ var e = this;
193
+ e.supr(h, f, g, d, i);
194
+ e.html.find(".intergeo_tlbr_actn_edit").click(function() {
195
+ e.edit();
196
+ return false
197
+ })
198
+ },
199
+ pathToString: function() {
200
+ var d = [];
201
+ this.overlay.getPath().forEach(function(e) {
202
+ d.push(e.toUrlValue())
203
+ });
204
+ return d.join(";")
205
+ },
206
+ bindChangeEvent: function(e) {
207
+ var d = this;
208
+ b.event.addListener(d.overlay, e, function() {
209
+ d.html.find(".intergeo_tlbr_" + d.array + "_path").val(d.pathToString())
210
+ })
211
+ },
212
+ edit: function() {
213
+ var d = this,
214
+ e = c("#intergeo_polyoverlay_ppp"),
215
+ g = c.trim(d.html.find(".intergeo_tlbr_" + d.array + "_fill_color").val()),
216
+ f = c.trim(d.html.find(".intergeo_tlbr_" + d.array + "_stroke_color").val());
217
+ e.find(".intergeo_ppp_frm").attr("data-position", d.position).attr("data-target", d.array);
218
+ if (!g) {
219
+ g = "#000000"
220
+ }
221
+ e.find(".intergeo_tlbr_polyoverlay_fill_color").val(g).wpColorPicker("color", g);
222
+ e.find(".intergeo_tlbr_polyoverlay_fill_opacity").val(d.html.find(".intergeo_tlbr_" + d.array + "_fill_opacity").val());
223
+ if (!f) {
224
+ f = "#000000"
225
+ }
226
+ e.find(".intergeo_tlbr_polyoverlay_stroke_color").val(f).wpColorPicker("color", f);
227
+ e.find(".intergeo_tlbr_polyoverlay_weight").val(d.html.find(".intergeo_tlbr_" + d.array + "_weight").val());
228
+ e.find(".intergeo_tlbr_polyoverlay_stroke_opacity").val(d.html.find(".intergeo_tlbr_" + d.array + "_stroke_opacity").val());
229
+ e.find(".intergeo_tlbr_polyoverlay_position").val(d.html.find(".intergeo_tlbr_" + d.array + "_position").val());
230
+ e.fadeIn(150)
231
+ },
232
+ update: function(e) {
233
+ var n = this,
234
+ o = {},
235
+ k = e.find(".intergeo_tlbr_polyoverlay_position").val(),
236
+ j = parseInt(e.find(".intergeo_tlbr_polyoverlay_weight").val()),
237
+ i = !isNaN(j) && 0 <= j,
238
+ f = parseFloat(e.find(".intergeo_tlbr_polyoverlay_stroke_opacity").val()),
239
+ d = !isNaN(f) && 0 <= f && f <= 1,
240
+ h = c.trim(e.find(".intergeo_tlbr_polyoverlay_stroke_color").val()),
241
+ g = parseFloat(e.find(".intergeo_tlbr_polyoverlay_fill_opacity").val()),
242
+ l = !isNaN(g) && 0 <= g && g <= 1,
243
+ m = c.trim(e.find(".intergeo_tlbr_polyoverlay_fill_color").val());
244
+ o.strokePosition = b.StrokePosition[k] || b.StrokePosition.CENTER;
245
+ o.strokeWeight = i ? j : 3;
246
+ o.strokeOpacity = d ? f : 1;
247
+ o.strokeColor = h;
248
+ o.fillOpacity = l ? g : 0.3;
249
+ o.fillColor = m;
250
+ n.html.find(".intergeo_tlbr_" + n.array + "_position").val(k);
251
+ n.html.find(".intergeo_tlbr_" + n.array + "_weight").val(i ? j : "");
252
+ n.html.find(".intergeo_tlbr_" + n.array + "_stroke_opacity").val(d ? f : "");
253
+ n.html.find(".intergeo_tlbr_" + n.array + "_stroke_color").val(h);
254
+ n.html.find(".intergeo_tlbr_" + n.array + "_fill_opacity").val(l ? g : "");
255
+ n.html.find(".intergeo_tlbr_" + n.array + "_fill_color").val(m);
256
+ n.html.find(".intergeo_tlbr_clr_prvw:last").css("background-color", h).fadeTo(0, d ? f : 1);
257
+ n.html.find(".intergeo_tlbr_clr_prvw:first").css("background-color", m).fadeTo(0, l ? g : 0.3);
258
+ n.overlay.setOptions(o)
259
+ }
260
+ });
261
+ a.PolyOverlay.stringToPath = function(e, d) {
262
+ var f = [];
263
+ c.each(e.find(d).val().split(";"), function(h, i) {
264
+ var g = i.split(",");
265
+ if (g.length == 2) {
266
+ f.push(new b.LatLng(g[0], g[1]))
267
+ }
268
+ });
269
+ return f
270
+ };
271
+ a.PolyOverlay.stringToBounds = function(e, d) {
272
+ var f = a.PolyOverlay.stringToPath(e, d);
273
+ return new b.LatLngBounds(f[0], f[1])
274
+ };
275
+ a.Polyline = a.PolyOverlay.extend({
276
+ initialize: function(g, e, f, d) {
277
+ this.supr(g, e, f, d, "polyline");
278
+ this.bindChangeEvent("mouseup")
279
+ },
280
+ edit: function() {
281
+ var e = this,
282
+ f = c("#intergeo_polyline_ppp"),
283
+ d = c.trim(e.html.find(".intergeo_tlbr_polyline_color").val());
284
+ f.find(".intergeo_ppp_frm").attr("data-position", e.position).attr("data-target", "polyline");
285
+ f.find(".intergeo_tlbr_polyline_weight").val(e.html.find(".intergeo_tlbr_polyline_weight").val());
286
+ f.find(".intergeo_tlbr_polyline_opacity").val(e.html.find(".intergeo_tlbr_polyline_opacity").val());
287
+ if (!d) {
288
+ d = "#000000"
289
+ }
290
+ f.find(".intergeo_tlbr_polyline_color").val(d).wpColorPicker("color", d);
291
+ f.fadeIn(150)
292
+ },
293
+ update: function(i) {
294
+ var e = this,
295
+ g = {},
296
+ j = parseInt(i.find(".intergeo_tlbr_polyline_weight").val()),
297
+ k = !isNaN(j) && 0 <= j,
298
+ f = parseFloat(i.find(".intergeo_tlbr_polyline_opacity").val()),
299
+ h = !isNaN(f) && 0 <= f && f <= 1,
300
+ d = c.trim(i.find(".intergeo_tlbr_polyline_color").val());
301
+ g.strokeOpacity = h ? f : 1;
302
+ g.strokeWeight = k ? j : 3;
303
+ g.strokeColor = d;
304
+ e.html.find(".intergeo_tlbr_polyline_weight").val(k ? j : "");
305
+ e.html.find(".intergeo_tlbr_polyline_opacity").val(h ? f : "");
306
+ e.html.find(".intergeo_tlbr_polyline_color").val(d);
307
+ e.html.find(".intergeo_tlbr_clr_prvw").css("background-color", d).fadeTo(0, h ? f : 1);
308
+ e.overlay.setOptions(g)
309
+ }
310
+ });
311
+ a.Polygon = a.PolyOverlay.extend({
312
+ initialize: function(g, e, f, d) {
313
+ this.supr(g, e, f, d, "polygon");
314
+ this.bindChangeEvent("mouseup")
315
+ }
316
+ });
317
+ a.Rectangle = a.PolyOverlay.extend({
318
+ initialize: function(g, e, f, d) {
319
+ this.supr(g, e, f, d, "rectangle");
320
+ this.bindChangeEvent("bounds_changed")
321
+ },
322
+ pathToString: function() {
323
+ var d = this.overlay.getBounds();
324
+ return [d.getSouthWest().toUrlValue(), d.getNorthEast().toUrlValue()].join(";")
325
+ }
326
+ });
327
+ a.Circle = a.PolyOverlay.extend({
328
+ initialize: function(g, e, f, d) {
329
+ this.supr(g, e, f, d, "circle");
330
+ this.bindChangeEvent("center_changed");
331
+ this.bindChangeEvent("radius_changed")
332
+ },
333
+ pathToString: function() {
334
+ var d = this.overlay;
335
+ return d.getCenter().toUrlValue() + ";" + d.getRadius() + ",0"
336
+ }
337
+ });
338
+ a.Direction = a.PolyOverlay.extend({
339
+ initialize: function(g, e, f, d) {
340
+ this.supr(g, e, f, d, "direction")
341
+ },
342
+ edit: function() {
343
+ var d = this,
344
+ e = c("#intergeo_drctn_ppp");
345
+ e.find(".intergeo_ppp_frm").attr("data-position", d.position).attr("data-target", d.array);
346
+ e.find("#intergeo_ppp_drctn_from").val(d.html.find(".intergeo_tlbr_drctn_from").val());
347
+ e.find("#intergeo_ppp_drctn_to").val(d.html.find(".intergeo_tlbr_drctn_to").val());
348
+ e.find("#intergeo_ppp_drctn_mode").val(d.html.find(".intergeo_tlbr_drctn_mode").val());
349
+ e.fadeIn(150)
350
+ },
351
+ update: function(f) {
352
+ var d = this,
353
+ i = f.find("#intergeo_ppp_drctn_from").val(),
354
+ h = f.find("#intergeo_ppp_drctn_to").val(),
355
+ g = f.find("#intergeo_ppp_drctn_mode").val(),
356
+ e = {
357
+ origin: i,
358
+ destination: h,
359
+ travelMode: b.TravelMode[g] || b.TravelMode.DRIVING
360
+ };
361
+ d.map.directions.route(e, function(k, j) {
362
+ if (j == b.DirectionsStatus.OK) {
363
+ d.overlay.setDirections(k);
364
+ d.html.find(".intergeo_tlbr_direction_title_td").text(c("#intergeo_tlbr_drctn_ttl_tmpl").text().replaceByHash({
365
+ "%num%": d.position + 1,
366
+ "%from%": i,
367
+ "%to%": h,
368
+ "%mode%": f.find("#intergeo_ppp_drctn_mode > :selected").text()
369
+ }))
370
+ } else {
371
+ alert(intergeo_options.l10n.error.directions)
372
+ }
373
+ });
374
+ d.html.find(".intergeo_tlbr_drctn_from").val(i);
375
+ d.html.find(".intergeo_tlbr_drctn_to").val(h);
376
+ d.html.find(".intergeo_tlbr_drctn_mode").val(g)
377
+ }
378
+ })
379
+ })(jQuery, google.maps, intergeo.maps);
380
+ (function(d, c, b) {
381
+ var a;
382
+ String.prototype.replaceByHash = function(e) {
383
+ var f = this;
384
+ d.each(e, function(g, h) {
385
+ f = f.split(g).join(h)
386
+ });
387
+ return f
388
+ };
389
+ a = function(e, g) {
390
+ var f = this;
391
+ f.map = new c.Map(document.getElementById(e), g);
392
+ f.drawing = new c.drawing.DrawingManager({
393
+ drawingControl: false,
394
+ map: f.map,
395
+ circleOptions: {
396
+ editable: true
397
+ },
398
+ markerOptions: {
399
+ draggable: true
400
+ },
401
+ polygonOptions: {
402
+ editable: true
403
+ },
404
+ polylineOptions: {
405
+ editable: true
406
+ },
407
+ rectangleOptions: {
408
+ editable: true
409
+ }
410
+ });
411
+ f.directions = new c.DirectionsService();
412
+ f.geocoder = null;
413
+ f.traffic = null;
414
+ f.bicycling = null;
415
+ f.weather = null;
416
+ f.cloud = null;
417
+ f.panoramio = null;
418
+ f.adunit = null;
419
+ f.markers = [];
420
+ f.polyline = [];
421
+ f.polygon = [];
422
+ f.rectangle = [];
423
+ f.circle = [];
424
+ f.direction = [];
425
+ f.infowindow = null;
426
+ c.event.addListener(f.map, "center_changed", function() {
427
+ var h = f.map.getCenter();
428
+ d("#intergeo_map_lat").val(h.lat());
429
+ d("#intergeo_map_lng").val(h.lng())
430
+ });
431
+ c.event.addListener(f.map, "zoom_changed", function() {
432
+ d("#intergeo_map_zoom").val(f.map.getZoom())
433
+ });
434
+ c.event.addListener(f.drawing, "overlaycomplete", function(h) {
435
+ switch (h.type) {
436
+ case c.drawing.OverlayType.MARKER:
437
+ f._markerComplete(h);
438
+ break;
439
+ case c.drawing.OverlayType.CIRCLE:
440
+ f._polyComplete(h, "circle", b.Circle);
441
+ break;
442
+ case c.drawing.OverlayType.POLYGON:
443
+ f._polyComplete(h, "polygon", b.Polygon);
444
+ break;
445
+ case c.drawing.OverlayType.POLYLINE:
446
+ f._polyComplete(h, "polyline", b.Polyline);
447
+ break;
448
+ case c.drawing.OverlayType.RECTANGLE:
449
+ f._polyComplete(h, "rectangle", b.Rectangle);
450
+ break
451
+ }
452
+ });
453
+ f._initOverlays()
454
+ };
455
+ a.Styles = {
456
+ DEFAULT: [],
457
+ RED: [{
458
+ featureType: "all",
459
+ stylers: [{
460
+ hue: "#ff0000"
461
+ }]
462
+ }],
463
+ NIGHT: [{
464
+ featureType: "all",
465
+ stylers: [{
466
+ invert_lightness: "true"
467
+ }]
468
+ }],
469
+ BLUE: [{
470
+ featureType: "all",
471
+ stylers: [{
472
+ hue: "#0000b0"
473
+ }, {
474
+ invert_lightness: "true"
475
+ }, {
476
+ saturation: -30
477
+ }]
478
+ }],
479
+ GREYSCALE: [{
480
+ featureType: "all",
481
+ stylers: [{
482
+ saturation: -100
483
+ }, {
484
+ gamma: 0.5
485
+ }]
486
+ }],
487
+ NO_ROADS: [{
488
+ featureType: "road",
489
+ stylers: [{
490
+ visibility: "off"
491
+ }]
492
+ }],
493
+ MIXED: [{
494
+ featureType: "landscape",
495
+ stylers: [{
496
+ hue: "#00dd00"
497
+ }]
498
+ }, {
499
+ featureType: "road",
500
+ stylers: [{
501
+ hue: "#dd0000"
502
+ }]
503
+ }, {
504
+ featureType: "water",
505
+ stylers: [{
506
+ hue: "#000040"
507
+ }]
508
+ }, {
509
+ featureType: "poi.park",
510
+ stylers: [{
511
+ visibility: "off"
512
+ }]
513
+ }, {
514
+ featureType: "road.arterial",
515
+ stylers: [{
516
+ hue: "#ffff00"
517
+ }]
518
+ }, {
519
+ featureType: "road.local",
520
+ stylers: [{
521
+ visibility: "off"
522
+ }]
523
+ }],
524
+ CHILLED: [{
525
+ featureType: "road",
526
+ elementType: "geometry",
527
+ stylers: [{
528
+ visibility: "simplified"
529
+ }]
530
+ }, {
531
+ featureType: "road.arterial",
532
+ stylers: [{
533
+ hue: 149
534
+ }, {
535
+ saturation: -78
536
+ }, {
537
+ lightness: 0
538
+ }]
539
+ }, {
540
+ featureType: "road.highway",
541
+ stylers: [{
542
+ hue: -31
543
+ }, {
544
+ saturation: -40
545
+ }, {
546
+ lightness: 2.8
547
+ }]
548
+ }, {
549
+ featureType: "poi",
550
+ elementType: "label",
551
+ stylers: [{
552
+ visibility: "off"
553
+ }]
554
+ }, {
555
+ featureType: "landscape",
556
+ stylers: [{
557
+ hue: 163
558
+ }, {
559
+ saturation: -26
560
+ }, {
561
+ lightness: -1.1
562
+ }]
563
+ }, {
564
+ featureType: "transit",
565
+ stylers: [{
566
+ visibility: "off"
567
+ }]
568
+ }, {
569
+ featureType: "water",
570
+ stylers: [{
571
+ hue: 3
572
+ }, {
573
+ saturation: -24.24
574
+ }, {
575
+ lightness: -38.57
576
+ }]
577
+ }]
578
+ };
579
+ a.prototype = {
580
+ _initOverlays: function() {
581
+ var e = this;
582
+ d(".intergeo_tlbr_marker").each(function(f, i) {
583
+ var h = d(i),
584
+ g = h.find(".intergeo_tlbr_marker_location").val().split(",");
585
+ e.markers.push(new b.Marker(e, new c.Marker({
586
+ position: new c.LatLng(parseFloat(g[0]), parseFloat(g[1])),
587
+ map: e.map,
588
+ title: h.find(".intergeo_tlbr_marker_title").val(),
589
+ icon: h.find(".intergeo_tlbr_marker_icon").val(),
590
+ draggable: true
591
+ }), h, f))
592
+ });
593
+ d(".intergeo_tlbr_polyline").each(function(f, j) {
594
+ var i = d(j),
595
+ g = d.trim(i.find(".intergeo_tlbr_polyline_color").val()),
596
+ h = parseFloat(i.find(".intergeo_tlbr_polyline_opacity").val()),
597
+ k = parseInt(i.find(".intergeo_tlbr_polyline_weight").val());
598
+ e.polyline.push(new b.Polyline(e, new c.Polyline({
599
+ map: e.map,
600
+ path: b.PolyOverlay.stringToPath(i, ".intergeo_tlbr_polyline_path"),
601
+ editable: true,
602
+ strokeColor: g.length == 0 ? "#000000" : g,
603
+ strokeOpacity: isNaN(h) ? 1 : h,
604
+ strokeWeight: isNaN(k) ? 3 : k
605
+ }), i, f))
606
+ });
607
+ d(".intergeo_tlbr_polygon").each(function(f, i) {
608
+ var h = d(i),
609
+ l = d.trim(h.find(".intergeo_tlbr_polygon_fill_color").val()),
610
+ g = parseFloat(h.find(".intergeo_tlbr_polygon_fill_opacity").val()),
611
+ k = d.trim(h.find(".intergeo_tlbr_polygon_stroke_color").val()),
612
+ m = parseFloat(h.find(".intergeo_tlbr_polygon_stroke_opacity").val()),
613
+ f = d.trim(h.find(".intergeo_tlbr_plygon_position").val()),
614
+ j = parseInt(h.find(".intergeo_tlbr_polygon_weight").val());
615
+ e.polygon.push(new b.Polygon(e, new c.Polygon({
616
+ map: e.map,
617
+ path: b.PolyOverlay.stringToPath(h, ".intergeo_tlbr_polygon_path"),
618
+ editable: true,
619
+ fillColor: l.length == 0 ? "#000000" : l,
620
+ fillOpacity: isNaN(g) ? 0.3 : g,
621
+ strokeColor: k.length == 0 ? "#000000" : k,
622
+ strokeOpacity: isNaN(m) ? 1 : m,
623
+ strokePosition: c.StrokePosition[f] || c.StrokePosition.CENTER,
624
+ strokeWeight: isNaN(j) ? 3 : j
625
+ }), h, f))
626
+ });
627
+ d(".intergeo_tlbr_rectangle").each(function(f, i) {
628
+ var h = d(i),
629
+ l = d.trim(h.find(".intergeo_tlbr_rectangle_fill_color").val()),
630
+ g = parseFloat(h.find(".intergeo_tlbr_rectangle_fill_opacity").val()),
631
+ k = d.trim(h.find(".intergeo_tlbr_rectangle_stroke_color").val()),
632
+ m = parseFloat(h.find(".intergeo_tlbr_rectangle_stroke_opacity").val()),
633
+ f = d.trim(h.find(".intergeo_tlbr_rectangle_position").val()),
634
+ j = parseInt(h.find(".intergeo_tlbr_rectangle_weight").val());
635
+ e.rectangle.push(new b.Rectangle(e, new c.Rectangle({
636
+ map: e.map,
637
+ bounds: b.PolyOverlay.stringToBounds(h, ".intergeo_tlbr_rectangle_path"),
638
+ editable: true,
639
+ fillColor: l.length == 0 ? "#000000" : l,
640
+ fillOpacity: isNaN(g) ? 0.3 : g,
641
+ strokeColor: k.length == 0 ? "#000000" : k,
642
+ strokeOpacity: isNaN(m) ? 1 : m,
643
+ strokePosition: c.StrokePosition[f] || c.StrokePosition.CENTER,
644
+ strokeWeight: isNaN(j) ? 3 : j
645
+ }), h, f))
646
+ });
647
+ d(".intergeo_tlbr_circle").each(function(m, j) {
648
+ var l = d(j),
649
+ p = d.trim(l.find(".intergeo_tlbr_circle_fill_color").val()),
650
+ i = parseFloat(l.find(".intergeo_tlbr_circle_fill_opacity").val()),
651
+ h = d.trim(l.find(".intergeo_tlbr_circle_stroke_color").val()),
652
+ g = parseFloat(l.find(".intergeo_tlbr_circle_stroke_opacity").val()),
653
+ o = d.trim(l.find(".intergeo_tlbr_circle_position").val()),
654
+ k = parseInt(l.find(".intergeo_tlbr_circle_weight").val()),
655
+ q = d.trim(l.find(".intergeo_tlbr_circle_path").val()).split(";"),
656
+ f = q[0].split(","),
657
+ n = q[1].split(",");
658
+ e.circle.push(new b.Circle(e, new c.Circle({
659
+ map: e.map,
660
+ center: new c.LatLng(f[0], f[1]),
661
+ radius: parseFloat(n[0]),
662
+ editable: true,
663
+ fillColor: p.length == 0 ? "#000000" : p,
664
+ fillOpacity: isNaN(i) ? 0.3 : i,
665
+ strokeColor: h.length == 0 ? "#000000" : h,
666
+ strokeOpacity: isNaN(g) ? 1 : g,
667
+ strokePosition: c.StrokePosition[o] || c.StrokePosition.CENTER,
668
+ strokeWeight: isNaN(k) ? 3 : k
669
+ }), l, m))
670
+ });
671
+ d(".intergeo_tlbr_drctn").each(function(f, h) {
672
+ var g = d(h),
673
+ l = d.trim(g.find(".intergeo_tlbr_drctn_from").val()),
674
+ k = d.trim(g.find(".intergeo_tlbr_drctn_to").val()),
675
+ j = d.trim(g.find(".intergeo_tlbr_drctn_mode").val()),
676
+ i = {
677
+ origin: l,
678
+ destination: k,
679
+ travelMode: c.TravelMode[j] || c.TravelMode.DRIVING
680
+ };
681
+ e.directions.route(i, function(n, m) {
682
+ if (m == c.DirectionsStatus.OK) {
683
+ var o = new b.Direction(e, new c.DirectionsRenderer({
684
+ map: e.map,
685
+ directions: n
686
+ }), g, f);
687
+ e.direction.push(o)
688
+ } else {
689
+ g.remove();
690
+ e.direction.push(null)
691
+ }
692
+ })
693
+ })
694
+ },
695
+ _markerComplete: function(i) {
696
+ var g = this,
697
+ e = g.markers.length,
698
+ h = d(d("#intergeo_tlbr_marker_tmpl").html().replaceByHash({
699
+ "%pos%": e,
700
+ "%num%": e + 1
701
+ })),
702
+ f = new b.Marker(g, i.overlay, h, e);
703
+ h.find(".intergeo_tlbr_marker_location").val(i.overlay.getPosition().toUrlValue());
704
+ d("#intergeo_tlbr_markers").append(h);
705
+ g.markers.push(f);
706
+ i.overlay.setDraggable(true)
707
+ },
708
+ _polyComplete: function(j, i, h) {
709
+ var f = this,
710
+ e = f[i].length,
711
+ g = d(d("#intergeo_tlbr_" + i + "_tmpl").html().replaceByHash({
712
+ "%pos%": e,
713
+ "%num%": e + 1
714
+ })),
715
+ k = new h(f, j.overlay, g, e);
716
+ f[i].push(k);
717
+ g.find(".intergeo_tlbr_" + i + "_path").val(k.pathToString());
718
+ d("#intergeo_tlbr_" + i + "s").append(g)
719
+ },
720
+ _normalize: function(h) {
721
+ var g = function(j) {
722
+ return j === "1"
723
+ },
724
+ f = function(j, k, l) {
725
+ return k[j] || l
726
+ },
727
+ e = function(j) {
728
+ return f(j, c.ControlPosition, 0)
729
+ },
730
+ i = {
731
+ minZoom: parseInt,
732
+ maxZoom: parseInt,
733
+ scrollwheel: g,
734
+ draggable: g,
735
+ mapTypeId: function(j) {
736
+ return c.MapTypeId[j] || c.MapTypeId.ROADMAP
737
+ },
738
+ mapTypeControl: g,
739
+ mapTypeControlOptions: {
740
+ position: e,
741
+ mapTypeIds: function(j) {
742
+ var k = [];
743
+ d.each(j, function(l, m) {
744
+ if (c.MapTypeId[m] !== undefined) {
745
+ k.push(c.MapTypeId[m])
746
+ }
747
+ });
748
+ return k
749
+ },
750
+ style: function(j) {
751
+ return f(j, c.MapTypeControlStyle, c.MapTypeControlStyle.DEFAULT)
752
+ }
753
+ },
754
+ overviewMapControl: g,
755
+ overviewMapControlOptions: {
756
+ opened: g
757
+ },
758
+ panControl: g,
759
+ panControlOptions: {
760
+ position: e
761
+ },
762
+ rotateControl: g,
763
+ rotateControlOptions: {
764
+ position: e
765
+ },
766
+ scaleControl: g,
767
+ scaleControlOptions: {
768
+ position: e
769
+ },
770
+ streetViewControl: g,
771
+ streetViewControlOptions: {
772
+ position: e
773
+ },
774
+ zoomControl: g,
775
+ zoomControlOptions: {
776
+ position: e,
777
+ style: function(j) {
778
+ return f(j, c.ZoomControlStyle, c.ZoomControlStyle.DEFAULT)
779
+ }
780
+ }
781
+ };
782
+ return d.each(h, function(j, k) {
783
+ if (i[j] === undefined) {
784
+ delete h[j]
785
+ } else {
786
+ if (typeof k === "string") {
787
+ h[j] = i[j](k)
788
+ } else {
789
+ d.each(k, function(m, l) {
790
+ if (i[j][m] === undefined) {
791
+ delete h[j][m]
792
+ } else {
793
+ h[j][m] = i[j][m](l)
794
+ }
795
+ })
796
+ }
797
+ }
798
+ })
799
+ },
800
+ _traffic: function(f) {
801
+ var e = this;
802
+ if (f.layer.traffic == 1) {
803
+ if (!e.traffic) {
804
+ e.traffic = new c.TrafficLayer()
805
+ }
806
+ e.traffic.setMap(e.map)
807
+ } else {
808
+ if (e.traffic) {
809
+ e.traffic.setMap(null)
810
+ }
811
+ }
812
+ },
813
+ _bicycling: function(f) {
814
+ var e = this;
815
+ if (f.layer.bicycling == 1) {
816
+ if (!e.bicycling) {
817
+ e.bicycling = new c.BicyclingLayer()
818
+ }
819
+ e.bicycling.setMap(e.map)
820
+ } else {
821
+ if (e.bicycling) {
822
+ e.bicycling.setMap(null)
823
+ }
824
+ }
825
+ },
826
+ _weather: function(f) {
827
+ var e = this;
828
+ if (f.layer.weather == 1) {
829
+ if (!e.weather) {
830
+ e.weather = new c.weather.WeatherLayer({})
831
+ }
832
+ e.weather.setMap(e.map);
833
+ e.weather.setOptions({
834
+ temperatureUnits: c.weather.TemperatureUnit[f.weather.temperatureUnits] || c.weather.TemperatureUnit.CELSIUS,
835
+ windSpeedUnits: c.weather.WindSpeedUnit[f.weather.windSpeedUnits] || c.weather.WindSpeedUnit.METERS_PER_SECOND
836
+ })
837
+ } else {
838
+ if (e.weather) {
839
+ e.weather.setMap(null)
840
+ }
841
+ }
842
+ },
843
+ _cloud: function(f) {
844
+ var e = this;
845
+ if (f.layer.cloud == 1) {
846
+ if (!e.cloud) {
847
+ e.cloud = new c.weather.CloudLayer()
848
+ }
849
+ e.cloud.setMap(e.map)
850
+ } else {
851
+ if (e.cloud) {
852
+ e.cloud.setMap(null)
853
+ }
854
+ }
855
+ },
856
+ _panoramio: function(f) {
857
+ var e = this;
858
+ if (f.layer.panoramio == 1) {
859
+ if (!e.panoramio) {
860
+ e.panoramio = new c.panoramio.PanoramioLayer({})
861
+ }
862
+ e.panoramio.setMap(e.map);
863
+ e.panoramio.setTag(f.panoramio.tag);
864
+ e.panoramio.setUserId(f.panoramio.userId)
865
+ } else {
866
+ if (e.panoramio) {
867
+ e.panoramio.setMap(null)
868
+ }
869
+ }
870
+ },
871
+ _adsense: function(f) {
872
+ var e = this;
873
+ if (f.layer.adsense == 1 && intergeo_options.adsense.publisher_id && d.trim(intergeo_options.adsense.publisher_id) != "") {
874
+ if (!e.adunit) {
875
+ e.adunit = new c.adsense.AdUnit(document.createElement("div"), {
876
+ visible: true,
877
+ publisherId: intergeo_options.adsense.publisher_id
878
+ })
879
+ }
880
+ e.adunit.setMap(this.map);
881
+ e.adunit.setBackgroundColor(f.adsense.backgroundColor);
882
+ e.adunit.setBorderColor(f.adsense.borderColor);
883
+ e.adunit.setUrlColor(f.adsense.urlColor);
884
+ e.adunit.setTitleColor(f.adsense.titleColor);
885
+ e.adunit.setTextColor(f.adsense.textColor);
886
+ if (c.ControlPosition[f.adsense.position] !== undefined) {
887
+ e.adunit.setPosition(c.ControlPosition[f.adsense.position])
888
+ }
889
+ if (c.adsense.AdFormat[f.adsense.format]) {
890
+ e.adunit.setFormat(c.adsense.AdFormat[f.adsense.format])
891
+ }
892
+ } else {
893
+ if (e.adunit) {
894
+ e.adunit.setMap(null)
895
+ }
896
+ }
897
+ },
898
+ _pro: function(f){
899
+ var e = this;
900
+ if(window._proFeatures){
901
+ _proFeatures(f, e);
902
+ }
903
+ },
904
+ createDirection: function() {
905
+ var f = this,
906
+ e = d("#intergeo_drctn_ppp"),
907
+ g = e.find(".intergeo_ppp_frm");
908
+ g.bind("submit.firsttime", function() {
909
+ var h, i, j, l, k;
910
+ if (g.attr("data-position") != "") {
911
+ return false
912
+ }
913
+ h = f.direction.length;
914
+ l = d.trim(g.find("#intergeo_ppp_drctn_from").val());
915
+ k = d.trim(g.find("#intergeo_ppp_drctn_to").val());
916
+ if (l == "" || k == "") {
917
+ return false
918
+ }
919
+ j = d(d("#intergeo_tlbr_drctn_tmpl").html().replaceByHash({
920
+ "%pos%": h,
921
+ "%num%": h + 1,
922
+ "%from%": l,
923
+ "%to%": k,
924
+ "%mode%": d.trim(g.find("#intergeo_ppp_drctn_mode option:selected").text())
925
+ }));
926
+ i = new b.Direction(f, new c.DirectionsRenderer({
927
+ map: f.map
928
+ }), j, h);
929
+ d("#intergeo_tlbr_drctns").append(j);
930
+ f.direction.push(i);
931
+ i.update(g);
932
+ g.unbind("submit.firsttime");
933
+ return false
934
+ });
935
+ g.find('select,input[type!="submit"]').val("");
936
+ g.attr("data-position", "");
937
+ e.fadeIn(150)
938
+ },
939
+ updateOverlays: function() {
940
+ var e = this;
941
+ d.each(e.polyline, function(g, f) {
942
+ if (f) {
943
+ d('.intergeo_tlbr_polyline_path[data-position="' + g + '"]').val(f.pathToString())
944
+ }
945
+ });
946
+ d.each(e.polygon, function(g, f) {
947
+ if (f) {
948
+ d('.intergeo_tlbr_polygon_path[data-position="' + g + '"]').val(f.pathToString())
949
+ }
950
+ })
951
+ },
952
+ preview: function() {
953
+ var f = this,
954
+ g = {};
955
+ d.each(d("#intergeo_frm").serializeArray(), function() {
956
+ var l = /\[\]$/,
957
+ m = g,
958
+ j = this.name.replace(l, "").split("_"),
959
+ e = j.pop(),
960
+ k = this.value || "",
961
+ i = l.test(this.name);
962
+ d.each(j, function(n, o) {
963
+ if (m[o] === undefined) {
964
+ m[o] = {}
965
+ }
966
+ m = m[o]
967
+ });
968
+ if (m[e] !== undefined) {
969
+ if (i) {
970
+ m[e].push(k)
971
+ } else {
972
+ m[e] = k
973
+ }
974
+ } else {
975
+ m[e] = i ? [k] : k
976
+ }
977
+ });
978
+ f._normalize(g.map);
979
+ if (d("#intergeo_map_lock_preview").is(":checked")) {
980
+ g.map.draggable = false;
981
+ g.map.scrollwheel = false
982
+ }
983
+ f.map.setOptions(g.map);
984
+ if (g.styles && g.styles.type) {
985
+ if (g.styles.type == -1) {
986
+ try {
987
+ f.map.setOptions({
988
+ styles: d.parseJSON(g.styles.custom || "[]")
989
+ })
990
+ } catch (h) {
991
+ alert(intergeo_options.l10n.error.style)
992
+ }
993
+ } else {
994
+ if (a.Styles[g.styles.type] !== undefined) {
995
+ f.map.setOptions({
996
+ styles: a.Styles[g.styles.type]
997
+ })
998
+ }
999
+ }
1000
+ }
1001
+ f._traffic(g);
1002
+ f._bicycling(g);
1003
+ f._weather(g);
1004
+ f._cloud(g);
1005
+ f._panoramio(g);
1006
+ f._adsense(g);
1007
+ f._pro(g);
1008
+ }
1009
+ };
1010
+ d(document).ready(function() {
1011
+ var g, f, e;
1012
+ f = new a("intergeo_canvas", {
1013
+ center: new c.LatLng(parseFloat(d("#intergeo_map_lat").val()), parseFloat(d("#intergeo_map_lng").val())),
1014
+ zoom: parseInt(d("#intergeo_map_zoom").val()),
1015
+ minZoom: 0,
1016
+ maxZoom: 19,
1017
+ mapTypeId: c.MapTypeId.ROADMAP
1018
+ });
1019
+ var xxxx = window.dialogArguments || opener || parent || top;
1020
+ xxxx.intergeo_maps_current = f;
1021
+ e = d("#intergeo_frm");
1022
+ e.find("input[name], select[name], textarea[name]").not("input[type='file']").change(function() {
1023
+ f.preview()
1024
+ });
1025
+ e.find(".intergeo_tlbr_cntrl_onkeyup").keyup(function() {
1026
+ f.preview()
1027
+ });
1028
+ e.submit(function() {
1029
+ f.updateOverlays();
1030
+ return true
1031
+ });
1032
+ f.preview();
1033
+ d("#intergeo_map_lock_preview").change(function() {
1034
+ var h = d(this).is(":checked");
1035
+ f.map.setOptions({
1036
+ draggable: !h,
1037
+ scrollwheel: !h
1038
+ })
1039
+ });
1040
+ d(".intergeo_tlbr_ul_li_h3").click(function() {
1041
+ var h = d(this).parent();
1042
+ if (h.hasClass("open")) {
1043
+ h.removeClass("open")
1044
+ } else {
1045
+ d(".intergeo_tlbr_ul_li.open").removeClass("open");
1046
+ h.addClass("open")
1047
+ }
1048
+ });
1049
+ d(".intergeo_tlbr_cntrl_more_info").click(function() {
1050
+ d(this).parent().nextAll(".intergeo_tlbr_cntrl_dsc:first").toggle();
1051
+ return false
1052
+ });
1053
+ d(".intergeo_tlbr_cntrl_ttl").click(function() {
1054
+ d(this).toggleClass("open").parent().find(".intergeo_tlbr_cntrl_items").toggle();
1055
+ return false
1056
+ });
1057
+ d(".color-picker-hex").wpColorPicker({
1058
+ change: function() {
1059
+ clearTimeout(g);
1060
+ g = setTimeout(function() {
1061
+ f.preview()
1062
+ }, 500)
1063
+ }
1064
+ });
1065
+ d(".intergeo_tlbr_clr").wpColorPicker();
1066
+ d("#intergeo_show_map_center").change(function() {
1067
+ d("#intergeo_canvas_center").toggle();
1068
+ d.post(intergeo_options.ajaxurl, {
1069
+ action: "intergeo_show_map_center",
1070
+ nonce: intergeo_options.nonce || "",
1071
+ status: d(this).is(":checked") ? 1 : 0
1072
+ })
1073
+ });
1074
+ d("#intergeo_tlbr_drawing_tools").change(function() {
1075
+ f.drawing.setDrawingMode(null);
1076
+ f.drawing.setOptions({
1077
+ drawingControl: d(this).is(":checked")
1078
+ })
1079
+ });
1080
+ d(".intergeo_ppp_cls").click(function() {
1081
+ d(this).parents(".intergeo_ppp").fadeOut(150);
1082
+ return false
1083
+ });
1084
+ d("#intergeo_go_to_address").click(function() {
1085
+ d("#intergeo_address_ppp").fadeIn(150);
1086
+ return false
1087
+ });
1088
+ d("#intergeo_address_ppp .intergeo_ppp_frm").submit(function() {
1089
+ var h = d(this),
1090
+ j = h.find(".intergeo_ppp_txt"),
1091
+ i = d.trim(j.val());
1092
+ if (i != "") {
1093
+ if (!f.geocoder) {
1094
+ f.geocoder = new c.Geocoder()
1095
+ }
1096
+ f.geocoder.geocode({
1097
+ address: i
1098
+ }, function(l, k) {
1099
+ if (k == c.GeocoderStatus.OK) {
1100
+ f.map.setCenter(l[0].geometry.location)
1101
+ }
1102
+ })
1103
+ }
1104
+ j.val("");
1105
+ h.parents(".intergeo_ppp").fadeOut(150);
1106
+ return false
1107
+ });
1108
+ d(".intregeo_ppp_frm_overlay").submit(function() {
1109
+ var j = d(this),
1110
+ h = parseInt(j.attr("data-position")),
1111
+ i = j.attr("data-target");
1112
+ j.parents(".intergeo_ppp").fadeOut(150);
1113
+ if (f[i] && f[i][h]) {
1114
+ f[i][h].update(j)
1115
+ }
1116
+ return false
1117
+ });
1118
+ d("#intergeo_tlbr_new_drctn").click(function() {
1119
+ f.createDirection();
1120
+ return false
1121
+ })
1122
+ })
1123
+ })(jQuery, google.maps, intergeo.maps);
js/rendering.js CHANGED
@@ -1 +1,446 @@
1
- (function(c,b){var a=function(d,f){var e=this;e.map=null;e.container=document.getElementById(d);e.options=f;e.infowindow=null;e._normalizeOptions()};a.styles={DEFAULT:[],RED:[{featureType:"all",stylers:[{hue:"#ff0000"}]}],NIGHT:[{featureType:"all",stylers:[{invert_lightness:"true"}]}],BLUE:[{featureType:"all",stylers:[{hue:"#0000b0"},{invert_lightness:"true"},{saturation:-30}]}],GREYSCALE:[{featureType:"all",stylers:[{saturation:-100},{gamma:0.5}]}],NO_ROADS:[{featureType:"road",stylers:[{visibility:"off"}]}],MIXED:[{featureType:"landscape",stylers:[{hue:"#00dd00"}]},{featureType:"road",stylers:[{hue:"#dd0000"}]},{featureType:"water",stylers:[{hue:"#000040"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"road.arterial",stylers:[{hue:"#ffff00"}]},{featureType:"road.local",stylers:[{visibility:"off"}]}],CHILLED:[{featureType:"road",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{hue:149},{saturation:-78},{lightness:0}]},{featureType:"road.highway",stylers:[{hue:-31},{saturation:-40},{lightness:2.8}]},{featureType:"poi",elementType:"label",stylers:[{visibility:"off"}]},{featureType:"landscape",stylers:[{hue:163},{saturation:-26},{lightness:-1.1}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"water",stylers:[{hue:3},{saturation:-24.24},{lightness:-38.57}]}]};a.prototype={};a.prototype._normalizeOptions=function(){var g=this.options.map||{},f=function(i){return i==="1"},e=function(i,j,k){return j[i]||k},d=function(i){return e(i,b.ControlPosition,0)},h={minZoom:parseInt,maxZoom:parseInt,scrollwheel:f,draggable:f,mapTypeId:function(i){return b.MapTypeId[i]||b.MapTypeId.ROADMAP},mapTypeControl:f,mapTypeControlOptions:{position:d,mapTypeIds:function(i){var j=[];c.each(i,function(k,l){if(b.MapTypeId[l]!==undefined){j.push(b.MapTypeId[l])}});return j},style:function(i){return e(i,b.MapTypeControlStyle,b.MapTypeControlStyle.DEFAULT)}},overviewMapControl:f,overviewMapControlOptions:{opened:f},panControl:f,panControlOptions:{position:d},rotateControl:f,rotateControlOptions:{position:d},scaleControl:f,scaleControlOptions:{position:d},streetViewControl:f,streetViewControlOptions:{position:d},zoomControl:f,zoomControlOptions:{position:d,style:function(i){return e(i,b.ZoomControlStyle,b.ZoomControlStyle.DEFAULT)}}};return c.each(g,function(i,j){if(h[i]===undefined){delete g[i]}else{if(typeof j==="boolean"){j=j?"1":"0";}if(typeof j==="string"){g[i]=h[i](j)}else{c.each(j,function(l,k){if(h[i][l]===undefined){delete g[i][l]}else{g[i][l]=h[i][l](k)}})}}})};a.prototype._getGeocoder=function(){if(!a._geocoder){a._geocoder=new b.Geocoder()}return a._geocoder};a.prototype._renderOverlays=function(){var d=this;c.each(d.options.overlays.marker||[],function(h,g){var f;try{f=new b.Marker({position:new b.LatLng(g.position[0],g.position[1]),map:d.map,title:g.title||"",icon:g.icon||null});b.event.addListener(f,"click",function(){var i,e=c.trim(g.info||"");if(e.length){if(d.infowindow){d.infowindow.close()}i=new b.InfoWindow();i.setContent(e);i.open(d.map,f);d.infowindow=i}})}catch(j){}});c.each(d.options.overlays.polyline||[],function(g,f){var j=[];c.each(f.path||[],function(i,e){if(e.length==2){j.push(new b.LatLng(e[0],e[1]))}});if(j.length>=2){try{new b.Polyline({map:d.map,path:j,strokeColor:f.color||"#000000",strokeOpacity:f.opacity||1,strokeWeight:f.weight||3})}catch(h){}}});c.each(d.options.overlays.polygon||[],function(g,f){var j=[];c.each(f.path||[],function(i,e){if(e.length==2){j.push(new b.LatLng(e[0],e[1]))}});if(j.length>=2){try{new b.Polygon({map:d.map,path:j,strokeColor:f.stroke_color||"#000000",strokeOpacity:f.stroke_opacity||1,strokeWeight:f.weight||3,strokePosition:b.StrokePosition[f.position]||b.StrokePosition.CENTER,fillColor:f.fill_color||"#000000",fillOpacity:f.fill_opacity||0.3})}catch(h){}}});c.each(d.options.overlays.rectangle||[],function(g,f){var j=[];c.each(f.path||[],function(i,e){if(e.length==2){j.push(new b.LatLng(e[0],e[1]))}});if(j.length==2){try{new b.Rectangle({map:d.map,bounds:new b.LatLngBounds(j[0],j[1]),strokeColor:f.stroke_color||"#000000",strokeOpacity:f.stroke_opacity||1,strokeWeight:f.weight||3,strokePosition:b.StrokePosition[f.position]||b.StrokePosition.CENTER,fillColor:f.fill_color||"#000000",fillOpacity:f.fill_opacity||0.3})}catch(h){}}});c.each(d.options.overlays.circle||[],function(g,f){try{new b.Circle({map:d.map,center:new b.LatLng(f.path[0][0],f.path[0][1]),radius:parseFloat(f.path[1][0]),strokeColor:f.stroke_color||"#000000",strokeOpacity:f.stroke_opacity||1,strokeWeight:f.weight||3,strokePosition:b.StrokePosition[f.position]||b.StrokePosition.CENTER,fillColor:f.fill_color||"#000000",fillOpacity:f.fill_opacity||0.3})}catch(h){}})};a.prototype._renderDirections=function(){var e=this,d=new b.DirectionsService();c.each(e.options.directions||[],function(g,f){d.route({origin:f.from,destination:f.to,travelMode:b.TravelMode[f.mode]||b.TravelMode.DRIVING},function(i,h){if(h==b.DirectionsStatus.OK){new b.DirectionsRenderer({map:e.map,directions:i})}})})};a.prototype.render=function(){var d=this,j=d.options.layer||{},i=d.options.weather||{},g=d.options.panoramio||{},k=null,f=d.options.adsense||{};if(!d.container){return false}d.map=new b.Map(d.container,c.extend({center:new b.LatLng(d.options.lat||48.1366069,d.options.lng||11.577085099999977),zoom:d.options.zoom||5,mapTypeId:b.MapTypeId.ROADMAP},d.options.map||{}));if(d.options.styles&&d.options.styles.type){if(d.options.styles.type==-1){try{d.map.setOptions({styles:d.options.styles.custom||[]})}catch(h){}}else{if(a.styles[d.options.styles.type]!==undefined){d.map.setOptions({styles:a.styles[d.options.styles.type]})}}}if(d.options.address){d._getGeocoder().geocode({address:d.options.address},function(l,e){if(e==b.GeocoderStatus.OK){d.map.setCenter(l[0].geometry.location)}})}if(d.options.overlays){d._renderOverlays()}if(d.options.directions){d._renderDirections()}if(j.traffic){(new b.TrafficLayer()).setMap(d.map)}if(j.bicycling){(new b.BicyclingLayer()).setMap(d.map)}if(j.weather){new b.weather.WeatherLayer({map:d.map,temperatureUnits:b.weather.TemperatureUnit[i.temperatureUnits||"CELSIUS"],windSpeedUnits:b.weather.WindSpeedUnit[i.windSpeedUnits||"METERS_PER_SECOND"]})}if(j.cloud){(new b.weather.CloudLayer()).setMap(d.map)}if(j.panoramio){new b.panoramio.PanoramioLayer({map:d.map,tag:g.tag||"",userId:g.userId||""})}if(j.adsense&&intergeo_options.adsense.publisher_id&&c.trim(intergeo_options.adsense.publisher_id)!=""){k=new b.adsense.AdUnit(document.createElement("div"),{map:d.map,visible:true,publisherId:intergeo_options.adsense.publisher_id,backgroundColor:f.backgroundColor||"",borderColor:f.borderColor||"",textColor:f.urlColor||"",titleColor:f.titleColor||"",urlColor:f.textColor||""});if(f.position&&b.ControlPosition[f.position]){k.setPosition(b.ControlPosition[f.position])}if(f.format&&b.adsense.AdFormat[f.format]){k.setFormat(b.adsense.AdFormat[f.format])}}return true};c(document).ready(function(){var d,e,f=window.intergeo_maps||[];for(d=0;d<f.length;d++){e=new a(f[d].container,f[d].options);e.render()}})})(jQuery,google.maps);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(c, b) {
2
+ var a = function(d, f) {
3
+ var e = this;
4
+ e.map = null;
5
+ e.container = document.getElementById(d);
6
+ e.options = f;
7
+ e.infowindow = null;
8
+ e._normalizeOptions()
9
+ };
10
+ a.styles = {
11
+ DEFAULT: [],
12
+ RED: [{
13
+ featureType: "all",
14
+ stylers: [{
15
+ hue: "#ff0000"
16
+ }]
17
+ }],
18
+ NIGHT: [{
19
+ featureType: "all",
20
+ stylers: [{
21
+ invert_lightness: "true"
22
+ }]
23
+ }],
24
+ BLUE: [{
25
+ featureType: "all",
26
+ stylers: [{
27
+ hue: "#0000b0"
28
+ }, {
29
+ invert_lightness: "true"
30
+ }, {
31
+ saturation: -30
32
+ }]
33
+ }],
34
+ GREYSCALE: [{
35
+ featureType: "all",
36
+ stylers: [{
37
+ saturation: -100
38
+ }, {
39
+ gamma: 0.5
40
+ }]
41
+ }],
42
+ NO_ROADS: [{
43
+ featureType: "road",
44
+ stylers: [{
45
+ visibility: "off"
46
+ }]
47
+ }],
48
+ MIXED: [{
49
+ featureType: "landscape",
50
+ stylers: [{
51
+ hue: "#00dd00"
52
+ }]
53
+ }, {
54
+ featureType: "road",
55
+ stylers: [{
56
+ hue: "#dd0000"
57
+ }]
58
+ }, {
59
+ featureType: "water",
60
+ stylers: [{
61
+ hue: "#000040"
62
+ }]
63
+ }, {
64
+ featureType: "poi.park",
65
+ stylers: [{
66
+ visibility: "off"
67
+ }]
68
+ }, {
69
+ featureType: "road.arterial",
70
+ stylers: [{
71
+ hue: "#ffff00"
72
+ }]
73
+ }, {
74
+ featureType: "road.local",
75
+ stylers: [{
76
+ visibility: "off"
77
+ }]
78
+ }],
79
+ CHILLED: [{
80
+ featureType: "road",
81
+ elementType: "geometry",
82
+ stylers: [{
83
+ visibility: "simplified"
84
+ }]
85
+ }, {
86
+ featureType: "road.arterial",
87
+ stylers: [{
88
+ hue: 149
89
+ }, {
90
+ saturation: -78
91
+ }, {
92
+ lightness: 0
93
+ }]
94
+ }, {
95
+ featureType: "road.highway",
96
+ stylers: [{
97
+ hue: -31
98
+ }, {
99
+ saturation: -40
100
+ }, {
101
+ lightness: 2.8
102
+ }]
103
+ }, {
104
+ featureType: "poi",
105
+ elementType: "label",
106
+ stylers: [{
107
+ visibility: "off"
108
+ }]
109
+ }, {
110
+ featureType: "landscape",
111
+ stylers: [{
112
+ hue: 163
113
+ }, {
114
+ saturation: -26
115
+ }, {
116
+ lightness: -1.1
117
+ }]
118
+ }, {
119
+ featureType: "transit",
120
+ stylers: [{
121
+ visibility: "off"
122
+ }]
123
+ }, {
124
+ featureType: "water",
125
+ stylers: [{
126
+ hue: 3
127
+ }, {
128
+ saturation: -24.24
129
+ }, {
130
+ lightness: -38.57
131
+ }]
132
+ }]
133
+ };
134
+ a.prototype = {};
135
+ a.prototype._normalizeOptions = function() {
136
+ var g = this.options.map || {},
137
+ f = function(i) {
138
+ return i === "1"
139
+ },
140
+ e = function(i, j, k) {
141
+ return j[i] || k
142
+ },
143
+ d = function(i) {
144
+ return e(i, b.ControlPosition, 0)
145
+ },
146
+ h = {
147
+ minZoom: parseInt,
148
+ maxZoom: parseInt,
149
+ scrollwheel: f,
150
+ draggable: f,
151
+ mapTypeId: function(i) {
152
+ return b.MapTypeId[i] || b.MapTypeId.ROADMAP
153
+ },
154
+ mapTypeControl: f,
155
+ mapTypeControlOptions: {
156
+ position: d,
157
+ mapTypeIds: function(i) {
158
+ var j = [];
159
+ c.each(i, function(k, l) {
160
+ if (b.MapTypeId[l] !== undefined) {
161
+ j.push(b.MapTypeId[l])
162
+ }
163
+ });
164
+ return j
165
+ },
166
+ style: function(i) {
167
+ return e(i, b.MapTypeControlStyle, b.MapTypeControlStyle.DEFAULT)
168
+ }
169
+ },
170
+ overviewMapControl: f,
171
+ overviewMapControlOptions: {
172
+ opened: f
173
+ },
174
+ panControl: f,
175
+ panControlOptions: {
176
+ position: d
177
+ },
178
+ rotateControl: f,
179
+ rotateControlOptions: {
180
+ position: d
181
+ },
182
+ scaleControl: f,
183
+ scaleControlOptions: {
184
+ position: d
185
+ },
186
+ streetViewControl: f,
187
+ streetViewControlOptions: {
188
+ position: d
189
+ },
190
+ zoomControl: f,
191
+ zoomControlOptions: {
192
+ position: d,
193
+ style: function(i) {
194
+ return e(i, b.ZoomControlStyle, b.ZoomControlStyle.DEFAULT)
195
+ }
196
+ }
197
+ };
198
+ return c.each(g, function(i, j) {
199
+ if (h[i] === undefined) {
200
+ delete g[i]
201
+ } else {
202
+ if (typeof j === "boolean") {
203
+ j = j ? "1" : "0";
204
+ }
205
+ if (typeof j === "string") {
206
+ g[i] = h[i](j)
207
+ } else {
208
+ c.each(j, function(l, k) {
209
+ if (h[i][l] === undefined) {
210
+ delete g[i][l]
211
+ } else {
212
+ g[i][l] = h[i][l](k)
213
+ }
214
+ })
215
+ }
216
+ }
217
+ })
218
+ };
219
+ a.prototype._getGeocoder = function() {
220
+ if (!a._geocoder) {
221
+ a._geocoder = new b.Geocoder()
222
+ }
223
+ return a._geocoder
224
+ };
225
+ a.prototype._renderOverlays = function() {
226
+ var d = this;
227
+ c.each(d.options.overlays.marker || [], function(h, g) {
228
+ var f;
229
+ try {
230
+ f = new b.Marker({
231
+ position: new b.LatLng(g.position[0], g.position[1]),
232
+ map: d.map,
233
+ title: g.title || "",
234
+ icon: g.icon || null
235
+ });
236
+ b.event.addListener(f, "click", function() {
237
+ var i, e = c.trim(g.info || "");
238
+ if (e.length) {
239
+ if (d.infowindow) {
240
+ d.infowindow.close()
241
+ }
242
+ i = new b.InfoWindow();
243
+ i.setContent(e);
244
+ i.open(d.map, f);
245
+ d.infowindow = i
246
+ }
247
+ })
248
+ } catch (j) {}
249
+ });
250
+ c.each(d.options.overlays.polyline || [], function(g, f) {
251
+ var j = [];
252
+ c.each(f.path || [], function(i, e) {
253
+ if (e.length == 2) {
254
+ j.push(new b.LatLng(e[0], e[1]))
255
+ }
256
+ });
257
+ if (j.length >= 2) {
258
+ try {
259
+ new b.Polyline({
260
+ map: d.map,
261
+ path: j,
262
+ strokeColor: f.color || "#000000",
263
+ strokeOpacity: f.opacity || 1,
264
+ strokeWeight: f.weight || 3
265
+ })
266
+ } catch (h) {}
267
+ }
268
+ });
269
+ c.each(d.options.overlays.polygon || [], function(g, f) {
270
+ var j = [];
271
+ c.each(f.path || [], function(i, e) {
272
+ if (e.length == 2) {
273
+ j.push(new b.LatLng(e[0], e[1]))
274
+ }
275
+ });
276
+ if (j.length >= 2) {
277
+ try {
278
+ new b.Polygon({
279
+ map: d.map,
280
+ path: j,
281
+ strokeColor: f.stroke_color || "#000000",
282
+ strokeOpacity: f.stroke_opacity || 1,
283
+ strokeWeight: f.weight || 3,
284
+ strokePosition: b.StrokePosition[f.position] || b.StrokePosition.CENTER,
285
+ fillColor: f.fill_color || "#000000",
286
+ fillOpacity: f.fill_opacity || 0.3
287
+ })
288
+ } catch (h) {}
289
+ }
290
+ });
291
+ c.each(d.options.overlays.rectangle || [], function(g, f) {
292
+ var j = [];
293
+ c.each(f.path || [], function(i, e) {
294
+ if (e.length == 2) {
295
+ j.push(new b.LatLng(e[0], e[1]))
296
+ }
297
+ });
298
+ if (j.length == 2) {
299
+ try {
300
+ new b.Rectangle({
301
+ map: d.map,
302
+ bounds: new b.LatLngBounds(j[0], j[1]),
303
+ strokeColor: f.stroke_color || "#000000",
304
+ strokeOpacity: f.stroke_opacity || 1,
305
+ strokeWeight: f.weight || 3,
306
+ strokePosition: b.StrokePosition[f.position] || b.StrokePosition.CENTER,
307
+ fillColor: f.fill_color || "#000000",
308
+ fillOpacity: f.fill_opacity || 0.3
309
+ })
310
+ } catch (h) {}
311
+ }
312
+ });
313
+ c.each(d.options.overlays.circle || [], function(g, f) {
314
+ try {
315
+ new b.Circle({
316
+ map: d.map,
317
+ center: new b.LatLng(f.path[0][0], f.path[0][1]),
318
+ radius: parseFloat(f.path[1][0]),
319
+ strokeColor: f.stroke_color || "#000000",
320
+ strokeOpacity: f.stroke_opacity || 1,
321
+ strokeWeight: f.weight || 3,
322
+ strokePosition: b.StrokePosition[f.position] || b.StrokePosition.CENTER,
323
+ fillColor: f.fill_color || "#000000",
324
+ fillOpacity: f.fill_opacity || 0.3
325
+ })
326
+ } catch (h) {}
327
+ })
328
+ };
329
+ a.prototype._renderDirections = function() {
330
+ var e = this,
331
+ d = new b.DirectionsService();
332
+ c.each(e.options.directions || [], function(g, f) {
333
+ d.route({
334
+ origin: f.from,
335
+ destination: f.to,
336
+ travelMode: b.TravelMode[f.mode] || b.TravelMode.DRIVING
337
+ }, function(i, h) {
338
+ if (h == b.DirectionsStatus.OK) {
339
+ new b.DirectionsRenderer({
340
+ map: e.map,
341
+ directions: i
342
+ })
343
+ }
344
+ })
345
+ })
346
+ };
347
+ a.prototype.render = function() {
348
+ var d = this,
349
+ j = d.options.layer || {},
350
+ i = d.options.weather || {},
351
+ g = d.options.panoramio || {},
352
+ k = null,
353
+ f = d.options.adsense || {};
354
+ if (!d.container) {
355
+ return false
356
+ }
357
+ d.map = new b.Map(d.container, c.extend({
358
+ center: new b.LatLng(d.options.lat || 48.1366069, d.options.lng || 11.577085099999977),
359
+ zoom: d.options.zoom || 5,
360
+ mapTypeId: b.MapTypeId.ROADMAP
361
+ }, d.options.map || {}));
362
+ if (d.options.styles && d.options.styles.type) {
363
+ if (d.options.styles.type == -1) {
364
+ try {
365
+ d.map.setOptions({
366
+ styles: d.options.styles.custom || []
367
+ })
368
+ } catch (h) {}
369
+ } else {
370
+ if (a.styles[d.options.styles.type] !== undefined) {
371
+ d.map.setOptions({
372
+ styles: a.styles[d.options.styles.type]
373
+ })
374
+ }
375
+ }
376
+ }
377
+ if (d.options.address) {
378
+ d._getGeocoder().geocode({
379
+ address: d.options.address
380
+ }, function(l, e) {
381
+ if (e == b.GeocoderStatus.OK) {
382
+ d.map.setCenter(l[0].geometry.location)
383
+ }
384
+ })
385
+ }
386
+ if (d.options.overlays) {
387
+ d._renderOverlays()
388
+ }
389
+ if (d.options.directions) {
390
+ d._renderDirections()
391
+ }
392
+ if (j.traffic) {
393
+ (new b.TrafficLayer()).setMap(d.map)
394
+ }
395
+ if (j.bicycling) {
396
+ (new b.BicyclingLayer()).setMap(d.map)
397
+ }
398
+ if (j.weather) {
399
+ new b.weather.WeatherLayer({
400
+ map: d.map,
401
+ temperatureUnits: b.weather.TemperatureUnit[i.temperatureUnits || "CELSIUS"],
402
+ windSpeedUnits: b.weather.WindSpeedUnit[i.windSpeedUnits || "METERS_PER_SECOND"]
403
+ })
404
+ }
405
+ if (j.cloud) {
406
+ (new b.weather.CloudLayer()).setMap(d.map)
407
+ }
408
+ if (j.panoramio) {
409
+ new b.panoramio.PanoramioLayer({
410
+ map: d.map,
411
+ tag: g.tag || "",
412
+ userId: g.userId || ""
413
+ })
414
+ }
415
+ if (j.adsense && intergeo_options.adsense.publisher_id && c.trim(intergeo_options.adsense.publisher_id) != "") {
416
+ k = new b.adsense.AdUnit(document.createElement("div"), {
417
+ map: d.map,
418
+ visible: true,
419
+ publisherId: intergeo_options.adsense.publisher_id,
420
+ backgroundColor: f.backgroundColor || "",
421
+ borderColor: f.borderColor || "",
422
+ textColor: f.urlColor || "",
423
+ titleColor: f.titleColor || "",
424
+ urlColor: f.textColor || ""
425
+ });
426
+ if (f.position && b.ControlPosition[f.position]) {
427
+ k.setPosition(b.ControlPosition[f.position])
428
+ }
429
+ if (f.format && b.adsense.AdFormat[f.format]) {
430
+ k.setFormat(b.adsense.AdFormat[f.format])
431
+ }
432
+ }
433
+ var containerID = c(this.container).attr("id");
434
+ var __map = window.intergeo_maps_maps || [];
435
+ __map[containerID] = d.map;
436
+ return true
437
+ };
438
+ c(document).ready(function() {
439
+ var d, e, f = window.intergeo_maps || [];
440
+ for (d = 0; d < f.length; d++) {
441
+ e = new a(f[d].container, f[d].options);
442
+ e.render()
443
+ }
444
+ })
445
+
446
+ })(jQuery, google.maps);
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
- === Intergeo Maps - Google Maps Plugin ===
2
  Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3
  Tags: directions, easy map, google, google map, google map plugin, google maps, latitude, location, longitude, map, map directions, map markers, map plugin, map widget, maps, marker, polygons, polylines, routes, store locator, streetview, wp google map, wp google maps, wp maps,plugin,admin,widget,shortcode,google maps, maps, map, map markers, google, google map, maps api, wp maps, wp google maps, easy map, embed, marker, placemark, icon, geocode, shortcode, custom post type, multisite, marker clustering
4
  Requires at least: 3.5
5
- Tested up to: 4.3
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -11,11 +11,11 @@ A simple, easy and quite powerful Google Maps tool to create, manage and embed c
11
 
12
  == Description ==
13
 
14
- The Intergeo Google Maps plugin is a simple, easy and in the same time quite powerful tool for handling Google Maps in your website. The plugin allows users to create new maps by using powerful UI builder. Created maps could be easily edited and saved with new settings. To increase the speed of creation process the plugin has ability to clone a map with all it's settings. Finally the plugin has attractive library which allows users to browse all maps in the system and delete unnecessary maps.
15
 
16
  The powerful UI builder allows users to:
17
 
18
- * Setup initial position and zooming level of a google map;
19
  * Adjust controls settings and positioning;
20
  * Setup map color styles by using predefined color schemes or by using custom color settings;
21
  * Add overlays like markers, rectangles, circles, polylines and polygons;
@@ -24,17 +24,28 @@ The powerful UI builder allows users to:
24
 
25
  ### Create Google maps with shortcode ###
26
 
27
- To create new maps you just can input simple shortcode into your post, page, text widget or taxonomy description:
28
 
29
  `[intergeo]Your address[/intergeo]`
30
 
31
- This shortcode will be displayed as Google Map centered at specific address. The shortcode could be extended with custom attributes like height, width, zoom, etc. These attributes will setup special settings for a map. The following table describes all possible attributes, which users can use with shortcodes:
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  **Width**
34
- Sets width of the Google maps container. Accepts all valid CSS values as css width property accepts. For example, the value could be set in pixels like 500px, or in percentage like 75%. Default value is 100%.
35
 
36
  **Height**
37
- Sets width of the Google maps container. Accepts all valid CSS values as css height property accepts. For example, the value could be set in pixels like 700px. Default value is 300px.
38
 
39
  **Style**
40
  This attribute allows users to set extra styles for Google map's container element. It accepts all valid css properties and will echo it in the style attribute of the container element. Default value is empty.
@@ -49,13 +60,15 @@ So your shortcode could looks like this one:
49
 
50
  `[intergeo zoom=”12” width=”50%” heigth=”400px” style=”border: 3px solid red; margin: 0 auto;”]Central Park, NY[/intergeo]`
51
 
52
- ### Create a Google map with UI builder ###
 
 
53
 
54
  Another way to create map is to use UI builder. This is more recommended way to build a Google map as this way provides much more features and wide range of settings to customize. To create a map with UI builder, pass following steps:
55
 
56
  1. Create a new post or a page, or just edit existing one;
57
  1. Place the mouse cursor into the content editor, at the place you want to embed a map and click on **Add Media** button above editor toolbar;
58
- 1. When media popup appears, find **Intergeo Google Maps** link in the left sidebar of popup window, click on the link;
59
  1. Now you have to see Intergeo UI builder which allows you to customize your map;
60
  1. Use all tools from right sidebar of the builder to create a map you need;
61
  1. After finishing maps configuration click on **Insert into post** button at the footer of the builder;
@@ -105,3 +118,12 @@ function filter_intergeo_map_settings( $options ) {
105
  4. Bicycling layer and gray styles
106
  5. Overlay settings
107
  6. Markers settings
 
 
 
 
 
 
 
 
 
1
+ === WordPress Google Maps Plugin ===
2
  Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3
  Tags: directions, easy map, google, google map, google map plugin, google maps, latitude, location, longitude, map, map directions, map markers, map plugin, map widget, maps, marker, polygons, polylines, routes, store locator, streetview, wp google map, wp google maps, wp maps,plugin,admin,widget,shortcode,google maps, maps, map, map markers, google, google map, maps api, wp maps, wp google maps, easy map, embed, marker, placemark, icon, geocode, shortcode, custom post type, multisite, marker clustering
4
  Requires at least: 3.5
5
+ Tested up to: 4.4.1
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
11
 
12
  == Description ==
13
 
14
+ The Intergeo Google Maps WordPress plugin is a simple, easy and in the same time quite powerful tool for handling Google Maps in your website. This simple WordPress map plugin allow users to create new maps by using powerful UI builder. Created maps could be easily edited and saved with new settings. To increase the speed of creation process the plugin has ability to clone a map with all it's settings. Finally the plugin has attractive library which allows users to browse all maps in the system and delete unnecessary maps.
15
 
16
  The powerful UI builder allows users to:
17
 
18
+ * Setup initial position and zooming level of a map;
19
  * Adjust controls settings and positioning;
20
  * Setup map color styles by using predefined color schemes or by using custom color settings;
21
  * Add overlays like markers, rectangles, circles, polylines and polygons;
24
 
25
  ### Create Google maps with shortcode ###
26
 
27
+ To create new WordPress maps you just can input simple shortcode into your post, page, text widget or taxonomy description:
28
 
29
  `[intergeo]Your address[/intergeo]`
30
 
31
+ This shortcode will be displayed as Google Maps centered at specific address. The shortcode could be extended with custom attributes like height, width, zoom, etc. These attributes will setup special settings for a map.
32
+
33
+ > **Time-saving features available in the Pro version:**
34
+ >
35
+ > * Custom layers for maps
36
+ > * Import markers in bulk
37
+ > * Priority email support from the developer of the plugin
38
+ > * Support and updates for 1 year
39
+ >
40
+ > **[Learn more about Intergeo Maps Pro](http://themeisle.com/plugins/intergeo-maps-pro/)**
41
+
42
+ The following table describes all possible attributes, which users can use with shortcodes:
43
 
44
  **Width**
45
+ Sets width of the map container. Accepts all valid CSS values as css width property accepts. For example, the value could be set in pixels like 500px, or in percentage like 75%. Default value is 100%.
46
 
47
  **Height**
48
+ Sets width of the map container. Accepts all valid CSS values as css height property accepts. For example, the value could be set in pixels like 700px. Default value is 300px.
49
 
50
  **Style**
51
  This attribute allows users to set extra styles for Google map's container element. It accepts all valid css properties and will echo it in the style attribute of the container element. Default value is empty.
60
 
61
  `[intergeo zoom=”12” width=”50%” heigth=”400px” style=”border: 3px solid red; margin: 0 auto;”]Central Park, NY[/intergeo]`
62
 
63
+ Check-out the <a href="http://themeisle.com/plugins/intergeo-maps-lite/" rel="frield">#1 free Google Maps plugin</a>
64
+
65
+ ### Create map with UI builder ###
66
 
67
  Another way to create map is to use UI builder. This is more recommended way to build a Google map as this way provides much more features and wide range of settings to customize. To create a map with UI builder, pass following steps:
68
 
69
  1. Create a new post or a page, or just edit existing one;
70
  1. Place the mouse cursor into the content editor, at the place you want to embed a map and click on **Add Media** button above editor toolbar;
71
+ 1. When media popup appears, find **Intergeo Maps** link in the left sidebar of popup window, click on the link;
72
  1. Now you have to see Intergeo UI builder which allows you to customize your map;
73
  1. Use all tools from right sidebar of the builder to create a map you need;
74
  1. After finishing maps configuration click on **Insert into post** button at the footer of the builder;
118
  4. Bicycling layer and gray styles
119
  5. Overlay settings
120
  6. Markers settings
121
+
122
+ == Changelog ==
123
+
124
+ = 1.0.2 =
125
+ * Fixed minZoom and maxZoom settings.
126
+
127
+ = 1.0.1 =
128
+ * Fixed compatibility with Wordpress 4.3 versions
129
+
templates/iframe/form.php CHANGED
@@ -1,4 +1,4 @@
1
- <form id="intergeo_frm" method="post"<?php echo !$post_id ? ' target="_parent"' : '' ?>>
2
  <input type="hidden" id="intergeo_map_lat" name="lat" value="<?php echo isset( $json['lat'] ) ? esc_attr( $json['lat'] ) : 48.1366069 ?>">
3
  <input type="hidden" id="intergeo_map_lng" name="lng" value="<?php echo isset( $json['lng'] ) ? esc_attr( $json['lng'] ) : 11.577085099999977 ?>">
4
  <input type="hidden" id="intergeo_map_zoom" name="zoom" value="<?php echo isset( $json['zoom'] ) ? esc_attr( $json['zoom'] ) : 5 ?>">
@@ -27,6 +27,10 @@
27
  <li class="intergeo_tlbr_ul_li">
28
  <?php include INTERGEO_ABSPATH . '/templates/iframe/adsense.php' ?>
29
  </li>
 
 
 
 
30
  </ul>
31
  </div>
32
  <div id="intergeo_canvas_wrapper">
1
+ <form id="intergeo_frm" method="post"<?php echo !$post_id ? ' origtarget="_parent" target="_parent"' : 'origtarget="self"' ?>>
2
  <input type="hidden" id="intergeo_map_lat" name="lat" value="<?php echo isset( $json['lat'] ) ? esc_attr( $json['lat'] ) : 48.1366069 ?>">
3
  <input type="hidden" id="intergeo_map_lng" name="lng" value="<?php echo isset( $json['lng'] ) ? esc_attr( $json['lng'] ) : 11.577085099999977 ?>">
4
  <input type="hidden" id="intergeo_map_zoom" name="zoom" value="<?php echo isset( $json['zoom'] ) ? esc_attr( $json['zoom'] ) : 5 ?>">
27
  <li class="intergeo_tlbr_ul_li">
28
  <?php include INTERGEO_ABSPATH . '/templates/iframe/adsense.php' ?>
29
  </li>
30
+ <?php
31
+ // Added by Ash/Upwork
32
+ include_once trailingslashit(dirname(__FILE__)) . "extra.php";
33
+ ?>
34
  </ul>
35
  </div>
36
  <div id="intergeo_canvas_wrapper">
templates/iframe/layers.php CHANGED
@@ -124,4 +124,26 @@
124
  </p>
125
  </div>
126
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  </ul>
124
  </p>
125
  </div>
126
  </li>
127
+
128
+ <?php
129
+ // Added by Ash/Upwork
130
+ if( defined( 'IntergeoMaps_Pro' ) ){
131
+ global $IntergeoMaps_Pro;
132
+ $IntergeoMaps_Pro->addForm("layers", $json);
133
+ }else{
134
+ ?>
135
+ <li class="intergeo_tlbr_ul_li_ul_li">
136
+ <span class="intergeo_tlbr_cntrl_ttl"><?php esc_html_e( 'Custom layer', INTERGEO_PLUGIN_NAME ) ?></span>
137
+ <div class="intergeo_tlbr_cntrl_items">
138
+ <div class="intergeo_tlbr_cntrl_item">
139
+ <p class="intergeo_tlbr_grp_dsc">
140
+ <a>Custom Layers are available in the PRO version</a>
141
+ </p>
142
+ </div>
143
+ </div>
144
+ </li>
145
+ <?php
146
+ }
147
+ // Added by Ash/Upwork
148
+ ?>
149
  </ul>
templates/library/list.php CHANGED
@@ -7,6 +7,7 @@
7
  <script type="text/javascript">
8
  /* <![CDATA[ */
9
  window.intergeo_maps = [];
 
10
  /* ]]> */
11
  </script>
12
 
7
  <script type="text/javascript">
8
  /* <![CDATA[ */
9
  window.intergeo_maps = [];
10
+ window.intergeo_maps_maps = [];
11
  /* ]]> */
12
  </script>
13