Plugin Directory

Changeset 2246220


Ignore:
Timestamp:
02/18/2020 01:57:26 PM (6 years ago)
Author:
jdevsig
Message:

New 1.2.0 version

Fix input search width
Insert arrows to change the popup target for many feature at the same coordinates
Display popup at nearest(s) point(s)
Complete translation
Change Nominatim to Photon address API
Fix style for KML layer
Fix some default params values
Add param to config the result numbers
Zoom to results address extent

Location:
map-store-location/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • map-store-location/trunk/classes/admin/MslAdmin.php

    r2220846 r2246220  
    318318        add_settings_field("msl_marker_search_size", __( "Marker size (0-1)", 'WP-map-store-locator' ), array($this,"msl_marker_search_size"), "msl_plugin", "search_section");
    319319        register_setting("msl_settings", "msl_marker_search_size");
     320        // max point(s) to adjust result extent
     321        add_settings_field("msl_marker_search_extent", __( "Max results", 'WP-map-store-locator' ), array($this,"msl_marker_search_extent"), "msl_plugin", "search_section");
     322        register_setting("msl_settings", "msl_marker_search_extent");
     323        // bias param to adjust accuracy of result (0.1 accept far results and 10 not)
     324        add_settings_field("msl_marker_search_bias", __( "Bias scale (0,1-10)", 'WP-map-store-locator' ), array($this,"msl_marker_search_bias"), "msl_plugin", "search_section");
     325        register_setting("msl_settings", "msl_marker_search_bias");       
    320326    }   
    321327
     
    348354        <?php
    349355    }
     356    function msl_marker_search_extent() {
     357        ?>
     358            <input type="number" step="1" name="msl_marker_search_extent" id="msl_marker_search_extent" value="<?php echo get_option('msl_marker_search_extent'); ?>" />
     359        <?php
     360    }
     361    function msl_marker_search_bias() {
     362        ?>
     363            <input type="number"step="0.01" name="msl_marker_search_bias" id="msl_marker_search_bias" value="<?php echo get_option('msl_marker_search_bias'); ?>" />
     364        <?php
     365    }   
    350366}
  • map-store-location/trunk/classes/widgets/MslWidget.php

    r2238415 r2246220  
    7171        wp_enqueue_style( 'ol_css', MSL_PLUGIN_URL."includes/lib/ol-6.1.1/css/ol.css" );
    7272        // use !important to override child theme css
    73         wp_enqueue_style( 'msl', MSL_PLUGIN_URL."includes/css/msl.css" );
    74        
     73        wp_enqueue_style( 'msl', MSL_PLUGIN_URL."includes/css/msl.css" );       
    7574    }
    7675
     
    173172            <!--Search input with autocompletion-->
    174173            <div class="autocomplete">
    175                 <input class="input-search input-text" id=<?= $inputId ?> type="text" name="nominatim" placeholder=" <?= __('Enter your adresse to get  the nearest sale point', 'WP-map-store-locator');?>">
     174                <input class="input-search input-text" id=<?= $inputId ?> type="text" name="photon" placeholder=" <?= __('Enter your adresse to get  the nearest sale point', 'WP-map-store-locator');?>">
    176175            </div>
    177176            <!--OpenLayers map div-->
     
    205204            var overlayHtmlContent = <?= json_encode(get_option('msl_overlay_html'));?> || '';
    206205            var dataUrl = <?= json_encode(get_option('msl_data_file_url'));?> || '';
    207             var dataSize = <?= json_encode(get_option('msl_data_size'));?> || '';
     206            var dataSize = <?= json_encode(get_option('msl_data_size'));?> || 0.8;
    208207            var openPageUrl = <?= json_encode(get_option('msl_open_page'));?> || '';
    209208            var img = [
     
    216215                <?= json_encode(get_option('msl_data_png3_type'));?>];
    217216            var searchMarker = <?= json_encode(get_option('msl_marker_search_url'));?> || '';
    218             var searchSize = <?= json_encode(get_option('msl_marker_search_size'));?> || '';           
     217            var searchSize = <?= json_encode(get_option('msl_marker_search_size'));?> || 1;
     218            var maxResult = <?= json_encode(get_option('msl_marker_search_extent'));?> || 1;
     219            var biasScale = <?= json_encode(get_option('msl_marker_search_bias'));?> || 1.5;
     220            var popupIdx = 0;
     221            var selectedFeatures = [];
     222            var jsonFeatures;
    219223
    220224            /**
     
    271275                    geometry: new ol.geom.Point(xy),
    272276                    id: id
    273                 });
    274                 if (marker ) { // avoid empty style and no ol.style.icon assertion error
     277                });               
     278                if (marker) { // avoid empty style and no ol.style.icon assertion error
    275279                    // create style
    276280                    var iconStyle = new ol.style.Style({
     
    285289                    // set style
    286290                    iconFeature.setStyle(iconStyle);
    287                     // remove layer if already exist
    288                     if(getLayerById(id, mapName)) {
    289                         mapName.removeLayer(id);
    290                     }
     291                }               
     292                // remove layer if already exist
     293                if(getLayerById(id, mapName)) {
     294                    var searchLayer = getLayerById(id, mapName);
     295                    searchLayer.getSource().clear();
     296                    searchLayer.getSource().addFeature(iconFeature);
     297                } else {
    291298                    // create layer with uniq id
    292299                    var layer = new ol.layer.Vector({
     
    299306                    });
    300307                    // add marker to map
    301                     mapName.addLayer(layer);
     308                    mapName.addLayer(layer);                   
    302309                }
    303310            }
     
    321328                return find;
    322329            }
    323 
    324330            /**
    325331             * Remove overlays from given map
     
    330336                    map.getOverlays().getArray()[0].setPosition(undefined);
    331337                    map.getOverlays().getArray().splice(0, map.getOverlays().getArray().length);
     338                    jQuery('#'+ 'popup-content-' + map.get('target')).empty();
    332339                }
    333340            }
     341            /**
     342             * Manage events for fopup arrows buttons
     343             * @param features - array of features
     344             * @param map - ol.Map for this map
     345             */
     346             function navigPopup(features, map) {
     347                var maxIdx = features.length-1;
     348                var idx;
     349                // only for more than one features - display buttons
     350                if(maxIdx > 0 & popupIdx != undefined) {
     351                    document.getElementById('nextPopup').addEventListener('click', function(){
     352                        idx = popupIdx === maxIdx ? 0 : popupIdx + 1;
     353                        displayPopup(features, map, idx);
     354                    });
     355                    document.getElementById('previousPopup').addEventListener('click', function(){
     356                        idx = popupIdx === 0 ? maxIdx : popupIdx - 1;
     357                        displayPopup(features, map, idx);
     358                    });
     359                }
     360             }
    334361            /**
    335362            * Function to generate the full process to destroy, create and set map overlay.
     
    338365            * @param map - target this ol.map object to display popup.
    339366            */
    340             function displayPopup(feature, map) {
     367            function displayPopup(features, map, idx) {
     368                popupIdx = idx;
     369                var feature = features[idx];
    341370                var html = "";
    342371                var contactMsg = "<?php echo __('Please, contact ', 'WP-map-store-locator')?>" + overlayTitle + "<?php echo __(' to get more details.', 'WP-map-store-locator')?>";
    343                 if(feature.id_ === 'search_marker') {
     372                if(feature.id_ != undefined && feature.id_ === 'search_marker') {
    344373                    // never display popup on search marker without properties.
    345374                    // avoid to display "undefined" values into popup.
     
    362391                jQuery('#'+ 'popup-' + map.get('target')).css('display','inline-block');
    363392                // add content html
    364                 if(feature.getProperties().id === 'home-feature') {
     393                var props = feature.getProperties();
     394                if(props.id === 'home-feature') {
    365395                    // display some content if marker is the owner or default retailer marker
    366396                    if(overlayHtmlContent.length > 0) {
     
    371401                    }
    372402                } else {
    373                     // else it's a json data feature, we display specific properties.
     403                    // it's a json data feature, we display specific properties.
    374404                    try {
    375                         var f = feature.getProperties();
    376                         html = '<strong>'+ f.nom + '</strong>';
    377                         html += '</br>'+ f.adresse + ', ' + f.code_postal + ', ' + f.ville;
    378                         document.getElementById('popup-content-' + map.get('target')).innerHTML = html;
     405                        if(!props.name) {
     406                            html = '<strong>'+ props.nom + '</strong>';
     407                            html += '</br>'+ props.adresse + ', ' + props.code_postal + ', ' + props.ville;
     408                        } else {
     409                            html = '<span>'+ props.name + '</span>';
     410                        }
     411                        if(features.length > 1) {
     412                            var lenFeatures = features.length;
     413                            html += `<br/><span style="text-align:center;">`;
     414                            html += `<button style="display:inline-block;" id="previousPopup" class="btn popupBtn"><</button>`;
     415                            html += popupIdx+1 + '/' + lenFeatures;
     416                            html += `<button id="nextPopup" style="display:inline-block;" class="btn popupBtn">></button></span>`;
     417                        }
     418                        document.getElementById('popup-content-' + map.get('target')).innerHTML = html;                                             
    379419                    } catch (e) {
    380420                        // display contact message
     
    389429                }
    390430                document.getElementById('popup-content-' + map.get('target')).innerHTML = html;
     431               
     432                // events for popup navigation buttons
     433                navigPopup(features, map);
     434                selectedFeatures = features;
    391435            }
    392436           
     
    410454                    if(features.length) {
    411455                        // display popup for the first popup only
    412                         displayPopup(features[0], <?= $mapName ?>);
     456                        displayPopup(features, <?= $mapName ?>, 0);
    413457                    } else {
    414458                        // hide popup if no features was find. Allow to hide popup on simple map click.
     
    455499                                    features = res;
    456500                                }
    457                                 layerCustomers = featuresToLayer(features, layerId);
    458                                 layerCustomers.setVisible(false);
    459                                 map.addLayer(layerCustomers);
     501                                jsonFeatures = features;
    460502                            }
    461503                        }
     
    474516                 * @return ol.layer.vector object.
    475517                 */
    476                 function featuresToLayer(features, id) {
     518                function featuresToLayer(features, id, map) {
     519                    // remove layer if already exist
     520                    if(getLayerById(id,map)) {
     521                        map.removeLayer(getLayerById(id,map));
     522                    }
     523                    // crate layer and add features
    477524                    let vectorSource = new ol.source.Vector({
    478525                        features
     
    494541                    var style;
    495542                    var cat = feature.get('code_categorie');
    496                    
     543                    if(!cat && feature.get('styleUrl') && feature.get('styleUrl').indexOf('icon') >= 0) { // from kml
     544                        cat = feature.get('styleUrl').indexOf('icon-1502') < 0 ? 'CHR' : 'DET';
     545                    }
    497546                    if(types.indexOf(cat) > -1 && cat.length === types.length){
    498547                        var imgCat = img[types.indexOf(cat)];
     
    506555                    return [style];
    507556                }
     557
     558                /**
     559                * From features, calculate and zoom in
     560                * allow a param to adjust zoom out
     561                * @param - Array of ol.feature object
     562                * @param - map ol.map targeted
     563                * @param - int our float number
     564                */
     565                function zoomToFeatures(features, map, out) {
     566                    var extent = (new ol.source.Vector({
     567                        features: features
     568                    })).getExtent();
     569                    map.getView().fit(extent, map.getSize());
     570                    var zoom = map.getView().getZoom();
     571                    map.getView().setZoom(zoom-(out ? out : 0));
     572                } 
    508573
    509574                /**
     
    568633                        var b;
    569634                        var options = [];
     635
    570636                        // parse results
    571637                        results.forEach(e => {
     638
    572639                            // create div for each
    573640                            b = document.createElement("DIV");
    574                             var xy =  e.lon + ',' + e.lat;
    575                             var val = '';
    576                             var place = e.address;
     641                            var xy =  e.geometry.coordinates[0] + ',' + e.geometry.coordinates[1];
    577642                            var add = [];
    578                             function addToArray(el) {
    579                                 if(add.indexOf(el) < 0) {
    580                                     add.push(el);
    581                                 }
    582                             }
     643
    583644                            // create string content according to nominatim returns
    584                             if( (place.county  || place.city  || place.village) && place.country) {
    585                                 if(place.road) {
    586                                     addToArray(place.road);
    587                                 } else if (place.address29) {
    588                                     addToArray(place.address29)
    589                                 };
    590                                 if(place.village) {addToArray(place.village)};
    591                                 if(place.city) {addToArray(place.city)};
    592                                 if(place.county)  {addToArray(place.county)};
    593                                 if(place.postcode) {add.push(place.postcode)};
    594                                 if(place.country_code) {add.push(place.country_code)};
    595                             } else if (place.country && place.state){
    596                                 val = place.state + ', ' + place.country;
    597                             }
    598                             val = add.join(', ');
    599                             // set content
     645                            var val =
     646                                `${e.properties.street ? e.properties.street + ', ': e.properties.name + ', '}` +
     647                                `${e.properties.city ? e.properties.city + ', ': ''}` +
     648                                `${e.properties.state ? e.properties.state + ', ':''}` +
     649                                `${e.properties.country ? e.properties.country:''}`
     650                            ;
     651                            // set popup content and create result marker feature
    600652                            if(xy && val && options.indexOf(val) < 0) {
    601653                                options.push(val);
     
    611663                                    <?= $mapName ?>.getView().setCenter(center);
    612664                                    addPoint(center, searchMarker, searchSize, <?= $mapName ?>, "search_marker");
     665                                   
    613666                                    // display nearest point
    614                                     var vector = getLayerById('json-customers',  <?= $mapName ?>);
    615                                     if(vector) {
    616                                         var source = getLayerById('json-customers', <?= $mapName ?>).getSource();
    617                                         if(source) {
    618                                             var closestFeature = source.getClosestFeatureToCoordinate(center);
    619                                             displayPopup(closestFeature, <?= $mapName ?>);
    620                                             vector.setVisible(true)
    621                                         }
     667                                    var vector = featuresToLayer(jsonFeatures, '', <?= $mapName ?>);
     668                                    var source = vector ? vector.getSource() : '';
     669
     670                                    // close the list of autocompleted values
     671                                    closeAllLists();
     672
     673                                    /**
     674                                     * Now we search closests features to display around search marker result
     675                                     */
     676                                    if(source && maxResult) {
     677                                        var closestPoints = {};
     678                                        var closestDist = [];
     679                                        var resultPoints = [];
     680                                        var minDists;
     681                                        // get all distances
     682                                        source.getFeatures().forEach(e=>{
     683                                            // create line
     684                                            var props = e.getProperties();
     685                                            var line = new ol.geom.LineString([center, e.getGeometry().getCoordinates()]);
     686                                            // get line length
     687                                            var lineMeasure = line.getLength();
     688                                            if(closestDist.indexOf(lineMeasure)<0){
     689                                                closestDist.push(lineMeasure);
     690                                                closestPoints[lineMeasure.toString()] = [];
     691                                            }
     692                                            closestPoints[lineMeasure.toString()].push(e);
     693                                        })
     694                                       
     695                                        // order list to get closests distances first
     696                                        closestDist.sort(function(a, b) {
     697                                            return a - b
     698                                        });
     699                                        minDists = closestDist.slice(0,maxResult);
     700
     701                                        /*  Now, parse layer features
     702                                            to get features according to distance */
     703                                        var extentPoint = []
     704                                        var popupPoints = [];
     705                                        minDists.forEach(dist => {
     706                                            closestPoints[dist].forEach(e => {
     707                                                if(extentPoint.length < maxResult) {
     708                                                    extentPoint.push(e);
     709                                                    if(!popupPoints.length) {
     710                                                        popupPoints.push(e);
     711                                                    } else {
     712                                                        var nearestGeom = e.getGeometry().getCoordinates().join('');
     713                                                        var compareGeom = popupPoints[0].getGeometry().getCoordinates().join('');
     714                                                        if(nearestGeom === compareGeom) {
     715                                                            popupPoints.push(e);
     716                                                        }
     717                                                    }
     718                                                }
     719                                            })
     720                                        })
     721
     722                                        // clear layer and addFeatures
     723                                        vector = featuresToLayer(extentPoint, '', <?= $mapName ?>);
     724                                        <?= $mapName ?>.addLayer(vector);
     725                                        // show popup
     726                                        displayPopup(popupPoints, <?= $mapName ?>, 0);
     727                                        // show result marker
     728                                        var markerFeature = getLayerById("search_marker", <?= $mapName ?>).getSource().getFeatures()[0];                                     
     729                                        // adjust zoom and extent
     730                                        zoomToFeatures(extentPoint.concat([markerFeature]), <?= $mapName ?>, 1);                                       
    622731                                    }
    623                                     /*close the list of autocompleted values,
    624                                     (or any other open lists of autocompleted values:*/
    625                                     closeAllLists();
    626732                                });
    627733                                // append child input to result div
    628                                 parent.appendChild(b);           
     734                                parent.appendChild(b);
     735                                closestPoints = null;
     736                                closestDist = null;
     737                                resultPoints = null;
     738                                minDists = null;
    629739                            }
    630740                        });
     
    640750                            // Ajax request
    641751                            var xhr = new XMLHttpRequest();
    642                             xhr.open('GET', 'https://nominatim.openstreetmap.org/search?q='+ value + '&format=json&addressdetails=1&limit=5');
     752                            var url = 'https://photon.komoot.de/api/?limit=5&q='+ value + '&limit=5';
     753                            url += '&location_bias_scale=' + biasScale;
     754                            // Add priority from view center
     755                            var center = <?= $mapName ?>.getView().getCenter();
     756                            center = ol.proj.transform(center, 'EPSG:3857', 'EPSG:4326');
     757                            url += `&lon=${center[0]}&lat=${center[1]}`;
     758                            xhr.open('GET', url);
    643759                            xhr.onload = function() {
    644760                                if (xhr.status === 200 && xhr.responseText) {
    645761                                    var response = xhr.responseText.length ? JSON.parse(xhr.responseText) : null;
    646762                                    if(response) {
    647                                         displayList(response, parent);
     763                                        displayList(response.features, parent);
    648764                                    }
    649765                                }
  • map-store-location/trunk/includes/css/msl.css

    r2238415 r2246220  
    33*/
    44.ol-popup {
    5     position: absolute;
    6     background-color: white;
    7     -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
    8     filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
    9     padding: 15px;
    10     border-radius: 10px;
    11     border: 1px solid #cccccc;
    12     bottom: 12px;
    13     left: -50px;
    14     min-width: 180px;
    15     text-align: left;
    16     font-size: 14px;
    17   }
    18  
    19   .ol-popup:after, .ol-popup:before {
    20     top: 100%;
    21     border: solid transparent;
    22     content: " ";
    23     height: 0;
    24     width: 0;
    25     position: absolute;
    26     pointer-events: none;
    27   }
    28   .ol-popup:after {
    29     border-top-color: white;
    30     border-width: 10px;
    31     left: 48px;
    32     margin-left: -10px;
    33   }
    34   .ol-popup:before {
    35     border-top-color: #cccccc;
    36     border-width: 11px;
    37     left: 48px;
    38     margin-left: -11px;
    39   }
     5  position: absolute;
     6  background-color: white;
     7  -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
     8  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
     9  padding: 15px;
     10  border-radius: 10px;
     11  border: 1px solid #cccccc;
     12  bottom: 12px;
     13  left: -50px;
     14  min-width: 180px;
     15  text-align: left;
     16  font-size: 14px;
     17}
     18
     19.ol-popup:after, .ol-popup:before {
     20  top: 100%;
     21  border: solid transparent;
     22  content: " ";
     23  height: 0;
     24  width: 0;
     25  position: absolute;
     26  pointer-events: none;
     27}
     28.ol-popup:after {
     29  border-top-color: white;
     30  border-width: 10px;
     31  left: 48px;
     32  margin-left: -10px;
     33}
     34.ol-popup:before {
     35  border-top-color: #cccccc;
     36  border-width: 11px;
     37  left: 48px;
     38  margin-left: -11px;
     39}
    4040
    4141
     
    5555  border-radius: 3px !important;
    5656  margin-bottom: 0 !important;
     57  width: 100%;
    5758}
    5859
     
    8485/*when hovering an item:*/
    8586.autocomplete-items div:hover {
    86   background-color: #e9e9e9 !important; 
     87  background-color: #e9e9e9 !important;
    8788}
    8889
    8990/*when navigating through the items using the arrow keys:*/
    9091.autocomplete-active {
    91   background-color: DodgerBlue !important; 
     92  background-color: DodgerBlue !important;
    9293  color: #ffffff !important;
    93  
    9494}
     95
     96/*Popup buttons style*/
     97.popupBtn, .popupBtn:focus {
     98  font-size: 0.8em !important;
     99  background-color: transparent !important;
     100  color: blue !important;
     101  Text-Decoration: None !important;
     102  outline: none !important;
     103}
     104
     105.popupBtn:focus {
     106  color: #cd2653 !important;
     107}
  • map-store-location/trunk/languages/WP-map-store-locator-fr_FR.po

    r2220846 r2246220  
    33"Project-Id-Version: WP-map-store-locator\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2019-12-19 15:18+0000\n"
    6 "PO-Revision-Date: 2019-12-19 15:19+0000\n"
    7 "Last-Translator: jdev <gaetan.bruel@jdev.fr>\n"
     5"POT-Creation-Date: 2020-02-18 08:31+0000\n"
     6"PO-Revision-Date: 2020-02-18 08:31+0000\n"
     7"Last-Translator: wordpress <gaetan.bruel@jdev.fr>\n"
    88"Language-Team: Français\n"
    99"Language: fr_FR\n"
     
    1515"X-Loco-Version: 2.3.1; wp-5.3.2"
    1616
    17 #: classes/admin/Admin.php:32 classes/widgets/Msl.php:20
     17#: classes/admin/MslAdmin.php:30 classes/widgets/MslWidget.php:21
     18#: classes/widgets/MslWidgetSave.php:21
    1819msgid "Map Store Locator"
    1920msgstr "Map Store Locator"
    2021
    21 #: classes/admin/Admin.php:58
     22#: classes/admin/MslAdmin.php:56
    2223msgid "Save"
    2324msgstr "Enregistrer"
    2425
    25 #: classes/admin/Admin.php:73
     26#: classes/admin/MslAdmin.php:71
    2627msgid "Map options"
    2728msgstr "Options de la carte"
    2829
    29 #: classes/admin/Admin.php:75
     30#: classes/admin/MslAdmin.php:73
    3031msgid "Coordinates"
    3132msgstr "Coordonnées"
    3233
    33 #: classes/admin/Admin.php:78
     34#: classes/admin/MslAdmin.php:76
    3435msgid "Zoom (1 - 20)"
    3536msgstr "Zoom (valeur de 1 à 20)"
    3637
    37 #: classes/admin/Admin.php:81
     38#: classes/admin/MslAdmin.php:79
    3839msgid "Link to open"
    3940msgstr "Page à consulter"
    4041
    41 #: classes/admin/Admin.php:89
     42#: classes/admin/MslAdmin.php:87
    4243msgid "Default map view options."
    4344msgstr "Options d'affichage de la carte à l'ouverture."
    4445
    45 #: classes/admin/Admin.php:92
     46#: classes/admin/MslAdmin.php:90
    4647msgid "Get coordinates in EPSG:3857 (lon, lat) from "
    4748msgstr "Obtenez les coordonnées en EPSG:3857 (lon, lat) depuis le site"
    4849
    49 #: classes/admin/Admin.php:94
     50#: classes/admin/MslAdmin.php:92
    5051msgid "Dogeo web site. "
    5152msgstr " internet Dogeo"
    5253
    53 #: classes/admin/Admin.php:124
     54#: classes/admin/MslAdmin.php:122
    5455msgid "Popup options"
    5556msgstr "Options d'affichage de l'infobulle"
    5657
    57 #: classes/admin/Admin.php:126
     58#: classes/admin/MslAdmin.php:124
    5859msgid "Title"
    5960msgstr "Titre"
    6061
    61 #: classes/admin/Admin.php:129
     62#: classes/admin/MslAdmin.php:127
    6263msgid "Text"
    6364msgstr "Description"
    6465
    65 #: classes/admin/Admin.php:132
     66#: classes/admin/MslAdmin.php:130
    6667msgid "Marker Icon"
    6768msgstr "Pictogramme"
    6869
    69 #: classes/admin/Admin.php:135 classes/admin/Admin.php:195
    70 #: classes/admin/Admin.php:320
     70#: classes/admin/MslAdmin.php:133 classes/admin/MslAdmin.php:193
     71#: classes/admin/MslAdmin.php:318
    7172msgid "Marker size (0-1)"
    7273msgstr "Taille du pictogramme (0-1)"
    7374
    74 #: classes/admin/Admin.php:138
     75#: classes/admin/MslAdmin.php:136
    7576msgid "HTML content"
    7677msgstr "Contenu HTML"
    7778
    78 #: classes/admin/Admin.php:146
     79#: classes/admin/MslAdmin.php:144
    7980msgid "Default popup options."
    8081msgstr "Options d'affichage de l'infobulle par défaut."
    8182
    82 #: classes/admin/Admin.php:190
     83#: classes/admin/MslAdmin.php:188
    8384msgid "Data options"
    8485msgstr "Options du jeu de données"
    8586
    86 #: classes/admin/Admin.php:192
     87#: classes/admin/MslAdmin.php:190
    8788msgid "URL (JSON, GeoJSON)"
    8889msgstr "URL (JSON, GeoJSON)"
    8990
    90 #: classes/admin/Admin.php:198
     91#: classes/admin/MslAdmin.php:196
    9192msgid "Type 1"
    9293msgstr "Type 1"
    9394
    94 #: classes/admin/Admin.php:201
     95#: classes/admin/MslAdmin.php:199
    9596msgid "Image 1"
    9697msgstr "Symbole 1"
    9798
    98 #: classes/admin/Admin.php:204
     99#: classes/admin/MslAdmin.php:202
    99100msgid "Type 2"
    100101msgstr "Type 2"
    101102
    102 #: classes/admin/Admin.php:207
     103#: classes/admin/MslAdmin.php:205
    103104msgid "Image 2"
    104105msgstr "Symbole 2"
    105106
    106 #: classes/admin/Admin.php:210
     107#: classes/admin/MslAdmin.php:208
    107108msgid "Type 3"
    108109msgstr "Type 3"
    109110
    110 #: classes/admin/Admin.php:213
     111#: classes/admin/MslAdmin.php:211
    111112msgid "Image 3"
    112113msgstr "Symbole 3"
    113114
    114 #: classes/admin/Admin.php:221
     115#: classes/admin/MslAdmin.php:219
    115116msgid "Options to display data on the map."
    116117msgstr "Options par défaut d'affichage des données sur la carte"
    117118
    118 #: classes/admin/Admin.php:224
     119#: classes/admin/MslAdmin.php:222
    119120msgid "Display data with projection "
    120121msgstr "Vous devez afficher les données dans la projection "
    121122
    122 #: classes/admin/Admin.php:227 classes/admin/Admin.php:331
     123#: classes/admin/MslAdmin.php:225 classes/admin/MslAdmin.php:335
    123124msgid "Please, use SVG or PNG as icons."
    124125msgstr ""
    125126"Merci d'utiliser des liens vers les formats SVG et PNG pour les symboles."
    126127
    127 #: classes/admin/Admin.php:241
     128#: classes/admin/MslAdmin.php:239
    128129msgid "Check the template file."
    129130msgstr "Fichier d'exemple à respecter."
    130131
    131 #: classes/admin/Admin.php:315 classes/admin/Admin.php:328
     132#: classes/admin/MslAdmin.php:313 classes/admin/MslAdmin.php:332
    132133msgid "Search options"
    133134msgstr "Options de la barre de recherche"
    134135
    135 #: classes/admin/Admin.php:317
     136#: classes/admin/MslAdmin.php:315
    136137msgid "Marker URL"
    137138msgstr "URL de l'icône"
    138139
     140#: classes/admin/MslAdmin.php:321
     141msgid "Max results"
     142msgstr "Nombre de résultats"
     143
     144#: classes/admin/MslAdmin.php:324
     145msgid "Bias scale (0,1-10)"
     146msgstr "Echelle de proximité (0.1-10)"
     147
    139148#. Description of the plugin
    140 #: classes/widgets/Msl.php:21
     149#: classes/widgets/MslWidget.php:22 classes/widgets/MslWidgetSave.php:22
    141150msgid "A plugin to display geographic data in a map."
    142151msgstr ""
     
    144153"carte."
    145154
    146 #: classes/widgets/Msl.php:93
     155#: classes/widgets/MslWidget.php:116 classes/widgets/MslWidgetSave.php:117
    147156msgid "Simple map"
    148157msgstr "Carte simple"
    149158
    150 #: classes/widgets/Msl.php:97
     159#: classes/widgets/MslWidget.php:120 classes/widgets/MslWidgetSave.php:121
    151160msgid "Height (px, em, %)"
    152161msgstr "Hauteur (px, em, %)"
    153162
    154 #: classes/widgets/Msl.php:98
     163#: classes/widgets/MslWidget.php:121 classes/widgets/MslWidgetSave.php:122
    155164msgid "Height"
    156165msgstr "Hauteur"
    157166
    158 #: classes/widgets/Msl.php:102
     167#: classes/widgets/MslWidget.php:125 classes/widgets/MslWidgetSave.php:126
    159168msgid "Width (px, em, %)"
    160169msgstr "Largeur (px, em, %)"
    161170
    162 #: classes/widgets/Msl.php:103
     171#: classes/widgets/MslWidget.php:126 classes/widgets/MslWidgetSave.php:127
    163172msgid "Width"
    164173msgstr "Largeur"
    165174
    166 #: classes/widgets/Msl.php:154
     175#: classes/widgets/MslWidget.php:174 classes/widgets/MslWidgetSave.php:175
    167176msgid "Enter your adresse to get  the nearest sale point"
    168177msgstr "Entrer votre adresse pour trouver les points de ventes "
    169178
    170 #: classes/widgets/Msl.php:310
     179#: classes/widgets/MslWidget.php:371 classes/widgets/MslWidgetSave.php:342
    171180msgid "Please, contact "
    172181msgstr "Merci de contacter "
    173182
    174 #: classes/widgets/Msl.php:310
     183#: classes/widgets/MslWidget.php:371 classes/widgets/MslWidgetSave.php:342
    175184msgid " to get more details."
    176185msgstr " pour obtenir plus d'informations."
  • map-store-location/trunk/msl-plugins.php

    r2238415 r2246220  
    44
    55Description: A plugin to display geographic data in a map.
    6 Version: 1.1.0
     6Version: 1.2.0
    77Author: JDev
    88License: GPLv3 or later
  • map-store-location/trunk/readme.txt

    r2238415 r2246220  
    33Donate link: https://jdev.fr/
    44Tags: map, OpenStreetMap, CSV, GeoJson, geotag, geolocation, OSM, OpenLayers, Open Layers, Open Street Map,POI, geocode, geotagging, location, store, retaillers, jdev
    5 Requires at least: 5.0
     5Requires at least: 4.9
    66Tested up to: 5.3.2
    77Stable tag: trunk
     
    6060Fix shortcode param
    6161Fix translation path
     62
     63= 1.2.0 =
     64Fix input search width
     65Insert arrows to change the popup target for many feature at the same coordinates
     66Display popup at nearest(s) point(s)
     67Complete translation
     68Change Nominatim to Photon address API
     69Fix style for KML layer
     70Fix some default params values
     71Add param to config the result numbers
     72Zoom to results address extent
  • map-store-location/trunk/uninstall.php

    r2220846 r2246220  
    2828delete_option('msl_marker_search_url');
    2929delete_option('msl_marker_search_size');
     30delete_option('msl_marker_search_extent');
     31delete_option('msl_marker_search_bias');
    3032delete_option('msl_overlay_html');
    3133delete_option('msl_overlay_marker');
Note: See TracChangeset for help on using the changeset viewer.