• #30987
    Forcetalks

    How can I remove the markers that lies outside the circle boundary in Salesforce?

    How can I remove the markers that lies outside the circle boundary in Salesforce?

     

    #31243
     Prachi #6
    Forcetalks

    I am not sure if the solution I tried is applicable or not.May be the code below will help.

    $(function () {
    var oldArr = [];

    var showNearestLocation = function (distance) {

    var longitude = myloc.lng,
    latitude = myloc.lat;
    var res = leafletKnn(gjLayer).nearest(
    [longitude, latitude], 5, distance);

    diff = oldArr.filter(function (x) { return res.indexOf(x) < 0 });

    for (j = 0; j < diff.length; j++) {
    map.removeLayer(diff[j].layer);
    oldArr.splice(oldArr.indexOf(diff[j]), 1);
    }

    if (distance > 0) {
    if (res.length) {
    map.setView(res[0].layer.getLatLng(), 12);
    for (i = 0; i < res.length; i++) {
    map.addLayer(res[i].layer);

    if ($.inArray(res[i], oldArr) === -1)
    oldArr.push(res[i]);
    }
    }
    }

    }
    var slider = document.getElementById(‘myRange’);
    var output = document.getElementById(‘demo’);
    output.innerHTML = slider.value + scale;

    slider.oninput = function (val) {
    output.innerHTML = this.value + scale;
    circle.setRadius(this.value);
    showNearestLocation(this.value);
    }
    });

    thanks.

    #34852
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    Could you please provide more detail for your requirement.

    Thanks.

    #36198
    Salesforce | Parul Parul #2
    Forcetalks

    I didn’t understand the question can you explain more.

     

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?