POST
|
Betsy, Thank you for your response. It wasn't quite what I was looking for, but I did notice from your page that when I clicked on a point that the map will move to to fit the infowindow on the map. How do you do that on that page?
... View more
08-14-2013
09:01 AM
|
0
|
0
|
554
|
POST
|
Thank you. Thank you. Those 2 lines of code worked for what I was wanting to do.
... View more
08-14-2013
08:57 AM
|
0
|
0
|
554
|
POST
|
I have a map (http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm) where a user can click on a point on the map to open it's infoWindow or he/she can select a point from a dropdown box on the top of the map. When I add the points to the map, I read in information from a file and add each point to an array: var gmarkers = []; //Array of all the markers var nm = 0; In the loop: ... siteTemplate = new esri.InfoTemplate(title,info); attr = {WELL_NO: site_name}; graphic = new esri.Graphic(point, icon, attr, siteTemplate); map.infoWindow.resize(500, 400); glayer.add(graphic); gmarkers[nm] = graphic; nm++; ... In my dropdown menu I have call a function and pass in an array index and the latitude and longitude of the point. <form style="margin-top:2px;margin-bottom:10px;" action=""> <select name="delta" onchange="javascript:reveal_site(delta.value)"> <option value="">Select a well</option> <option value="0,47.076611,-122.127667">18N/05E-02H02</option> <option value="1,47.078417,-122.170528">18N/05E-04A01</option> <option value="2,47.076667,-122.195861">18N/05E-05G03</option> <option value="3,47.081361,-122.212056">18N/05E-06A02</option> <option value="4,47.064722,-122.207417">18N/05E-08D06</option> ... </select> </form> The function that's called: function reveal_site(i) { var split = i.split(','); var index = split[0]; var latitude = split[1]; var longitude = split[2]; if(index) { point = new esri.geometry.Point(longitude,latitude,new esri.SpatialReference({ wkid: 4326 })); point = esri.geometry.geographicToWebMercator(point); map.infoWindow.setTitle(gmarkers[index].getTitle()); map.infoWindow.setContent(gmarkers[index].getContent()); map.infoWindow.show(point, point); } } The problem is that when a point is selected from the dropdown menu, sometimes it displays the wrong infoWindow, but it always it displayed in the correct location though. Here is what I get when clicking on this particular point: [ATTACH=CONFIG]26405[/ATTACH] When I select the same station number from the dropdown menu, I get a different infoWindow at the same point on the map: [ATTACH=CONFIG]26406[/ATTACH] It seems that when read in the points from a file and add them to the array, they aren't being put into the array linearly. For example: the 2nd point in the file is sometimes the 3rd item in the array.
... View more
08-02-2013
08:45 AM
|
0
|
2
|
891
|
POST
|
If you would like to take a look at a web page with a basemap, look at http://wa.water.usgs.gov/projects/yakimagw/hydrographs.htm. The page doesn't work correctly, but the basemap is there. You will be able to see on the page that the evelations are shown in meters.
... View more
07-27-2013
10:07 PM
|
0
|
0
|
335
|
POST
|
Sorry that my expanation was unclear. The units in my popup window are in feet. The basemap displays elevation in meters. I would like for the basemap to display elevations in feet. I will fix the web page on Monday so that you can see the basemap. I know what the problem is - it's an easy fix. If you go to the URL that I refer to for the basemap is http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer. In the documentation on that page, it says that one of the layers is elevation (ft).
... View more
07-26-2013
06:06 PM
|
0
|
0
|
335
|
POST
|
I have a map (http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm) that uses the ESRI topographic base map (http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer). The elevations listed on the map are in meters, but the information in all the infoWindows on my map are in feet. Is there another version of the topographic base map that I can use which has the elevations listed in feet?
... View more
07-26-2013
09:45 AM
|
0
|
4
|
1177
|
POST
|
Yes, thank you. That did it. The "Zoom to" link doesn't show up anymore.
... View more
07-26-2013
09:27 AM
|
0
|
0
|
353
|
POST
|
Jason, I added the following to my page: <style type="text/css">
action.zoomTo{
display: none;
}
</style> but I still have the Zoom to link in my infoWindows. Do I need something else in front of the word action? Like dijit.action.zoomTo. I know that's not correct, but it's just an example. Ray
... View more
07-26-2013
08:27 AM
|
0
|
0
|
353
|
POST
|
Something else I noticed this morning is that when I click on a point, an infoWindow opens (Image 1), and click the X to close the infoWindow (Image 2), if I then open an infoWindow from the dropdown menu, the last point that I clicked on will be hightlighted (Image 3). [ATTACH=CONFIG]26250[/ATTACH] [ATTACH=CONFIG]26251[/ATTACH] [ATTACH=CONFIG]26252[/ATTACH]
... View more
07-26-2013
07:13 AM
|
0
|
0
|
412
|
POST
|
Ever since I upgrade the code on my web page to use API 3.5, I have a "Zoom to" link at the bottom of all of the infoWindows on my map. [ATTACH=CONFIG]26245[/ATTACH] Can I remove this "Zoom to" link?
... View more
07-26-2013
06:25 AM
|
0
|
5
|
920
|
POST
|
I don't do anything to explicitly change the symbology. I noticed that the point started to be highlighted once I upgraded by web page's code to use API 3.5. The point only seems to be highlighted when a user clicks on a point, but not when the user selects the point from the dropdown menu.
... View more
07-26-2013
06:16 AM
|
0
|
0
|
412
|
POST
|
Thank you. That worked for me. That's what I was looking for: http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm
... View more
07-25-2013
11:18 AM
|
0
|
0
|
586
|
POST
|
Yes. This is what I'm looking for. I noticed your points_glayer doesn't have attributes. When you create the graphics form your data source take the well number and add it as an attribute of the graphic like this graphic.setAttributes({ WELL_NO: the_well_no }); then you can use it to display as shown in commented part of the code above. I can't figure out where in my code to insert the graphic.setAttributes({ WELL_NO: siteid }); code. I create the layer toward the top of the page: defineGraphicLayer("points_glayer", 1);
var glayer = map.getLayer("points_glayer");
glayer.clear(); I have a loop farther down in the code that reads data from a file where I actually read in the siteid variable for each point.
... View more
07-25-2013
08:46 AM
|
0
|
0
|
586
|
POST
|
I am converting a bunch of Google Maps web pages to ESRI Maps. In Google Maps, I was able to have a "tooltip" that would appear when a user moused over a point on the map (Example: http://wa.water.usgs.gov/projects/skagit/hydrographs.htm). Can I do this on my ESRI map? (Example: http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm) I've tried a few things, but haven't been successful.
... View more
07-19-2013
07:45 AM
|
0
|
8
|
859
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|