Add pins to Map via JSON

86 Views Asked by At

I'm trying develop a map based app, I'm adding pins:

function Page1_MapView1_OnShow(e) {
    Pages.Page1.MapView1.addPin({
        id : "1",
        title : "Test 2",
        subtitle : "Telefon: +90 999 999 99 99",
        latitude : 40.132857,
        longitude : 26.396907,
        selectedImage : "pinSelected",
        unSelectedImage : "pinUnselected",
        draggable : false,
        animate : true
    });
    Pages.Page1.MapView1.addPin({
        id : "2",
        title : "Test 2",
        subtitle : "Telefon: +90 999 999 99 99",
        latitude : 40.142857,
        longitude : 26.406907,
        selectedImage : "pinSelected",
        unSelectedImage : "pinUnselected",
        draggable : false,
        animate : true
    });
}

But I do not want update my program for just add some pins. I tried do something WebClient and JSON but I couldn't. So, can you show me a way to solve my problem? How I can get necessary data for add pins to mapview?

1

There are 1 best solutions below

0
On

I guess you didn't assign any imagess to pins.

selectedImage:"pinSelected",
unSelectedImage:"pinUnselected",

These codeLines shows that you have pinUnselected and pinUnselected variables . Did you assign any image to them ?

If you assign them to any image these pins will be shown.