add dynamical URL to leaflet iconUrl The Next CEO of Stack Overflow

pgfplots: How to draw a tangent graph below two others?

Could a dragon use its wings to swim?

Can Sri Krishna be called 'a person'?

How to unfasten electrical subpanel attached with ramset

Another proof that dividing by 0 does not exist -- is it right?

Horror film about a man brought out of cryogenic suspension without a soul, around 1990

My boss doesn't want me to have a side project

Can this transistor (2n2222) take 6V on emitter-base? Am I reading datasheet incorrectly?

How can I prove that a state of equilibrium is unstable?

Why did early computer designers eschew integers?

Strange use of "whether ... than ..." in official text

Finitely generated matrix groups whose eigenvalues are all algebraic

Man transported from Alternate World into ours by a Neutrino Detector

Why did Batya get tzaraat?

A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Compilation of a 2d array and a 1d array

The sum of any ten consecutive numbers from a fibonacci sequence is divisible by 11

Raspberry pi 3 B with Ubuntu 18.04 server arm64: what pi version

Shortening a title without changing its meaning

What does it mean 'exit 1' for a job status after rclone sync

Ising model simulation

Is it possible to create a QR code using text?

Is a linearly independent set whose span is dense a Schauder basis?



add dynamical URL to leaflet iconUrl



The Next CEO of Stack Overflow












0















I'm new in the dev-world and my english isn't very good, but I really need your help for a problem that damage my brain since a long hours and I can't see any more how can I do !!! Hope you can help me !



My problem : I need to custom icon for my app . One icon for a group of markers. I add a URL for each icone and I don't know how to add it dynamically to my iconUrl. It to change for each select.



Here is my code : I tries this but I don't even know if it works !!!



function displayIconByCAt(iconUrl) {
console.log(iconUrl);



var data = iconUrl.toString(data);
console.log(data);
createNewIcon(data);
}
function createNewIcon(data){
var iconMarkers = L.icon({
iconUrl:'',
iconSize: [38, 38], // size of the icon



    iconAnchor: [22, 94], // point of the icon which will correspond to marker's location

popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAncho
})
var iconNew = iconUrl;
var value = data;

console.log(iconNew);
console.log(value);

iconMarkers [iconNew] = value;

console.log(iconMarkers[iconNew]);


}
console.log(iconMarkers);









share







New contributor




KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I'm new in the dev-world and my english isn't very good, but I really need your help for a problem that damage my brain since a long hours and I can't see any more how can I do !!! Hope you can help me !



    My problem : I need to custom icon for my app . One icon for a group of markers. I add a URL for each icone and I don't know how to add it dynamically to my iconUrl. It to change for each select.



    Here is my code : I tries this but I don't even know if it works !!!



    function displayIconByCAt(iconUrl) {
    console.log(iconUrl);



    var data = iconUrl.toString(data);
    console.log(data);
    createNewIcon(data);
    }
    function createNewIcon(data){
    var iconMarkers = L.icon({
    iconUrl:'',
    iconSize: [38, 38], // size of the icon



        iconAnchor: [22, 94], // point of the icon which will correspond to marker's location

    popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAncho
    })
    var iconNew = iconUrl;
    var value = data;

    console.log(iconNew);
    console.log(value);

    iconMarkers [iconNew] = value;

    console.log(iconMarkers[iconNew]);


    }
    console.log(iconMarkers);









    share







    New contributor




    KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I'm new in the dev-world and my english isn't very good, but I really need your help for a problem that damage my brain since a long hours and I can't see any more how can I do !!! Hope you can help me !



      My problem : I need to custom icon for my app . One icon for a group of markers. I add a URL for each icone and I don't know how to add it dynamically to my iconUrl. It to change for each select.



      Here is my code : I tries this but I don't even know if it works !!!



      function displayIconByCAt(iconUrl) {
      console.log(iconUrl);



      var data = iconUrl.toString(data);
      console.log(data);
      createNewIcon(data);
      }
      function createNewIcon(data){
      var iconMarkers = L.icon({
      iconUrl:'',
      iconSize: [38, 38], // size of the icon



          iconAnchor: [22, 94], // point of the icon which will correspond to marker's location

      popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAncho
      })
      var iconNew = iconUrl;
      var value = data;

      console.log(iconNew);
      console.log(value);

      iconMarkers [iconNew] = value;

      console.log(iconMarkers[iconNew]);


      }
      console.log(iconMarkers);









      share







      New contributor




      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm new in the dev-world and my english isn't very good, but I really need your help for a problem that damage my brain since a long hours and I can't see any more how can I do !!! Hope you can help me !



      My problem : I need to custom icon for my app . One icon for a group of markers. I add a URL for each icone and I don't know how to add it dynamically to my iconUrl. It to change for each select.



      Here is my code : I tries this but I don't even know if it works !!!



      function displayIconByCAt(iconUrl) {
      console.log(iconUrl);



      var data = iconUrl.toString(data);
      console.log(data);
      createNewIcon(data);
      }
      function createNewIcon(data){
      var iconMarkers = L.icon({
      iconUrl:'',
      iconSize: [38, 38], // size of the icon



          iconAnchor: [22, 94], // point of the icon which will correspond to marker's location

      popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAncho
      })
      var iconNew = iconUrl;
      var value = data;

      console.log(iconNew);
      console.log(value);

      iconMarkers [iconNew] = value;

      console.log(iconMarkers[iconNew]);


      }
      console.log(iconMarkers);







      leaflet





      share







      New contributor




      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      KaCreationKaCreation

      1




      1




      New contributor




      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      KaCreation is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          KaCreation is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317424%2fadd-dynamical-url-to-leaflet-iconurl%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          KaCreation is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          KaCreation is a new contributor. Be nice, and check out our Code of Conduct.













          KaCreation is a new contributor. Be nice, and check out our Code of Conduct.












          KaCreation is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317424%2fadd-dynamical-url-to-leaflet-iconurl%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

          Meter-Bus Содержание Параметры шины | Стандартизация |...