none
Custom icons based on SQL parameter RRS feed

  • Question

  • Hi

    I am trying to create custom icons in virtual earth for our current site based on a parameter returned from the returnresults.php (which brings the MSSQL data into the map) , but I can't get it to work:

    Any ideas to how I can get this working?

    Code:

    if ( type == "Learner")


    //Set the icon
     a=new VECustomIconSpecification
     a.Image = "pin1.gif"
     a.TextContent = (title);
     a.TextBold = true;
     a.TextSize = 7;
     a.ImageOffset= new VEPixel(-2,-6);
     a.ForeColor = new VEColor(30, 0, 30, 0);


    shape.SetCustomIcon(a);
    shape.textcontent = (title)   
    shape.SetTitle(title);
        shape.SetDescription(description);
    map.AddShape(shape); 

    else

    //Set the icon
     a=new VECustomIconSpecification
     a.Image = "pin2.gif"
     a.TextContent = (title);
     a.TextBold = true;
     a.TextSize = 7;
     a.ImageOffset= new VEPixel(-2,-6);
     a.ForeColor = new VEColor(30, 0, 30, 0);


    shape.SetCustomIcon(a);
    shape.textcontent = (title)   
    shape.SetTitle(title);
        shape.SetDescription(description);
    map.AddShape(shape); 

    Wednesday, June 24, 2015 8:16 AM

Answers