Changeset 2380871
- Timestamp:
- 09/14/2020 09:13:00 AM (6 years ago)
- Location:
- shmapper-by-teplitsa
- Files:
-
- 80 added
- 11 deleted
- 3 edited
-
tags/1.3.6/widget/LICENSE.txt (deleted)
-
tags/1.3.6/widget/README.md (deleted)
-
tags/1.3.6/widget/README.txt (deleted)
-
tags/1.3.6/widget/assets (deleted)
-
tags/1.3.6/widget/class (deleted)
-
tags/1.3.6/widget/languages (deleted)
-
tags/1.3.6/widget/shmapper.php (deleted)
-
tags/1.3.6/widget/shortcode (deleted)
-
tags/1.3.6/widget/tpl (deleted)
-
tags/1.3.6/widget/unistall.php (deleted)
-
tags/1.3.6/widget/widget (deleted)
-
tags/1.3.7 (added)
-
tags/1.3.7/LICENSE.txt (added)
-
tags/1.3.7/README.md (added)
-
tags/1.3.7/README.txt (added)
-
tags/1.3.7/assets (added)
-
tags/1.3.7/assets/css (added)
-
tags/1.3.7/assets/css/MarkerCluster.Default.css (added)
-
tags/1.3.7/assets/css/MarkerCluster.css (added)
-
tags/1.3.7/assets/css/ShMapper.css (added)
-
tags/1.3.7/assets/css/easyGeocoder.css (added)
-
tags/1.3.7/assets/css/layerSwitcher.css (added)
-
tags/1.3.7/assets/img (added)
-
tags/1.3.7/assets/img/camera.png (added)
-
tags/1.3.7/assets/img/check_checked.png (added)
-
tags/1.3.7/assets/img/check_unchecked.png (added)
-
tags/1.3.7/assets/img/close.svg (added)
-
tags/1.3.7/assets/img/csv_icon.png (added)
-
tags/1.3.7/assets/img/easyGeocoder-marker.svg (added)
-
tags/1.3.7/assets/img/empty.png (added)
-
tags/1.3.7/assets/img/fullscreen.png (added)
-
tags/1.3.7/assets/img/fullscreen@2x.png (added)
-
tags/1.3.7/assets/img/loader.gif (added)
-
tags/1.3.7/assets/img/marker-shadow.png (added)
-
tags/1.3.7/assets/img/pin.svg (added)
-
tags/1.3.7/assets/img/shmapper.svg (added)
-
tags/1.3.7/assets/img/shmapper_32x32.svg (added)
-
tags/1.3.7/assets/img/shmapper_32x32_white.svg (added)
-
tags/1.3.7/assets/img/source-icons (added)
-
tags/1.3.7/assets/img/source-icons/easyGeocoder-result-icon.svg (added)
-
tags/1.3.7/assets/img/source-icons/easyGeocoder-search-icon.svg (added)
-
tags/1.3.7/assets/img/source-icons/easyGeocoder-throbber.svg (added)
-
tags/1.3.7/assets/img/ym_default.png (added)
-
tags/1.3.7/assets/js (added)
-
tags/1.3.7/assets/js/Leaflet.fullscreen.min.js (added)
-
tags/1.3.7/assets/js/Leaflet.layerSwitcher.js (added)
-
tags/1.3.7/assets/js/ShMapper.admin.js (added)
-
tags/1.3.7/assets/js/ShMapper.front.js (added)
-
tags/1.3.7/assets/js/ShMapper.js (added)
-
tags/1.3.7/assets/js/ShMapper.yandex.js (added)
-
tags/1.3.7/assets/js/ShMapper_osm.js (added)
-
tags/1.3.7/assets/js/easyGeocoder.js (added)
-
tags/1.3.7/assets/js/esri-leaflet.js (added)
-
tags/1.3.7/assets/js/leaflet.js (added)
-
tags/1.3.7/assets/js/leaflet.markercluster-src.js (added)
-
tags/1.3.7/assets/js/touchpunch.js (added)
-
tags/1.3.7/assets/recaptcha-php (added)
-
tags/1.3.7/assets/recaptcha-php/LICENSE (added)
-
tags/1.3.7/assets/recaptcha-php/README (added)
-
tags/1.3.7/assets/recaptcha-php/example-captcha.php (added)
-
tags/1.3.7/assets/recaptcha-php/example-mailhide.php (added)
-
tags/1.3.7/assets/recaptcha-php/recaptcha.class.php (added)
-
tags/1.3.7/assets/recaptcha-php/recaptchalib.php (added)
-
tags/1.3.7/class (added)
-
tags/1.3.7/class/SMC_Object_type.php (added)
-
tags/1.3.7/class/SMC_Post.php (added)
-
tags/1.3.7/class/ShMapPointType.class.php (added)
-
tags/1.3.7/class/ShMapper.class.php (added)
-
tags/1.3.7/class/ShMapperRequest.class.php (added)
-
tags/1.3.7/class/ShMapper_Assistants.class.php (added)
-
tags/1.3.7/class/ShMapper_ajax.class.php (added)
-
tags/1.3.7/class/ShmAdminPage.class.php (added)
-
tags/1.3.7/class/ShmForm.class.php (added)
-
tags/1.3.7/class/ShmMap.class.php (added)
-
tags/1.3.7/class/ShmPoint.class.php (added)
-
tags/1.3.7/languages (added)
-
tags/1.3.7/languages/shmapper-by-teplitsa-de_DE.mo (added)
-
tags/1.3.7/languages/shmapper-by-teplitsa-de_DE.po (added)
-
tags/1.3.7/languages/shmapper-by-teplitsa-ru_RU.mo (added)
-
tags/1.3.7/languages/shmapper-by-teplitsa-ru_RU.po (added)
-
tags/1.3.7/languages/shmapper-by-teplitsa.pot (added)
-
tags/1.3.7/shmapper.php (added)
-
tags/1.3.7/shortcode (added)
-
tags/1.3.7/shortcode/shmMap.shortcode.php (added)
-
tags/1.3.7/shortcode/shm_shortcodes.php (added)
-
tags/1.3.7/tpl (added)
-
tags/1.3.7/tpl/input_file_form.php (added)
-
tags/1.3.7/tpl/shmMap.php (added)
-
tags/1.3.7/unistall.php (added)
-
tags/1.3.7/widget (added)
-
tags/1.3.7/widget/ShMap.widget.php (added)
-
trunk/assets/js/ShMapper.yandex.js (modified) (3 diffs)
-
trunk/class/ShMapper.class.php (modified) (3 diffs)
-
trunk/class/ShMapper_ajax.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shmapper-by-teplitsa/trunk/assets/js/ShMapper.yandex.js
r2380712 r2380871 330 330 myPlacemark.events.add("dragend", evt => 331 331 { 332 333 var shmCoordinates = evt.get('target').geometry.getCoordinates(); 334 $("[name='shm_default_latitude']").val(shmCoordinates[0]).trigger('change'); 335 $("[name='shm_default_longitude']").val(shmCoordinates[1]).trigger('change'); 336 332 337 var pos = evt.get("position"); 333 338 var globalPixelPoint = myMap.converter.pageToGlobal( [pos[0], pos[1]] ); … … 337 342 initAddress(new_mark_coords); 338 343 }); 339 } 344 345 // On change zoom. 346 myMap.events.add('boundschange', function(e){ 347 zoom = myMap.getZoom(); 348 $('[name=shm_default_zoom]').val( zoom ).trigger('change'); 349 }); 350 } 351 340 352 if( mData.isClausterer ) 341 353 { … … 358 370 is_admin = function(myMap, mData) 359 371 { 372 360 373 if(mData.isMap) 361 374 { 375 362 376 myMap.events.add( 'boundschange', function(event) 363 377 { -
shmapper-by-teplitsa/trunk/class/ShMapper.class.php
r2380712 r2380871 412 412 $longitude = 37.8; 413 413 $zoom = 4; 414 if ( static::$options['shm_default_zoom'] ) {414 if ( isset( static::$options['shm_default_zoom'] ) && static::$options['shm_default_zoom'] ) { 415 415 $zoom = static::$options['shm_default_zoom']; 416 416 } 417 if ( static::$options['shm_default_latitude'] ) {417 if ( isset( static::$options['shm_default_latitude'] ) && static::$options['shm_default_latitude'] ) { 418 418 $latitude = static::$options['shm_default_latitude']; 419 419 } 420 if ( static::$options['shm_default_longitude'] ) {420 if ( isset( static::$options['shm_default_longitude'] ) && static::$options['shm_default_longitude'] ) { 421 421 $longitude = static::$options['shm_default_longitude']; 422 422 } … … 595 595 jQuery(document).ready( function($) 596 596 { 597 var points = [];598 var mData = {599 mapType : '$mapType',600 uniq : 'map_default_coordinates',601 muniq : 'map_default_coordinates',602 latitude : '$latitude',603 longitude : '$longitude',604 zoom : '$zoom',605 map_id : 'default_coordinates',606 isClausterer : 0,607 isLayerSwitcher : 0,608 isFullscreen : 1,609 isDesabled : 0,610 isSearch : 1,611 isZoomer : 1,612 isAdmin : 0,613 isMap : true,614 };615 616 597 if( map_type == 1 ) { 598 599 var points = [], 600 p = {}; 601 p.post_id = ''; 602 p.post_title = 'Черновик'; 603 p.post_content = 'content'; 604 p.latitude = '$latitude'; 605 p.longitude = '$longitude'; 606 p.location = ''; 607 p.draggable = 1; 608 p.type = '-1'; 609 p.height = ''; 610 p.width = ''; 611 p.term_id = '-1'; 612 p.icon = ''; 613 p.color = ''; 614 615 points.push(p); 616 617 var mData = { 618 mapType : 'map', 619 uniq : 'map_default_coordinates', 620 muniq : 'map_default_coordinates', 621 latitude : p.latitude, 622 longitude : p.longitude, 623 zoom : '$zoom', 624 map_id : '', 625 isClausterer : 0, 626 isLayerSwitcher : 0, 627 isFullscreen : 1, 628 isDesabled : 0, 629 isSearch : 1, 630 isZoomer : 1, 631 isAdmin : 1, 632 isMap : 0 633 }; 634 617 635 ymaps.ready(() => init_map( mData, points )); 636 618 637 } else if (map_type == 2) { 638 639 var points = []; 640 641 var mData = { 642 mapType : '$mapType', 643 uniq : 'map_default_coordinates', 644 muniq : 'map_default_coordinates', 645 latitude : '$latitude', 646 longitude : '$longitude', 647 zoom : '$zoom', 648 map_id : 'default_coordinates', 649 isClausterer : 0, 650 isLayerSwitcher : 0, 651 isFullscreen : 1, 652 isDesabled : 0, 653 isSearch : 1, 654 isZoomer : 1, 655 isAdmin : 1, 656 isMap : true, 657 }; 658 619 659 init_map( mData, points ); 620 621 // On zoom map.622 myMap.on('zoom', function(e) {623 $('[name=shm_default_zoom]').val( myMap.getZoom() ).trigger('change');624 });625 626 // On move map.627 myMap.on('move', function(e) {628 marker.setLatLng(myMap.getCenter());629 });630 631 // On moveend map.632 myMap.on('moveend', function(e) {633 var shmCenter = myMap.getCenter();634 var shmLat = shmCenter.lat;635 var shmLng = shmCenter.lng;636 $('[name=shm_default_latitude]').val( shmLat ).trigger('change');637 $('[name=shm_default_longitude]').val( shmLng ).trigger('change');638 console.log($('[name=shm_default_longitude]').val());639 console.log($('[name=shm_default_latitude]').val());640 });641 660 642 661 // Add Center Marker. … … 648 667 ) 649 668 .addTo(myMap); 669 670 // On zoom map. 671 myMap.on('zoom', function(e) { 672 $('[name=shm_default_zoom]').val( myMap.getZoom() ).trigger('change'); 673 }); 674 675 marker.on('dragend', function (e) { 676 $('[name=shm_default_latitude]').val(marker.getLatLng().lat).trigger('change'); 677 $('[name=shm_default_longitude]').val(marker.getLatLng().lng).trigger('change'); 678 }); 650 679 } 651 680 652 681 }); 653 682 </script> 683 654 684 655 685 <input class='sh-form' name='shm_default_latitude' value='" . esc_attr( $latitude ) . "' readonly disabled> -
shmapper-by-teplitsa/trunk/class/ShMapper_ajax.class.php
r2380712 r2380871 445 445 $action, 446 446 array( 447 //"msg" => __( "New coordinates saved" , SHMAPPER ),447 "msg" => __( "New coordinates saved" , SHMAPPER ), 448 448 ), 449 449 );
Note: See TracChangeset
for help on using the changeset viewer.