Skip to content

bindtoolup issue #181

@mostafahadizadeh1991

Description

@mostafahadizadeh1991

Hi,
I wanted to insert "value" numbers in a Geojson into leaftlet realtime geographical point rather than marker icon.
I used the bindtoolup in leaflet and it compiled without any error, but when I tested it in the realtime leafet, I encountered to the following problem.
this is my code:

var map = L.map('map'),
    realtime = L.realtime({
        url: '/frostbite/Main.geojson',
        crossOrigin: true,
        type: 'json'
    }, {
        interval: 3 * 1000,
		getFeatureId: function(feature) { return feature.properties.mmsi; },
    pointToLayer: function (feature, latlng) {
        return L.marker(latlng, {
			  radius: 8.0,
			  fillOpacity: 0,
			  Opacity: 0,
			  fillColor: 'transparent',
			  color: 'transparent',
			}).bindTooltip(feature.properties.value).openTooltip();
    }
    }).addTo(map);

but I received the following error in console:

(index):333 Uncaught TypeError: realtime.bindTooltip is not a function
at bindFeaturePopupx ((index):333)
at Array.forEach ()
at NewClass. ((index):351)
at NewClass.fireEvent (leaflet-src.js:461)
at NewClass._onNewData (leaflet-realtime.js:787)
at NewClass. (leaflet-realtime.js:696)
at leaflet-src.js:54
at success (leaflet-realtime.js:343)
at XMLHttpRequest. (leaflet-realtime.js:87)

Is there anyone to solve this problem?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions