You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a section in the AppConfig.js that lets you set your own Custom locator but there is no clear documentation on how to set the locatorSources array.
I thought all I would have to do is put in the URL to the locator as type string and it would set up the source for me but that does not seem to be the case. I would get errors saying that addressToLocations() is not a function.
So after doing a little bit of digging, looking at the JS API documentation, it seems that when creating a new source you need to give it an object and then specify the new locator as a new Locator type. In order to get this to work, I needed to add in the Locator class in the define method and then call it LocatorSources like so....
Only then did it work for me. I think it would be helpful if the documentation was updated to reflect this. Or if this is not supposed to work, then it may be a bug with using custom locators.
The text was updated successfully, but these errors were encountered:
Yes, I was following that documentation to set up the locator sources but I would get an error when I set up my locator like the example in my last comment above. The only way I got it to work is to include the Locator class in the AppConfig.js file. I needed to do this because I was defining a new Locator in the locatorSources array, otherwise it would give me a Locator is not defined error.
I might be missing something but the documentation does not say anything about including additional classes to the AppConfig.js if you need to. I assumed that the other js files would have them included already but it does not seem to be the case.
There is a section in the AppConfig.js that lets you set your own Custom locator but there is no clear documentation on how to set the
locatorSources
array.I thought all I would have to do is put in the URL to the locator as type
string
and it would set up the source for me but that does not seem to be the case. I would get errors saying thataddressToLocations()
is not a function.So after doing a little bit of digging, looking at the JS API documentation, it seems that when creating a new source you need to give it an object and then specify the new locator as a new
Locator type
. In order to get this to work, I needed to add in the Locator class in thedefine
method and then call it LocatorSources like so....Only then did it work for me. I think it would be helpful if the documentation was updated to reflect this. Or if this is not supposed to work, then it may be a bug with using custom locators.
The text was updated successfully, but these errors were encountered: