NetXMS Support Forum

English Support => General Support => Topic started by: lweidig on December 20, 2018, 05:37:38 AM

Title: [SOLVED] GeoLocation function not found
Post by: lweidig on December 20, 2018, 05:37:38 AM
Running a script like the one at:
https://wiki.netxms.org/index.php?title=Script_Example:_Setting_node_geolocation_from_SNMP&mobileaction=toggle_view_desktop

Gives an error on the GeoLocation line with function not found.  We are running 2.2.10.  How do we correct this?
Title: Re: GeoLocation function not found
Post by: lweidig on December 21, 2018, 02:50:01 PM
Victor any ideas how to correct this?  The line of code is pretty much the one in the page referred to.  Thanks!
Title: Re: GeoLocation function not found
Post by: Victor Kirhenshtein on December 21, 2018, 03:19:16 PM
Hi,

replace code like

geoLoc = GeoLocation(lat, long);

with

geoLoc = new GeoLocation(lat, long);


I'll update script example as well.

Best regards,
Victor
Title: [SOLVED] Re: GeoLocation function not found
Post by: lweidig on December 21, 2018, 03:25:40 PM
That was the fix, thanks!