Dynamic Map Markers

5 posts, 0 answers
  1. Chuck
    Chuck avatar
    35 posts
    Member since:
    Oct 2008

    Posted 26 Jun 2014 Link to this post

    I am using the map and all is working mostly. My problem is how can I change the map marker based on the data feed?

    I am getting my data as latlng = [32.123, 80.123], name = "KDAY", color = "green"

    I can get the marker to show up in the correct place and the name set properly the next thing I need to do is set the color of the marker based on the color field. I have three different colors that I need to be able to use.

    Any ideas?
  2. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 30 Jun 2014 Link to this post

    Hi Chuck,

    The problem here is to set the marker's color because in the markerCreated haven't it. But we will fix this issue for the next official release of the Kendo UI.

    Now you can set the color only with class. For other two properties you can use titleField and locationField. You can examine this example: http://trykendoui.telerik.com/@germanov/eYaY/3

    Regards,
    Hristo Germanov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Chuck
    Chuck avatar
    35 posts
    Member since:
    Oct 2008

    Posted 30 Jun 2014 Link to this post

    Thanks for your help. I did manage to get it working.

    Here is my short write up and solution

    Hope this helps someone else.

    Chuck
  5. Matt
    Matt avatar
    2 posts
    Member since:
    Dec 2012

    Posted 05 Apr 2015 Link to this post

    Hristo,

     Was this functionality part of a release yet? If so can you send me a link to an example on setting a markers color.

     

    Thanks,

     

    Matt

  6. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 08 Apr 2015 Link to this post

    Hi,

    The markerActivate event will fire when a marker DOM element has been created.
    It can be used to change sprites, styles and content on per-element basis.

    I hope this helps.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready