Note: This is an EB 1.9 Widget (not backward compatible).
Changes in 1.9
Older Changes in 1.7.1:
Features:
To install this widget extract the contents of the zip file to your EB\client\your-extensions\widgets. So once you extract the whole path would look like: \client\your-extensions\widgets\eLocate. Refresh your client and server windows (easiest way is to close both and 'npm start' them like you normally do to start EB). Now the draw widget will appear in your apps widget menu. Add the widget to your app. Now use the widgets settings panel to configure the widget.
Enjoy, Robert
Hi Robert,
Thanks a million for porting so many of your essential WAB Custom Widgets over to the EXB platform!
All your Custom Widgets for Experience Builder Version 1.7 are working flawlessly on our Parcel Map
You would have to use Firefox to open this:
http://davidapps.net/exb/ParcelMapV6/
I had a simple enhancement request on the Popup for the Address Inspector Tool in your Enhanced Locate Widget.
The Popup shows both the Map Coordinates and the Lat/Long Coordinates.
The Map Coordinates are displaying Web Mercator (WGS84) meters:
X = -12478362 m
Y = 3954782 m
Can you add an option to display only the Lat/Long Coordinates like so:
This would make the Popup less cluttered.
I see there is an option to specify the WKID for the coordinates displayed in the Popup.
I have set it to 102100 = Web Mercator (WGS84) meter
Best regards,
David Das
@RobertScheitlin__GISP @DavidDas__GISP - I downloaded the Zip file, extracted, and copied the contents of such to:
\client\your-extensions\widgets\eLocate\
I did do the 'npm start' (ie. restart) of the client. While I can add and configure the Enhanced Locate in EB, when in preview mode I click on the widget icon and see a blank dialog box:
Below is the configuration I have for it in EB:
Any errors in the browsers web console?
@RobertScheitlin__GISP yes this one, which I circled in red, below, which is new following the add of the widget:
That is a warning. None of those warning or errors have anything to do with the eLocate widget. Have you tried shutting down EB and restarting?
@RobertScheitlin__GISP yes I did, restart of both server and client.
To implement the widget, once I copy the contents of the zip file to \client\your-extensions\widgets\eLocate\, do I need to modify any of the files in there?
Nope. Just to check:
I have never seen this before...
New version available that addresses your enhancement request.
@RobertScheitlin__GISP sigh. I feel like an idiot. I had all 4 eLocate tabs disabled. When configuring w/o looking closely, I thought I was enabling all four, since it seems this has been the way to enable things in other widgets. It is now working. Sorry my bad!
Hi Robert,
Thanks so much for your superfast response!
I will test it out today.
Maybe I need to look at some warning that will be displayed if you disable all the tabs.
@RobertScheitlin__GISP also, your new widget is working fine. I've been testing it out. Thank you!
Hi Robert,
I have tested your enhancement.
I tested these 6 cases setting different WKID values for the Coordinates displayed in the Popup.
Everything is working like a charm, except that the minimum precision defaults to 2.
You cannot change the minimum precision to 0
I don’t thing anyone would complain about this. In general, it is good to display at least 2 decimal places.
Here are the details of my testing.
Case 1: Default Precision Setting = 2 worked
WKID = 102100
Web Mercator (WGS84) Meters
Coordinate Precision = 2
Case 2: Precision setting = 0 did not work
WKID = 102100
Web Mercator (WGS84) Meters
Coordinate Precision = 0
Case 3: Precision setting = 4 worked
WKID = 102100
Web Mercator (WGS84) Meters
Coordinate Precision = 4
Case 4: Lat/Long, Precision = 6 worked
WKID = 4326
Decimal Degrees (WGS84)
Coordinate Precision = 6
Case 5: Lat/Long, Precision = 0 did not work
WKID = 4326
Decimal Degrees (WGS84)
Coordinate Precision = 0
It appears the minimum precision defaults to 2
Case 6: Stateplane Feet, Precision = 0 did not work
WKID = 2868
Stateplane AZ Central (NAD83-HARN) feet
Coordinate Precision = 0
The minimum precision defaults to 2 decimal places
Conclusion:
The Popup honors the WKID value that is set.
It can be Web Mercator (WGS84) meters, or Decimal Degrees (WGS84) or Stateplane feet.
Any precision value can be set so long the minimum precision is 2.
Best regards,
David Das
@DavidDas__GISP @RobertScheitlin__GISP
I would like to propose a feature addition to the Enhanced Locate widget. I think I mentioned to one of you that it would be very helpful to have a widget where, when you pin an arbitrary point on the map, a pop-up box will show you the GPS coordinates and links to one or more maps which, if you click on their links, will bring you to another browser window for the map at that location.
For example, a link to Google Maps would bring you to Google Maps in a separate browser window at that location. Similarly for Bing Maps, Caltopo, Open Street Maps, etc. I thought the Enhanced Locate widget widget would be the best place to add this, but my TypeScript programming skills, esp in the EB environment, are practically nil. As shown below, I hacked some of the code in widget.ts to include logic to show the custom links to the following maps crafted to go to the location: Google Maps, Google Maps Street View, Google Earth, Bing Maps, Open Street Maps, and Caltopo.
Thus, when I use Inspector to pin-point a particular location on the map, the pop-up box presents to me links to the various aforementioned maps. Click on a link (e.g. "location link" for Google Maps), and another browser window to that map at that location will come up.
As I said, my coding skills in TypeScript and EB are to where its not possible for me to add such a feature at this time or even in the near term. I would be happy to share the code with you to examine. Yes, I admit what I did was a kludge and the interface could be much nicer.
@RobertScheitlin__GISP Using EXB 1.9 this Widget just spins.
Am I missing something?
Also When I do get it to work Does this Locate widget search features or just addresses?
Can we use a URL Parameter to activate it?
@MicahWilliamson I have yet to test EB Dev 1.9. There could be some breaking changes. What error is in your browsers web console?
This widget searches addresses, locates user entered coordinates, and returns addresses based on user clicking on the map.
Currently there are no URL parameter capabilities.
@MicahWilliamson I have now updated the widget for 1.9's breaking changes.
This has been a very helpful widget, thank you!
Minor coding flaw I found: the address locator "no results found" message is never displayed due to the else statement setState command in Line 406 of Widget.tsx not opening the results tab with a selTab: 'resultslabel' setting.
Adjusted line: this.setState({showProgress: false, locating: false, selTab: 'resultslabel'})
This is a great app and one I've used many times in WAB. Thanks for creating it. I'm just wondering if it will work in EB in ArcGIS Portal 1.9.1? Or will it only work in the Dev edition of EB?
@JohnKennedyTailteEireann The ability to add custom Experience Builder widgets to an Enterprise portal was added with Enterprise 11.0. You will need to use Developer Edition.
@RobertScheitlin__GISP Hey Robert! Is this widget forward compatible with ExB 1.13? There have been several breaking changes in the last couple of releases and I was unsure if it has been tested for use in the current build?
I am running ExB Dev 1.14 and when I added this widget it keeps giving me "Cannot read properties of undefined (reading 'addEventListener')" I am new to this, therefore I am inexperienced. Any suggestions or fixes would be greatly appreciated.
@johndixonldeq, a lot of changes were made in 1.14 that appear to be breaking widgets written for previous versions. Unfortunately, Robert's not around anymore, and it doesn't look like anyone is willing to fill his large shoes yet in terms of widget development for the masses.