TypeError: Cannot call method 'toString' of undefined" in Park and Recreation Finder

Last Published: April 25, 2020

Error Message

The following error message is returned in the Park and Recreation Finder application when one of the 'Share this map' options (Facebook, Twitter, or email) is clicked.

“TypeError: Cannot call method 'toString' of undefined”

This error applies to the Park and Recreation Finder (ArcGIS 10) download.


The share map options in the Park and Recreation Finder use a URL-compacting service called This service can fail when it reaches one of its daily quotas. When this happens, the share map feature fails until the service's usage counts are reset at 12:00 AM the next day.

Solution or Workaround

Change the application's URL-compacting service from using to a different URL-compacting service.

One alternative service is If is selected to replace, it is necessary to make a one-time change to the Park Finder's software because returns a more structured response. After this change, the software can handle either service: or

  1. Navigate to ParkRecreationFinder > Application > ParkFinder and open Config.txt for editing.
  2. Replace the text

    "URL": "${0}" , "ResponseAttribute": "tinyurl",


    "URL": "${0}&format=json" , "ResponseAttribute": "data.url",

    and save the file.
  3. Open JS\Utils.js for editing.
  4. Delete line 83.

    var tinyUrl = data[tinyURLServiceURL.ResponseAttribute];

  5. Insert the following lines in place of line 83

    var tinyUrl = data;
    // Follow a chain of nested attributes if necessary
    var attr = tinyURLServiceURL.ResponseAttribute.split(".");
    for (var x = 0; x < attr.length; x++) {
    tinyUrl = tinyUrl[attr[x]];

    and save the file.

Article ID:000011557

  • ArcGIS for Local Government

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options