- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2014 08:02 AM
Hi everyone I'm having the following issue, I'm currently creating a Google Map Page in Service Now, the script that I'm currently using is similar to the one at the wiki page (http://wiki.servicenow.com/index.php?title=Using_Map_Pages) I just changed the query in order to find open incidents from a singular user, the Issue is that "counts" are displaying in the correct cities or areas on the map, but there are only 1 marker , if you click on one of the numbers the Google maps,the info windows shows up in the same place, it overlaps with previous info windows, please see my attached image to understand this behavior.(try to zoom it , and you will see 2 info windows)
var uri = gs.getProperty("glide.servlet.uri");
var count = new GlideAggregate('incident');
count.addQuery('state', '1');
count.addQuery('user_id', '=', 'ITOC.admin');
count.addAggregate('COUNT', 'location');
count.query();
while (count.next()) {
var loc = count.location;
var locCount = count.getAggregate('COUNT', 'location');
if (locCount > 0) {
var item = map.addItem(count);
item.latitude = loc.latitude;
item.longitude = loc.longitude;
item.marker_label = locCount;
item.label_offset_left = -4;
item.label_offset_top = -20;
var link = 'href=' + uri + 'incident_list.do?sysparm_query=active%3Dtrue^location%3D' + loc;
item.html = '<a ' + link + '>' + loc.getDisplayValue() + ' (' + locCount + ')</a>';
item.icon = "images/red_marker.png";
item.icon_width = 24;
item.icon_height = 24;
}
}
This is how actually is being displayed...
This is what I was expecting.. .
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2014 06:47 AM
This is a new issue and related but different:
PRB607063 :Google maps API 3.14 deprecated - Only one marker is placed on map
This affects all versions of the platform.
(Note: This is a separate issue from PRB597310 / KB0538622 which exhibits the same symptom)
Workaround:
------------------
- Navigate to Table cmn_map_page > Open the record you want.
- Add this line to the script in the while loop. Note : if you have more than one while loop in the script logics to show the map icons, then the below line should be added to all the while loops.
item.marker_label = "<img src='https://maps.google.com/mapfiles/marker.png'/>";
There is no fix, only this workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2014 10:26 AM
I had a similar issue. Please see this information from support. This resolved my issue:
https://hi.service-now.com/kb_view.do?sys_kb_id=50996871877c6500491683bdff434da2
Google Maps request should specify API version in request
Description
A recent update to the default version of the Google Maps API causes multiple pins on a map to appear as one.
Workaround
Apply the attached update set. Remove the resulting sys_update_xml record to prevent issues when upgrading in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2014 11:32 AM
Hi Joel, thanks for your response, I can't get to your link , I get this message "Security constraints prevent access to requested page"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2014 12:28 PM
Does this appear to be your issue?
Description
A recent update to the default version of the Google Maps API causes multiple pins on a map to appear as one.
If so, call technical support and see if they can give you access to this KB:
KB0538622
Also, you might want to check to see if logging into the http://hi.service-now.com website allows you access to this knowledgebase article. It has an attached update set that I probably cannot attach to this forum post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2014 12:40 PM
I think we don't have access to http://hi.service-now.com is there is another way to get those files?