1

Issue with the Gurtam Maps application

Тема: Issue with the Gurtam Maps application

We wanted to use the Gurtam Maps app code, which is in GIT, but at the moment of executing, it sends us this error code:

hst-api.wialon.com/gis_render/36_20_11/12243390/tile.png:1 GET https://hst-api.wialon.com/gis_render/36_20_11/12243390/tile.png 401

The fragment that we detected that initializes the map is the following:

/**
        * Initialize map (Leaflet)
        *
        * Added handler on click and some one, setting of map
        */
        var _initMap = function(){
                        
            // create Gurtam Maps layer
            app.sections = [];
            var gurtam = L.tileLayer.webGis(wialon.core.Session.getInstance().getBaseGisUrl('render'), {
                attribution: "Gurtam Maps",
                minZoom: 4,
                userId: wialon.core.Session.getInstance().getCurrUser().getId()
            });
            // create map object
            MAP = L.map("map", {
                center: [53.505,28.49],
                zoom: 6,
                layers: [gurtam],
                doubleClickZoom: false,
                dragging: true
            });

            maps = MAP;

            // create map object
            ROUTE = L.polyline([], {color: 'red'}).addTo(MAP);

            MAP.on('mouseup',function(e){
                MAP.removeEventListener('mousemove');
            });

            MAP.on("click", function (evt) {
                var $input;
                /* jshint eqeqeq: false*/
                if(_activeTab == 'tab-search'){
                    $input = $('.search-point.selected');
                    $('input.address-input').removeClass('selected');
                }else{
                    $input = $('input.address-input.selected');
                }
                _searchBlock();
                // var $input = $('input.address-input.selected');
                if($input && $input.length){
                    show_marker(evt.latlng, false, $input, true, function(){
                        $('.add-point').trigger('click', true);
                        _searchBlock();
                    });
                }
            });

            MAP.on("dblclick", function (evt) {
                var $input, cb = function(){};
                /* jshint eqeqeq:false */
                if(_activeTab == 'tab-search'){
                    $input = $('.search-point');
                    if($input.length){
                        show_marker(evt.latlng, false, $input, true, function(){
                            $('.add-point').trigger('click', true);
                        });
                    }
                }else    if(POINTS.length >= 2 && !$('.find-address').val() && POINTS.length < MAX_POINTS){
                    var notFillInputs = _.filter(POINTS, function(point){ return !point.lat || !point.lon; });
                    if(notFillInputs.length){
                        var id = notFillInputs[0].id;
                        if(id)
                            $input = $('.point[data-point-index='+id+']').find('input');
                    }else{
                        $input = $('.find-address');
                        cb = function(){
                            $('.add-point').trigger('click', true);
                        };
                    }
                    _searchBlock();
                    if($input && $input.length){
                        show_marker(evt.latlng, false, $input, true, cb);
                    }
                }else{
                    app.notify.add($.localise.tr('You have reached the limit of points.'), true, 'error');
                }
            });
        };


We do not know what could be happening. Could you help us identify the problem?

We wait comments

2

Issue with the Gurtam Maps application

Re: Issue with the Gurtam Maps application

Hi Denisse
The code on github was outdated.

Just updated https://github.com/wialon/wialon-app-gurtammaps, everything works for me, please check.

Thanks for reporting!

3

Issue with the Gurtam Maps application

Re: Issue with the Gurtam Maps application

Thank you so much for this support.

4

Issue with the Gurtam Maps application

Re: Issue with the Gurtam Maps application

I'm just posting to get my 5 posts so I can ask the question I really need answered.

-Eron
Skype: eron.iler
Fleetistics.com
5

Issue with the Gurtam Maps application

Re: Issue with the Gurtam Maps application

eron.iler пишет:

I'm just posting to get my 5 posts so I can ask the question I really need answered.

Hello!
Please specify your questions regarding this topic

Diana Cheley
Wialon Hosting Expert
Gurtam
6

Issue with the Gurtam Maps application

Re: Issue with the Gurtam Maps application

Hi,

We are using the app GurtamMaps with the code in github but we are want to know if posible to change of GurtamMaps Layer for GoogleMaps  Layer and add of provider googlemaps for calculate route?