Skip to main content
semi colon after setContent will break the chain
Source Link

I am using the other answer in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' +href=" google form ' + e.latlng.lat + 
                    '" target="_blank">Form</a>'); 
        .openOn(map);
    }
});

I am using the other answer in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});

I am using the other answer in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href=" google form ' + e.latlng.lat + 
                    '" target="_blank">Form</a>') 
        .openOn(map);
    }
});
added 55 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I am using the answer aboveother answer in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});

I am using the answer above in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});

I am using the other answer in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});
deleted 9 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I am using the answer above in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});

Thanks!

I am using the answer above in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});

Thanks!

I am using the answer above in a leaflet map to allow users to send me feature requests based on the clicked location in a map, which then opens a pre-filled google form with the lat long from that position. Those points are then shown on the map using sheetsee/tabletop. I added a map.hasLayer(my requests layer) so the user is not always seeing the popup when the map is clicked:

    map.on('click', function(e) { 
    if (map.hasLayer(requests)) {
        var requestform = e.latlng;
        var formpopup = L.popup();
        .setLatLng(requestform)
        .setContent('<a href="' + google form + e.latlng.lat + '" target="_blank">Form</a>');
        .openOn(map);
    }
});
Source Link
Malcolm
  • 488
  • 4
  • 14
Loading