POST
|
The NearMe widget allows you to choose layers from your AGOL web map to search on. As far as the geocoder goes, are you talking about the routing service? -Stan
... View more
05-19-2016
12:48 PM
|
0
|
0
|
342
|
POST
|
It looks to be the order of the layers in the map service or AGOL map. -Stan
... View more
05-19-2016
12:42 PM
|
1
|
0
|
373
|
POST
|
OK I found that it only happens when the NearMe widget is loaded in the side panel in the Tab theme. Lucky me, right where I need it. Also customer support told me it is a known issue for that theme and will be fixed someday. Not sure what the repercussions are but I did this and it works so far: I commented out the lines that say: dijit.byId(this.domNode.parentElement.id).resize(); in [App#]\Widgets\NearMe\Widget.js line 668 and dijit.byId(this.parentDiv.id).resize(); in [App#]\Widget\NearMe\item-list.js lines 178, 185, 449, 530, 573, 652, 814 and 891 The error says that resize is undefined so I got rid of it. It would be better to just define it but I don't know how to do that. So far with this method it does not report the correct feature count after the identify.
... View more
04-11-2016
01:35 PM
|
0
|
1
|
629
|
POST
|
From what I can tell the new NearMe widget is not working either in AGOL or in the Developers Edition 2.0 with the Tab Theme. Thanks for your help. -Stan
... View more
04-11-2016
11:14 AM
|
0
|
2
|
2856
|
POST
|
You could maybe look at doing a related table and page through the results in the popup. Just a thought. Also I am no street guy, but it seems to me that left and right sides of a street are subjective to what direction you are facing.
... View more
04-11-2016
08:27 AM
|
1
|
1
|
489
|
POST
|
Tim, Yes. Kind of. That is also what I want it to do. I made changes mentioned above to item 1 so the user could not change the value and in the set up of the widget I set the maximum distance to 1 and the units to feet. That was small enough for me. If you need it smaller then I bet you could code it to inches or centimeters I guess. -Stan
... View more
04-11-2016
08:05 AM
|
0
|
0
|
931
|
POST
|
Here is what I have changed so far. I will try to keep this post up to date on fixes mentioned for the items mentioned above. This is for the Developers edition 2.0 1. I did this several different ways but I found that the easiest way is to just edit the css file in \server\apps\#\widgets\NearMe\css\style.css around line 67 .jimu-widget-nearme .esriCTSliderDiv
{
height: 60px;
margin-top: 10px;
padding: 0px 20px;
clear: both;
display: none; /* ADDED THIS-------------------------------------------*/
} This removed the display of the slider so a user could not change it. I did find in the code where and how to comment out the code if you really want to remove it instead of just hiding it. If you want to know just ask. EDIT: This has been included in the June 2016 update 2. To change the minimum value to "1" so you do not get that error all you need to do is change the value from "0" to "1" in the _createSlider function around line 502 in the \server\apps\#\widgets\NearMe\Widget.js file _createSlider: function () {
// initialize and set the parameter of slider
this._slider = new HorizontalSlider({
name: "slider",
minimum: 1, //CHANGED THIS************************************************************
maximum: this.config.maxBufferDistance,
value: this.config.defaultBufferDistance,
intermediateChanges: true,
"class": "esriCTHorizantalSlider" 3. Not sure on this one yet 3.1 This is just an enhancement in this area. Remove distance label and add in a right arrow so the user can see that there is additional information. around line 325 in the \server\apps\#\widgets\NearMe\css\styles.css file .esriCTFeatureList .esriCTItemCount, .esriCTLayerList .esriCTItemLeftArrow, .esriCTDirectionInfoPanel .esriCTItemRightArrow, .esriCTDirectionInfoPanel .esriCTItemCount /* removed .esriCTFeatureList .esriCTItemRightArrow from this list*/
{
display: none;
}
.esriCTPanelHeader .esriCTItemRightArrow, .esriCTFeatureListItem .esriCTItemCount
{
display: none; /* Added this****************** */
}
4. This might just be a wish for now 5. To set the custom info template it needs to be set in the _onLocationToAddressComplete function around line 327 in the \server\apps\#\widgets\NearMe\Widget.js file _onLocationToAddressComplete: function (result) {
var screenPoint, infoTemplate;
//check if address available
if (result.address && result.address.address) {
//create info-template
infoTemplate = new InfoTemplate();
infoTemplate.setContent("${Match_addr}");
infoTemplate.setTitle("Searched Location");
//clears previous features of the infowindow
this.map.infoWindow.clearFeatures();
//set title and content to infowindow
this.map.infoWindow.setTitle("Searched Location");
this.map.infoWindow.setContent(result.address.address.Match_addr); //PUT INFO HERE******************
//show infowindow on selected location
screenPoint = this.map.toScreen(this._searchedLocation.geometry);
this.map.infoWindow.show(screenPoint, this.map.getInfoWindowAnchor(
screenPoint));
}
}, 6. Ok so I realized that it zooms to the extent of the buffer that is created by clicking or searching. So for example it you are searching with a 1 mile buffer then your map will zoom in just close enough to see the entire area of the 1 mile. However I was searching with a 1 foot buffer so it zoomed me in to my closest zoom level. That is not what I wanted. So I found in [App#]\widgets\NearMe\Widget.js in the _createBuffer function it sets to extent of the map after the buffer. Because I am searching in feet I need to adjust the extent to be larger. Here I adjusted the 1.5 to be 500 and that worked for me. you would have to play with it to get the right zoom level for you. this.map.setExtent(geometries[0].getExtent().expand(1.5)); 7. To change the selected color for the selected features you need to change the color parameters in the \server\apps\#\widgets\NearMe\item-list.js file. At the bottom you will find parameters to change the style for points lines and polygons. 8. I found a way to find the graphic extent and zoom to it and also the previous extent. This all happens in the \widgets\NearMe\item-list.js file. Not sure if this is the best way but it is working. Add as a global variable around line 70 right before the return statement. var centerLocation; Add in the _attachEventOnBackButton function around line 200 right after on(divBackButton, "click", lang.hitch(this, function (event) {. This set the map extent when the back button is clicked. this.map.setExtent(centerLocation) Add at the end of the _setItemName function around line 355. This get the extent of the map when zoomed in. centerLocation = this.map.extent.getExtent(); Add at the end of the _highlightFeaturesOnMap function around line 945. This grabs the graphics extent and zooms to it when it is drawn var selectedMapItems = graphics.geometry.getExtent().expand(1.5);
this.map.setExtent(selectedMapItems); EDIT: This has been included in the June 2016 update but it does not zoom back the previous extent.
... View more
04-04-2016
03:05 PM
|
1
|
3
|
2735
|
POST
|
Yichi, I am not sure why you are seeing those distance issues. I have seen buffers that are created in a different projection which result in the buffers not showing the right distances. If you use the measure widget, do you get the result you expect? -Stan
... View more
03-17-2016
01:47 PM
|
0
|
3
|
2735
|
POST
|
I have been playing around with the NearMe widget lately and I really like it. I just have a few enhancements that I think would be beneficial. When the developers version of this comes out I guess I can tinker away at it (any help is appreciated). For now here is what I think would make it just a little bit better. 1. Be able to set a predetermined distance for the buffer and then remove the option from the end user to change it. I guess you would just need to hide the slider when the widget opens. 2. Along the same lines. I noticed that when the user moves the slider to 0 it throws an error saying you can not pick 0. So why not remove that as an option and start at 1? 3. When a user clicks on the map or does the search, if there is only 1 result it would be nice at add a field value right after the layer name. It currently does this when you click to get to the next level but it really is an unnecessary click. A user may only want to see the value from one filed and they could then see it at a quick glance at the top level instead of having to drill in. Drilling in makes sense when there is more then one layer identified. 4. With a search bar in the widget it looks a little redundant to have two search places on a map with only one working with the widget. It would be nice to have one place to input an address and have it tied together. I know you can turn off the search widget as a solution but that is only a work around. 5. It would also be nice to have a place in the widget setup to customize the popup with content 6. How would I change the zoom level when I select a point. I have a basemap that is cached to level 21. When I click on the map it zooms to the closest extent. It would be nice to have an option to only zoom to level 18 for example because 21 is to close. 7. When a polygon is selected it defaults to show in a cyan outline. However if you are zoomed in after the search like in #6 above then you can not see the area of the highlighting and you might not even know that the area is highlighted. It would be nice to zoom out to the extent of the feature being selected. 8. I think it would be nice to zoom to the selected feature once you have drilled in and then zoom to the previous extent when the back button is clicked. anyway just some thoughts thanks for any help or insights you might have. -Stan
... View more
03-15-2016
08:20 AM
|
5
|
17
|
9969
|
DOC
|
This widget uses the dualmaps api to put the lat/long in the url of the map searches and just add it like an iframe into the widget. So if you have anything other then lat/long then you would have to catch the coordinates from the click and calculate from state plane to lat/long and pass that to the api.
... View more
02-24-2016
02:27 PM
|
0
|
0
|
8394
|
POST
|
Thanks for the sample. I was stuck for a while and this got me going in the right direction. I was having trouble adding the related information to the popup as text and now it works. -Stan
... View more
11-18-2015
07:54 AM
|
0
|
0
|
295
|
POST
|
Alphonse ATTRON This should do the trick Adding custom icons to the draw tool -Stan
... View more
11-09-2015
06:14 AM
|
1
|
1
|
996
|
POST
|
Lefteris Koumis, There are several web sites that you can copy the code to and it will beautify your code and then past it back into your files. Try this one http://codebeautify.org/ -Stan
... View more
08-06-2015
02:15 PM
|
2
|
0
|
3334
|
POST
|
lei zhou, If you are using the development edition you can make some changes and add some custom widgets/mixins to make it popup on hover. Larry Stout has an application ArcGIS Web Application that does that. There may be some information here in Rebecca's Blog Web AppBuilder Developer Edition - Customization Resource List -Stan
... View more
07-21-2015
09:07 AM
|
1
|
0
|
417
|
POST
|
Matt McGuire and Livia Moen, I took another look at this and found you the little html button on the rich text editor i missed. Thanks Matt for pointing me in that direction. Here are two styles of getting your text on the left to align left and your text on the right to align right. This one is the easiest to set up in the html but looks a little funny in the preview part of configuring the popup. <div style="float: left">Text on the left.</div> <div style="float: right">Text on the right.</div>
<div style="float: left">left text</div> <div style="float: right">Right Side</div> This one is done in a table. The way I have it below makes it so the column on the right all aligns on the right side of the popup. If you want to take the column on the right and align the text on the left side just change the words from left to right. <table width="100%">
<tbody>
<tr>
<td align="left">Left aligned text</td>
<td align="right">Right aligned text</td>
</tr>
<tr>
<td align="left">Left aligned text</td>
<td align="right">right side</td>
</tr>
<tr>
<td align="left">Left aligned text</td>
<td align="right">more to one side</td>
</tr>
<tr>
<td align="left">Left aligned text</td>
<td align="right">short text</td>
</tr>
</tbody></table> -Stan
... View more
07-21-2015
08:12 AM
|
1
|
1
|
1395
|
Title | Kudos | Posted |
---|---|---|
1 | 06-29-2015 06:36 AM | |
1 | 06-30-2015 09:27 AM | |
1 | 04-20-2015 10:23 AM | |
1 | 06-23-2015 11:01 AM | |
1 | 05-19-2015 02:26 PM |
Online Status |
Offline
|
Date Last Visited |
09-11-2024
12:03 AM
|