This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

World Map "0 Objects at this location"

Hi All,

I am running a script to Add Lat/Long Coordinates to the WorldMapPoints table, which works fine. If, however multiple objects are at the same location (have the same coordinates), the World Map shows "0 Objects at this location".

I have checked for this issue on Thwack and it is described by  in a 2017 post https://thwack.solarwinds.com/t5/SAM-Documents/Automatically-Update-World-Map-Points-Based-On-Custom-Property/ta-p/528879/page/2/show-comments/true including a workaround (manage map, select location, editt, save, submit) which works fine, but doesn't really work for many locations. 

So I was wondering if anyone since then found an automated solution for this issue  since then?

Much appreciated,

John

  • I never found a solution that worked 100%. I ended up trying various scripts and writing my own but never got it to work "just right".


    Most instances where I have seen the map used they didn't add/remove a lot of devices or they used groups on the map that don't change often. So I use the Custom Property import method and then run a script to update the location field.

  • Hi ,

    So the script you are using is automating the manual process of manage map, select location, edit, save, submit?

    If so, could you please share that script?

    Thanks, John

  • Hi 

    No, when you import via Manage Custom Properties it only imports the longitude/latitude values. There is no option for Locations/StreetAddresses so every point on the map is labelled "this location". 

    You can use something like the below that will update the location/streeaddress field with a custom property value linked by the NodeID (in this case, "SiteName").

    MERGE WorldMapPoints wmp
    USING NodesCustomProperties ncp
    ON wmp.InstanceID = ncp.NodeID
     WHEN MATCHED THEN
      UPDATE SET wmp.StreetAddress = ncp.SiteName;

    I didn't find a solution to the problem where the map shows "0 objects at this location".

  • I am working on the same idea and noticed something. You could be doing this very differently but it's at least a clue on what to look at.

    Bit of backstory. I store coordinates for a subnet in the IPAM group object using Custom Properties for Latitude and Longitude. The short version of my script is it looks up the IP address of the node on the IPAM table(s), gets the coordinates from the IPAM group object for the IP address, and then merges the results into the WorldMapPoints table.

    When I run the SQL, it had the same issue you describe and when I looked at the results in the WorldMapPoints table, I found that the real datatype did not like getting assigned a float datatype directly and screwed up. Like the value 40.43365 was stored as 40.433650970459.

    I converted the coordinates to a VARCHAR first so the values that get assigned in the WorldMapPoints are exactly what was stored in the custom properties. Once I did that, the World Map "0 Objects at this location" problem completely went away.

    As I said, I don’t know how you are doing this but maybe look at the values for Latitude and Longitude in the WorldMapPoints table directly in the database. Could be there is an issue with converting from one numeric datatype to float or could be that the World Map/Mapquest does not like long float numbers even though that‘s what the WorldMapPoints stores the values as.