0
for(var i = 0; i < jsonIncident.length; i++)
{
    var x = jsonIncident[i].Latitude        
    var y = jsonIncident[i].Longitude 

    //I can only retreive lat and lon for the image position
    //However to add an image i need it to be in x and y format.


    var type = jsonIncident[i].IncidentType
    var time = jsonIncident[i].MyDate
    var loc = jsonIncident[i].MyDate
    var desc = jsonIncident[i].Description
    var image

    //This where you add the image

    var incident = new esri.Graphic({ "geometry": { "x": x, "y": y,
        "spatialReference": { "wkid": 3414 }
        }, "attributes": { "Title": type,
        "Time": time, "Location": loc, "Description": desc, } });

        incident.setSymbol(image);
        incident.setInfoTemplate(infoTemplate);
        map.graphics.add(incident);

}

map.infoWindow.resize(320, 130);
4

1 に答える 1

0

投影座標系または地理座標系を使用してグラフィックを作成できると思います。http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_graphics.htmを参照してください。

于 2012-07-19T01:25:25.617 に答える