Location Maps only populating one location

jon_fung
Giga Contributor

Hi All,

 

I've noticed that there is an issue with the location maps where it will only show one location on each map.

 

From what I can see the location pages are setup to glide record the relevant table and populate the locations based on the Latitude and Longitude of the relevant location, e.g. All Locations map page glides the cmn_location table and and populates the icons and loops through until it goes through all the records.

 

However I've found that this is the case, even on fresh instances and the demo instance.

 

Has anyone else come across this? If so was it fixed and how?

1 ACCEPTED SOLUTION

mike_zelnik
ServiceNow Employee
ServiceNow Employee

Just did some investigation and this is a known error, see ServiceNow KB: Google Maps request should specify API version in request (KB0538622) for a workaround.


View solution in original post

11 REPLIES 11

Bhavesh Jain1
Giga Guru

This is what I see on my instance. Looks fine to me.



Capture.PNG


Thanks.


I've tested on an OOTB instance that was only provisioned last week, no customisations or personalisations and it sshows the same as the instance that I am developing on. It appears to only glide the first record from the location table and then stops for some reason.



Would you be able to post the script that is in the All Locations entry on the Location Pages table please so I can compare if there are any differences?


Hi Bhavesh,

I am trying similar to this but it is not working for me , can you please guide me on the same.

 

I have a report to create by using map type.

I have created below things,

Point 1 - I have created a Map source and generated the map levels

Point 2 - Group Mappings : I have created 10 location mappings in that and selected to that map source 

And I have ran the report as follows but it is showing "Loading Report" but not responding any thing after long time also. Please guide 

Bhavesh Jain1
Giga Guru

Code:



var gr = new GlideRecord("cmn_location");


gr.query();


while (gr.next()) {


  var item = map.addItem(gr);


  item.latitude = gr.latitude;


  item.longitude = gr.longitude;


  item.dialog_title = gr.getDisplayValue();


  item.icon_width = "16";


  item.icon_height = "16";


}





Capture.PNG


Regards,


Bhavesh


IGate-logo.png


http://www.igate.com