Giter Site home page Giter Site logo

lizmap-javascript-scripts's Introduction

Lizmap JavaScript scripts

Lizmap logo

You can use those JavaScript scripts to enhance Lizmap Web Client. Documentation about additionnal JavaScript is on docs.lizmap.com and the autogenerated documentation is on docs.3liz.org

You might have a README.md inside the directory with more information and a demo.

Some JavaScript codes presented are self-sufficient while others are examples to help you create the functionality you want.

If you are developing a new feature, do not hesitate to let us know so that we can integrate it.

API

Data

Miscellaneous

Translation

Tools

UI

lizmap-javascript-scripts's People

Contributors

arno974 avatar brun04 avatar crapaud04 avatar gioman avatar gustry avatar laurentj avatar mdouchin avatar nboisteault avatar npltr62 avatar nworr avatar pdrillin avatar r9zzai avatar rldhont avatar rmarzocchi84 avatar robifag avatar tethysgeco avatar vlebert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lizmap-javascript-scripts's Issues

activateSnapWhenEditing

hi @mdouchin

great!!!

i have tried to duplicate the script file for "SousQuartiers" layer, and it works for both layers (Quartiers and SousQuartiers). but when i clone the script file on more time for "areas_of_interest", the snapping only works for "areas_of_interest"... i don´t know why

thanks for your work :-)

Pb with Pop-up

Bonjour,

j'ai un problème lorsque que j'active hamburger menu (exemple couche), si on ne clique pas sur le bouton fermer, il est impossible d'ouvrir un pop-up en même temps.

Comment peut on résoudre ça ?

Hello,

I have a problem when I activate the hamburger menu (example layer), if we do not click on the close button, it is impossible to open a pop-up at the same time.

How can we solve this?

background_selector improvements

Hi to eveybody,
i wanna guess an improvement for the script: "background selector".
I was looking for a solution to improve the background selector script to change it on something more similar to that one is used by google maps or esri etc.
Cattura2

This solution is more suitable than the other one when you have multiple baselayer to change, and you cannot choice from a sort of list but you must go haed until you find the right one. Can someone do this kind of improvement?
i can't just because i'm not a web programmer, i've tried to find a solution without success.
I hope this could help others like me that need this feature,
Best reguards,
Marco

Highlight selected feature in Zoom_to_feature_at_startup

the functionality the script 'zoom to feature at startup' gives is great, but it lacks the possibility to highlight the feature, that is addressed by the call.
Beside the result, to zoom to the feature it should be an absolute 'must have' to be able to highlight the feature.
This would open a way to integrate Lizmap in an existing environment while passing an URL and the corresponding feature ID. Zooming to this feature is already great, but highlighting it is necessary to give the user a clear response to her/his selection.
Would even be worth to integrate it in the core code.

attribute_table_column_filter: take over column width in input elements

The attribute_table_column_filter.js plugin is a highly appreciated extension of LIZMAP. It makes filtering so much easier.

But there is one small issue: The plugin doesn't take over the width of the columns. It uses fixed width for every input element.
attribute_filter_orig

Here's an adapted version that takes column width into account:

lizMap.events.on({
    attributeLayerContentReady: function (e) {
        var cleanLayerName = lizMap.cleanName(e.featureType);

        if ($('#attribute-layer-table-' + cleanLayerName + '_wrapper').data('filtersON') === undefined) {
            // Set flag to add filters only once
            $('#attribute-layer-table-' + cleanLayerName + '_wrapper').data('filtersON', true);

            $('#attribute-layer-table-' + cleanLayerName + '_wrapper thead:first th').not('.sorting_disabled').each(function () {
                var title = $(this).text();
                var width = $(this).width();
                $(this).html('<input type="text" placeholder=" ' + title + '" style="width:' + (parseFloat(width)+20) + 'px" />');
            });

            $('#attribute-layer-table-' + cleanLayerName).DataTable().columns().every(function () {
                var column = this;

                $('input', this.header()).on('keyup change', function () {
                    if (column.search() !== this.value) {
                        column
                            .search(this.value)
                            .draw();
                    }
                }).click(function (e) {
                    // We don't want to sort when users click on the search field
                    e.stopPropagation();
                });
            });
            lizMap.refreshDatatableSize("#attribute-layer-main-" + cleanLayerName);
        }
    }
});

attribute_filter_new

Selection from a popup feature geometry not working

I believe that my test project is ok, configured as explaine in the script readme. Using QGIS Server/Desktop 3.28.15 and LMWC 3.6.10

When clicking on the icon/star in the feature popup (to trigger the selection on the other layers) the dev console shows this:

Uncaught TypeError: lizMap.mainLizmap.digitizing.drawLayer.getSource is not a function
    popupSelectionButtonClickHandler getMedia:86
    addSelectionButton getMedia:32
    lizmappopupdisplayed getMedia:178
    lizmappopupdisplayed getMedia:154
    triggerEvent OpenLayers.js:255
    Z map.js:2679
    getfeatureinfo map.js:3440
    triggerEvent OpenLayers.js:255
    triggerGetFeatureInfo OpenLayers.js:1692
    handleResponse OpenLayers.js:1693
    callback OpenLayers.js:1689
    bind OpenLayers.js:77
    runCallbacks OpenLayers.js:1563
    onreadystatechange OpenLayers.js:1559
    dispatchEvent OpenLayers.js:1593
    fReadyStateChange OpenLayers.js:1596
    onreadystatechange OpenLayers.js:1579
    open OpenLayers.js:1574
    issue OpenLayers.js:1558
    GET OpenLayers.js:1564
    request OpenLayers.js:1691
    getInfoForClick OpenLayers.js:1683
    callback OpenLayers.js:718
    delayedCall OpenLayers.js:1384
    bind OpenLayers.js:77
    setTimeout handler*queuePotentialClick OpenLayers.js:1380
    handleSingle OpenLayers.js:1380
    click OpenLayers.js:1377
    triggerEvent OpenLayers.js:255
    handleBrowserEvent OpenLayers.js:261
    bindAsEventListener OpenLayers.js:77
    observe OpenLayers.js:238
    attachToElement OpenLayers.js:247
    initialize OpenLayers.js:244
    initialize OpenLayers.js:300
    init map.js:1362
    init map.js:6282
[getMedia:86:44](https:/***/lizmap/www/index.php/view/media/getMedia?repository=qgisserverdemos&project=teste&mtime=1709052737&path=media%2Fjs%2Fdefault%2FselectionFromPopupGeometry.js)

​

isochrones.js not working

for several weeks the ign-isochrones js of github has not worked, the isochrone calculation API - Geoservices - IGN and altimetrie

Lizmap Filter Form Issue?

Hi, is filter form not working for anyone else? I'm using Apache server and won't display using any of the previous/latest releases.
It may be an issue on my side but just checking.
Best,
Niall

googleStreetView - not working

hi,

this script doesn´t work properly!

i declare my google key here:
var gkey = 'MY-VALIDATED-GOOGLE-KEY';

but the script freezes lwc, it can't load vectorial layers and the street view doesn´t show anything

errors:

js?key=&callback=initGoogleStreetView:124 You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
Gh @ js?key=&callback=initGoogleStreetView:124
Oh @ js?key=&callback=initGoogleStreetView:122
google.maps.Load @ js?key=&callback=initGoogleStreetView:21
(anonymous) @ js?key=&callback=initGoogleStreetView:208
(anonymous) @ js?key=&callback=initGoogleStreetView:208
js?v=3&key=MY-VALIDATED-GOOGLE-KEY:52 InvalidValueError: setCenter: not a LatLng or LatLngLiteral: in property lat: not a number
_.Xc @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:52
_.$c @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:52
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:65
_.S.setValues @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:171
setMapObjectCenter @ OpenLayers.js:1084
moveTo @ OpenLayers.js:262
moveTo @ OpenLayers.js:271
(anonymous) @ OpenLayers.js:1082
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:169
Qd.A @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:170
_.R.trigger @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:167
(anonymous) @ map.js:86
(anonymous) @ common.js:105
ts @ map.js:5
us @ map.js:5
(anonymous) @ map.js:7
Promise.then (async)
vs @ map.js:7
(anonymous) @ map.js:57
Zt @ map.js:43
(anonymous) @ map.js:44
requestAnimationFrame (async)
hs @ map.js:1
du @ map.js:44
(anonymous) @ map.js:47
Xt.sa @ map.js:78
_.p.sa @ map.js:81
wu.l @ map.js:89
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:112
Promise.then (async)
eh @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:112
loadMapObject @ OpenLayers.js:1079
setMap @ OpenLayers.js:259
addLayer @ OpenLayers.js:173
createSwitcher @ map.js:2385
(anonymous) @ map.js:6476
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
(anonymous) @ map.js:6407
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
(anonymous) @ map.js:6404
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
(anonymous) @ map.js:6401
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
getJSON @ jquery-1.12.4.min.js:4
init @ map.js:6378
(anonymous) @ map.js:7469
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
ready @ jquery-1.12.4.min.js:2
K @ jquery-1.12.4.min.js:2
js?v=3&key=MY-VALIDATED-GOOGLE-KEY:52 InvalidValueError: setCenter: not a LatLng or LatLngLiteral: in property lat: not a number
_.Xc @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:52
_.$c @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:52
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:65
_.S.setValues @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:171
setMapObjectCenter @ OpenLayers.js:1084
moveTo @ OpenLayers.js:262
moveTo @ OpenLayers.js:271
redraw @ OpenLayers.js:242
(anonymous) @ map.js:7405
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:169
Qd.A @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:170
_.R.trigger @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:167
(anonymous) @ map.js:86
(anonymous) @ common.js:105
ts @ map.js:5
us @ map.js:5
(anonymous) @ map.js:7
Promise.then (async)
vs @ map.js:7
(anonymous) @ map.js:57
Zt @ map.js:43
(anonymous) @ map.js:44
requestAnimationFrame (async)
hs @ map.js:1
du @ map.js:44
(anonymous) @ map.js:47
Xt.sa @ map.js:78
_.p.sa @ map.js:81
wu.l @ map.js:89
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:112
Promise.then (async)
eh @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:112
loadMapObject @ OpenLayers.js:1079
setMap @ OpenLayers.js:259
addLayer @ OpenLayers.js:173
createSwitcher @ map.js:2385
(anonymous) @ map.js:6476
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
(anonymous) @ map.js:6407
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
(anonymous) @ map.js:6404
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
(anonymous) @ map.js:6401
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
n.(anonymous function) @ jquery-1.12.4.min.js:4
getJSON @ jquery-1.12.4.min.js:4
init @ map.js:6378
(anonymous) @ map.js:7469
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
ready @ jquery-1.12.4.min.js:2
K @ jquery-1.12.4.min.js:2
util.js:223 Google Maps JavaScript API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
Ew.m @ util.js:223
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:121
Promise.then (async)
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:121
setTimeout (async)
Ph @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:121
google.maps.Load @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:18
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:212
(anonymous) @ js?v=3&key=MY-VALIDATED-GOOGLE-KEY:212
controls.js:147 Uncaught TypeError: Cannot read property 'prototype' of undefined
    at controls.js:147
    at js?key=&callback=initGoogleStreetView:177
    at Object.<anonymous> (js?key=&callback=initGoogleStreetView:74)
    at js?key=&callback=initGoogleStreetView:177
    at js?key=&callback=initGoogleStreetView:74
    at js?key=&callback=initGoogleStreetView:177
    at Fe (js?key=&callback=initGoogleStreetView:74)
    at Be.ac (js?key=&callback=initGoogleStreetView:177)
    at util.js:1
(anonymous) @ controls.js:147
(anonymous) @ js?key=&callback=initGoogleStreetView:177
(anonymous) @ js?key=&callback=initGoogleStreetView:74
(anonymous) @ js?key=&callback=initGoogleStreetView:177
(anonymous) @ js?key=&callback=initGoogleStreetView:74
(anonymous) @ js?key=&callback=initGoogleStreetView:177
Fe @ js?key=&callback=initGoogleStreetView:74
Be.ac @ js?key=&callback=initGoogleStreetView:177
(anonymous) @ util.js:1
util.js:227 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
px.m @ util.js:227
(anonymous) @ js?key=&callback=initGoogleStreetView:122
Promise.then (async)
(anonymous) @ js?key=&callback=initGoogleStreetView:122
setTimeout (async)
Oh @ js?key=&callback=initGoogleStreetView:122
google.maps.Load @ js?key=&callback=initGoogleStreetView:21
(anonymous) @ js?key=&callback=initGoogleStreetView:208
(anonymous) @ js?key=&callback=initGoogleStreetView:208
util.js:227 Google Maps JavaScript API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key

thank you for this elegant solution :-)

Mapillary script : Add date or 360 pic filter

Hello,

I did add the script to get mapillary, it works well (thank you for this script). 👏

I would like to know if a filter is possible on the mapillary tiles ?

My use case is to show only mapillary sequence made since 2020 and contain 360 pictures on a map. Mapillary website can do it with this kind of filter : &dateFrom=2020-08-02&panos=true. The vector tile served by mapillary permit this too.

An example on mapillary website

I tried to add this kind of filter in the javascript in the url of the tile request or after url but I didn't make it work.

Muttualy exclusive group and expand-collapse-legend-when-layer-toggled

Hello,

I have used the js file expand-collapse-legend-when-layer-toggled.js to show the legend on click. It is really nice 👍

I have used it in a project where my groups are set as mutually exclusive group wich let only one layer active for each group.

  • I check layerA in the group > Ok the legend appear for layerA
  • I check layerB in the same group layerA is unchecked > Ok legend appear for layerB but for layerA the legend stay expanded as no click has been detected.

What i would expect is to have a legend expanded or not based on the status of the layer. It would permit to have expanded legend for all the layer toggled in the beginning (which could be great in my point of view).

Add a button to download a layer in xlsx

Hello,

I am looking to add a button to export a layer (by default) in xlsl format.

The goal is to add this button in the nav nav-list to avoid the user having to open the attribute table.

Thank you.

Jérémy

GoogleStreetView : Bug d'affichage / Display bug

Bonjour,

Nous utilisons le plugin JavaScript GoogleStreetView pour LizMap.
Cela fonctionne parfaitement dans tous nos projets à l'exception d'un où l'affichage bug.
Avez-vous une idée d'où vient le problème ?
Merci


Hi,

We are using the GoogleStreetView JavaScript on LizMap.
It works well with all our projects except one where the display bugs :
Do you have an idea of the problem ?
Thanks

Copie_ecran

Collapsible groups

Sorry but I wasn't able to show the collapsed groups in lizmap.
Can anyone help me?

Lizmap 3.7.5

features added with edit_gpx not printable

A very good script, that adds missing annotation functionality to Lizmap 3.3.
When I try to print a map with features added with edit_gpx they do not appear on a printed map.
I think for most poeple this is one reason to use such a functionality. Would be important if that could be fixed.

In addition to this, the name should be changed, since the script already supports other formats and isn't limited to editing.
Missing or desired functionality:

  • drawing polygons
  • adding text/labels to features (annotations)
  • simple styling function (line, fill: color, opacity, width, text-size).
    something like the outils de croquis from IGN.

Nevertheless a great work You did.

Hamburger Menu doesn't work

Hello,

I'm currently trying to customize some web apps and I just found out that you could add some js and css directly into a media folder. I tried several useful scripts here but I have some problems with the hamburger menu.

As I put the .js into the right folder, media/js/myproject/add_hamburger_menu.js , the UI loses nearly all buttons, for both mobile and deskop interface. However, the geolocation seems to work so I'm kind of lost.

I saw that there was a specific theme too, so I put it into media/themes/myproject/css/add_hamburger_menu.css , but maybe I need to put it into one of the "css" default files found thanks to the lizmap documentation ?

thanks for the help

[Bug]: baselayers selector

What is the bug?

when i clicked on baselayer selector, the baselayers switcher change but baselayers doesn't seems to change.

Steps to reproduce the issue

i use this script

Versions, safeguards, check summary etc

lizmap-web-client : 3.7.3
qgis-server: 3.34

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

Windows 10

Browsers

Firefox

Browsers version

122.0.1

Relevant log output

No response

zoom_to_feature_at_startup lizmap zooms to center of mapextends

tried to implement the zoom_to_feature_at_startup script. LM 3.3, PlugIn: 3.2.17, QGIS 3.14-1, QGIS-server
When I call the lizmap page with the appended #fid: string

https://xxx.xxx.xxx.xxx/lizmap/index.php/view/map/?repository=fn&project=lizmap#fid:v_parzellen_74ad241d_3f1e_4081_8e88_0d4031463c95.4642

Lizmap starts rendering the baselayer at the initial extend, then zooms to the center of the original extend at the closest zoom level. This behavior does not change when I pass another id.
I left #fid: although I don't have an 'fid'-field. My pk_field in the table is 'id'. I also tried to change this to #id:, but this did not fix the problem.
In the console jQuery complains about an empty string, that is passd to getElementById()?
The script is loaded corectly.
The project file is in EPSG:3857 and the layer data in EPSQ:2169, but layers show up on the right place.

layer features attribute data in javascript

i like to get the attribute data of feature in layer in the javascript and do some operation

image

for example if i click on 110 point i have the vale for filed 0=110

i need this information in lizmap and do some operation...

how is it possible

Google street view - base layer problem

Hi,
we are working on a lizmap project containing both google maps and openstreetmaps as baselayers and they work properly.

When we add google_street_view.js, openlayers basemap continue to be shown correctly but google basemaps doesn't work anymore (an error message is delivered, probably due to a coordinate system issue).

Do you have any ideas on how to sort things out?
Thanks

Addpdf.js modification

I was working with addpdf.js, and made some minor modifications:

  1. I've implemented a somewhat more dynamic link to the pdf file, according to 3liz/lizmap-web-client#712 (comment);
  2. The button for fullscreen view has been changed;
  3. Fullscreen and refresh button position has been fixed (they were overlapping with the Close button of the right-dock).

As for usage: you should create a subfolder in your project's media folder, and the pdf file should be copied directly there. Then the path to the pdf should be set at line 5 below in the addpdf.js file. After that the javascript file should be copied to the server as in the official documentation.

lizMap.events.on({
    uicreated: function(e) {
			var mediaLink = OpenLayers.Util.urlAppend(lizUrls.media,OpenLayers.Util.getParameterString(lizUrls.params)
		);
			var frameSrc = mediaLink +'&path=/media/yourfolder/yourfile.pdf';
      lizMap.addDock(
            'pdf',
            'Documentation',
            'right-dock',
            '<iframe src="' + frameSrc + '" style="height:calc(100vh - 100px); height: -o-calc(100vh - 100px); height: -webkit-calc(100vh - 100px); height: -moz-calc(100vh - 100px);" width="100%" scrolling="no" frameborder="0"></iframe',
            'icon-file'
        );
        //-------------------------------------------
        //On ajoute le bouton1
        var html = '<button id="bouton1" class="btn btn-defaut"><i class="icon-fullscreen"></i></button>'
        $('#right-dock').append(html);
        $('#bouton1')
        .css('position', 'absolute')
        .css('top', '5px')
        .css('right', '140px')
		.css('padding', '2px 14px')
        ;
        //-------------------------------------------
        //On ajoute le bouton2
        var html = '<button id="bouton2" class="btn btn-defaut"><i class="icon-refresh"></i></button>';
        $('#right-dock').append(html);
        $('#bouton2')
        .css('position', 'absolute')
        .css('top', '5px')
        .css('right', '80px')
		.css('padding', '2px 14px')
        ;
        //-------------------------------------------
        //On utilise le bouton1 pour ouvrir l'aide dans un nouvel onglet
        $('#bouton1').click(function () {
          window.open(frameSrc);
        });
        //On utilise le bouton2 pour recharger le pdf
        $('#bouton2').click(function () {
          var iframe = $('<iframe src="' + frameSrc + '" style="height:calc(100vh - 100px); height: -o-calc(100vh - 100px); height: -webkit-calc(100vh - 100px); height: -moz-calc(100vh - 100px);" width="100%" scrolling="no" frameborder="0"></iframe>');
          $(".menu-content").find("iframe").remove();
          $("#pdf.tab-pane.active .menu-content").append(iframe);
        });
      },
      rightdockopened: function(e) {
        if ( e.id == 'pdf') {
          $('#bouton1').css({
            'display':'block'
          });
          $('#bouton2').css({
            'display':'block'
          });
        }
        else {
          $('#bouton1').css({
            'display':'none'
          });
          $('#bouton2').css({
            'display':'none'
          });
        }
      }
});

snap on many layers - script error

hi @drillinP @mdouchin (and all users who have tried or want to try this script)

please, i would be very happy if i could use your script!

but in first, with an original configuration, i get this error:

snap

another question: how does it work?

i have a layer for edition, named LAYER_EDITION and i need to snap it with 3 layers (LAYER_A, LAYER_B and LAYER_C). how should i configure the script options?

// Options
var snapLayerName = '';

var snapLayers = {
        'LAYER_EDITION' : {
        'layers': [
             'LAYER_A',
	     'LAYER_B',
	     'LAYER_C'
        ],
        snapToNode: true,
        snapToEdge: false,
        snapToVertex: true
       }
}

thanks very much for your work and thanks in advance for your help

numeric attribute_table_column_filter

Hi,
I use the great attribute_table_column_filter.js but it's only possible to filtre with a search element. I would like to know if it's also possible to add the capacity to filter numeric fields with thoses elements : egal, superior, superior or egal, inferior, inferior or egal ?

Thanks for your help

external_links_from_map_click not working on mobile devices

script external_links_from_map_click is not working on mobile phone (iOS, I am not sure about android).

my suggestion to develop this script:
it would be good if there was a point on the map where the click was made, something like google maps

@mdouchin I tagged you because you added this script

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.