Display incidents in a Map view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 02:28 AM - edited 02-13-2024 02:19 AM
Hello,
Here I am trying to view multiple incidents with the below script. But it is showing only one incident . can anyone help me on this please..
var gr = new GlideRecord("incident");
gr.addQuery('priority', '1');
gr.addActiveQuery();
gr.query();
while (gr.next()) {
if (gr.location.latitude && gr.location.longitude) {
var item = map.addItem(gr);
item.latitude = String(gr.location.latitude);
item.longitude = String(gr.location.longitude);
item.dialog_title = gr.getDisplayValue();
item.icon = "https://maps.google.com/mapfiles/kml/pal3/icon51.png";
item.icon_width = "32";
item.icon_height = "32";
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 02:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 12:20 AM
It would really help if you not just repeat your question over and over again, but also mention what you already tried and what others provided you as solution (including what didn't work from those suggestions).
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark