POST
|
I initially added the word DRAFT to the byline and now there seems to be no way for me to edit or change that text. Any help or pointers as I don't feel like starting over. thanks
... View more
09-17-2019
12:17 PM
|
0
|
0
|
197
|
POST
|
[ATTACH=CONFIG]20459[/ATTACH] Steve, that's exactly what I ended up doing. It was the tooltip Container that was giving me that extra box with border. The issue I was having was that using firebug I could never "INSPECT" the tooltip. It would always close before I could figure out the proper dijit class.
.tundra .dijitTooltipContainer {
background: none repeat scroll 0 0 transparent;
border: none;
} thanks and enjoy your vacation
... View more
01-04-2013
11:52 AM
|
0
|
0
|
804
|
POST
|
Steve, thanks for posting your sample code. I have since been able to get a similar sample working for myself but now I want to style the popup but I can't seem to get rid of the inner grey box with the light blue outline. [ATTACH=CONFIG]20444[/ATTACH] Here is my function: function showTooltip(evt){
closeDialog();
var tipContent = "<b>" + evt.graphic.attributes.Project+" </b>" ;
var dialog = new dijit.TooltipDialog({
id: "tooltipDialog",
content: tipContent
});
dialog.startup();
// dojo.style(dialog.domNode, "opacity", 0.85);
dojo.style(dialog.domNode, "background", "#333");
dojo.style(dialog.domNode, "color", "white");
dijit.placeOnScreen(dialog.domNode, {x: evt.pageX, y: evt.pageY}, ["BL"], {x: 8, y: 8});
} What I really want is a solid tooltipDialog like the ESRI San Diego shortlist example (see image 2). Any suggestions would be great. Thanks, Chris [ATTACH=CONFIG]20445[/ATTACH]
... View more
01-04-2013
05:43 AM
|
0
|
0
|
804
|
POST
|
I need to toggle Dynamic Map service layers by Layer Name instead of Layer id. Is it possible for me to do this using layerinfo.name? I have modifed the Explicity Create Map Service Layer List sample http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_explicitlayerlist.html for what I need and I have been having issues trying to get layerinfo.name defined. I have followed a few example in other posts and can't quite get the samples to work in my favor. I saw the recent post regarding the 'Legend with Visible Layers' and couldn't figure out how to breakdown that sample to manually build the layer list. I have attacthed my working sample using Layer id. One thought I had was to write a function that would take the layer name from the check box function, Get/return the layer id, and use that result to toggel the layers. I am still developing my javascript skills but would be open to any suggestions. My ArcGIS server is 9.31 so I can't take advantage of the Legend widget or other samples. Thanks, Chris
... View more
07-16-2012
09:01 AM
|
0
|
1
|
553
|
POST
|
Nianwei, Your sample works great but after I modified it and added a map "onclick" identify function I couldn't figure out how to disable any map event if the streetview window was open. When I would click on the close button for streetview window it would execute the identify function. Here's my application (one of many) that I am using your script. http://www.dvrpc.org/webmaps/CMP/ I removed the streetview option but would love to use it for some of my application are transportation related and Streetview is a huge function. Also will you be updating any of your examples to be able to turn off the Google's 45degree imagery? If you zoom in to your http://gmaps-utility-gis.googlecode.com/svn/trunk/agsjs/examples/manualgallery.html Map Gallery example the Satellite/hybrid automatically turns the 45 degree images on and you can't see the dynamic map overlay..... Here's another web mapping app that I am using your arcgislink script. http://www.dvrpc.org/webmaps/pedbikecounts/ The 1 issues I seem to have with this is that sometimes the dynamic map service is displayed in the wrong location. Seems to be some issue with which image returns 1st? (googles Map api or ESRI's Js Api image)? Any help or advice would be greatly appreciated. Thanks for all your great work http://www.dvrpc.org/Mapping/webmaps.htm
... View more
06-21-2012
12:48 PM
|
0
|
0
|
710
|
POST
|
Hzhu, Great example and explanation on getting Streetview added to the ESRI AGS Javascript API. Anyway that you plan on updating the example to work with the Gmaps API v3? As well as a newer version of the AGS Js API (2.8 or 3.0)? I also can't seem to get your current example to trigger a streetview change of location when I select a new location. I am going to try update your sample sometime soon but I want to reach out to you first. Thanks, Chris Pollard
... View more
06-20-2012
11:40 AM
|
0
|
0
|
710
|
POST
|
Ben, Thanks for the reply. Option 2 is the way I was thinking of going for this project but wanted to poke around a bit before. Great explanation on the API, map domNode and image retrieval as well. sometimes I forgot to think about that stuff when I'm wrapped up in a project.
... View more
06-01-2012
06:15 PM
|
0
|
0
|
561
|
POST
|
I am trying to create separate opacity sliders for two (or more) layers within the same mapservice. I tried to modify Public Information Sample http://tmappsevents.esri.com/website/Public-Information-Map/min/index.html but was not successful. I have 7 polygon layers [0,1,2,3,4,5,6] I want user to change the opacity on each of them. Is there any easy way to do this? It seems setOpacity() can???t be used on esri.layers.ImageParameters. Any help (or additonal examples) would be much appreciated. Using ArcGIS server 9.3.1 Thanks, Chris <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Toggle Layers, Identify Only Visible Layers </title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.4/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.4/js/esri/dijit/css/Popup.css"> <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/redmond/jquery.ui.all.css" rel="Stylesheet" /> <style> #slider{ width:155px; height:8px; border:1px solid #999; margin-top: 5px; margin-bottom:15px; } </style> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.dijit.Popup"); var layer, map, visible = []; var identifyTask, identifyParams; $(document).ready(function(){ $("#slider").slider({ value:100, min:0, max:100, step:5, slide : function(evt, ui){ dynlayer.setOpacity(parseFloat(ui.value/100)); } }); }); function init() { //setup the popup window var popup = new esri.dijit.Popup({ fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25])) }, dojo.create("div")); var initialExtent = new esri.geometry.Extent({"xmin":-8513951.985121,"ymin":4786968.660565,"xmax":-8248256.864588,"ymax":4996406.126118,"spatialReference":{"wkid":102100}}); // var initialExtent = new esri.geometry.Extent(-9571474.89, 4592552, -9502681, 4638414, new esri.SpatialReference({ // wkid: 102100 // })); map = new esri.Map("map", { extent: initialExtent, infoWindow: popup }); dojo.place(popup.domNode, map.root); dojo.connect(map, "onLoad", function(map) { initIdentify(map); }); // Attach an onclick listener for each check box. // Update layer visiblity when each is checked clicked. var checkBoxes = dojo.query('input[type=checkbox]'); dojo.forEach(checkBoxes, function(cb) { dojo.connect(cb, 'onclick', updateDynLayerVisibility); }); var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"); map.addLayer(basemap); //Use the ImageParameters to set the visible layers in the map service during ArcGISDynamicMapServiceLayer construction. var imageParameters = new esri.layers.ImageParameters(); imageParameters.layerIds = [0,1,2,3]; imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW; //can also be: LAYER_OPTION_EXCLUDE, LAYER_OPTION_HIDE, LAYER_OPTION_INCLUDE dynlayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gis.dvrpc.org/ArcGIS/rest/services/TCDI/MapServer", { "imageParameters": imageParameters }); map.addLayer(dynlayer); } function initIdentify(map) { dojo.connect(map, "onClick", executeIdentifyTask); //create identify tasks and setup parameters identifyTask = new esri.tasks.IdentifyTask("http://gis.dvrpc.org/ArcGIS/rest/services/TCDI/MapServer"); identifyParams = new esri.tasks.IdentifyParameters(); identifyParams.tolerance = 12; identifyParams.returnGeometry = true; // identifyParams.layerIds = [0,1,2,3]; identifyParams.layerIds = dynlayer.visibleLayers; identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL; identifyParams.width = map.width; identifyParams.height = map.height; } function updateDynLayerVisibility() { var inputs = dojo.query(".dyn_item"); visible = []; for (var i = 0, il = inputs.length; i < il; i++) { if (inputs.checked) { visible.push(inputs.id); } } // If no layers are visible set the array value to = -1 // and disconnect the identify task if (visible.length === 0) { visible = [-1]; map.infoWindow.hide(); } // Update Identifys layers identifyParams.layerIds = visible; // Update layer visiblity dynlayer.setVisibleLayers(visible); } function executeIdentifyTask(evt) { if (visible.length === 1 && visible[0] == -1){ map.infoWindow.clearFeatures(); map.infoWindow.show(evt.mapPoint); } else { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function (response) { // response is an array of identify result objects // return an array of features. return dojo.map(response, function (result) { var feature = result.feature; feature.attributes.layerName = result.layerName; if (result.layerName === 'Year 2002'){ var template = new esri.dijit.PopupTemplate({ title: "<FONT color=#CB2F27><B>{PROJECTNAM}</B></FONT>", description: "<B>Location:</B>{MUN_NAME}, {CO_NAME} County, {STATE}<br>" +"<B>Amount: </B>{AMT_WEB}<br>" +"<B>Year Awarded: </B>{YR}<br>" +"<B>Project Number: </B>{PROJECTNUM}<br>" +"<B>Project Type: </B>{PROJECTTYP}<br>" +"<B>Project Description: </B>{PROJ_DESC}{PROJ_DESC2}{PROJ_DESC3}{PROJ_DESC4}", mediaInfos: [{ "title": "study area", "caption": "click for larger image", "type": "image", "value": { "sourceURL": "{PHOTO_TH}", "linkURL": "{PHOTO}" } }] }); feature.setInfoTemplate(template); } else if (result.layerName === 'Year 2003'){ var template = new esri.dijit.PopupTemplate({ title: "<FONT color=#F0BD56><B>{PROJECTNAM}</B></FONT>", description: "<B>Location:</B>{MUN_NAME}, {CO_NAME} County, {STATE}<br>" +"<B>Amount: </B>{AMT_WEB}<br>" +"<B>Year Awarded: </B>{YR}<br>" +"<B>Project Number: </B>{PROJECTNUM}<br>" +"<B>Project Type: </B>{PROJECTTYP}<br>" +"<B>Project Description: </B>{PROJ_DESC}{PROJ_DESC2}{PROJ_DESC3}{PROJ_DESC4}", mediaInfos: [{ "title": "study area", "caption": "click for larger image", "type": "image", "value": { "sourceURL": "{PHOTO_TH}", "linkURL": "{PHOTO}" } }] }); feature.setInfoTemplate(template); } return feature; }); }); map.infoWindow.setFeatures([deferred]); map.infoWindow.show(evt.mapPoint); } } dojo.addOnLoad(init); </script> </head> <body class="claro"> <div> Layers: <br /> <input type='checkbox' class='dyn_item' checked='checked' id='0' />Year 2002<br /> <input type='checkbox' class='dyn_item' checked='checked' id='1' />Year 2003<br /> Opacity:<br/> <div id="slider"> </div> </div> <div id="map" style="width:1200px; height:600px; border:1px solid #000;"></div> </body> </html>
... View more
06-01-2012
01:30 PM
|
0
|
4
|
2781
|
POST
|
Aaron, Thanks for replying and yes Kelly's example answered exactly what I was looking to do. I have not had to use feature layers before and had those confused with feature services (I'm still on 9.3.1 and never thought to look into using a feature layer before). As far as your sample, I don't have any specific questions but i have been using popups in most of my recent applications and any user samples that I can view and use for reference I find to be really helpful. good luck with your issue and if you need anyone to review or test any functionality feel free to send me a link/email. thanks, chris
... View more
05-29-2012
06:14 PM
|
0
|
0
|
696
|
POST
|
Aaron, Any way that you could post more of your *almost* working sample? I've been trying to re-work some of my projects/samples and have been running into some issue dealing with multiple graphic layers. My sample has two query tasks retuning 2 different graphic layers with different attributes. What I'd love to do is return ALL results of the graphics layers that are found at the 'clicked' location. Same functionality as the Identify popup on a dynamic may service layer but on my diiferent graphics layers. Here's my bare bones sample that I have so far. Any help/advice would be great. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>QueryTask with geometry, results as an InfoWindow onClick</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/dijit/css/Popup.css"/>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8"></script>
<script type="text/javascript" language="Javascript">
dojo.require("esri.map");
dojo.require("esri.tasks.query");
dojo.require("esri.dijit.Popup");
var map;
var cityLayer, portLayer;
var infoTemplate;
function init() {
var startExtent = new esri.geometry.Extent({"xmin":-8513951.985121,"ymin":4786968.660565,"xmax":-8248256.864588,"ymax":4996406.126118,"spatialReference":{"wkid":102100}});
//create a popup to replace the map's info window
var popup = new esri.dijit.Popup(null, dojo.create("div"));
//create map
map = new esri.Map("mapDiv",{
extent:startExtent,
infoWindow: popup
});
//create and add new layer
var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
map.addLayer(layer);
//build query task
var GCqueryTask = new esri.tasks.QueryTask("http://gis.dvrpc.org/ArcGIS/rest/services/DVRPC_Freight/MapServer/0");
//build query filter
var GCquery = new esri.tasks.Query();
GCquery.returnGeometry = true;
GCquery.outFields = ["NAME_GC","GC_Id","Name","Owner","Operators","Cargo","Report","StrView","Sview","LAT","LONG"];
GCquery.where = "Name <>'*'";
GCquery.outSpatialReference = {"wkid":102100};
GCqueryTask.execute(GCquery,addGCFeatureSetToMap);
var queryTask = new esri.tasks.QueryTask("http://gis.dvrpc.org/ArcGIS/rest/services/DVRPC_Freight/MapServer/1");
//build query filter
var query = new esri.tasks.Query();
query.returnGeometry = true;
query.outFields = ["NAME_GC","GC_Id","Name","Owner","Operators","Cargo","Report","StrView","Sview","LAT","LONG"];
query.where = "Name <>'*'";
query.outSpatialReference = {"wkid":102100};
queryTask.execute(query,addPortFeatureSetToMap);
}
// Initialize function
function addGCFeatureSetToMap(featureSet) {
var symbol = new esri.symbol.PictureMarkerSymbol({ "angle": 0,"xoffset": 0,"yoffset": 0,"type": "esriPMS","url": "http://www.dvrpc.org/webmaps/KML/images/RailCrossing.png","contentType": "image/png","width": 24,"height": 24 });
//Create graphics layer for cities
cityLayer = new esri.layers.GraphicsLayer({id:'cityLayer'});
map.addLayer(cityLayer);
var infoTemplate = new esri.InfoTemplate("${Name}","${*}");
//Add cities to the graphics layer
dojo.forEach(featureSet.features, function(feature) {
cityLayer.add(feature.setSymbol(symbol).setInfoTemplate(infoTemplate));
});
}
// Initialize function
function addPortFeatureSetToMap(featureSet) {
var symbol = new esri.symbol.PictureMarkerSymbol({ "angle": 0,"xoffset": 0,"yoffset": 0,"type": "esriPMS","url": "http://www.dvrpc.org/webmaps/KML/images/Ferry.png","contentType": "image/png","width": 24,"height": 24 });
//Create graphics layer for cities
portLayer = new esri.layers.GraphicsLayer({id:'portLayer'});
map.addLayer(portLayer);
var infoTemplate = new esri.InfoTemplate("${NAME}","${*}");
//Add cities to the graphics layer
dojo.forEach(featureSet.features, function(feature) {
portLayer.add(feature.setSymbol(symbol).setInfoTemplate(infoTemplate));
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
Single click a county in South Carolina to get more information.
<div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
</body>
</html> Thanks, Chris
... View more
05-24-2012
12:08 PM
|
0
|
0
|
696
|
POST
|
try to run the executeIdentify in the zoomRow (id) function after
map.setExtent(buildingExtent);
executeIdentify(feature.extent?? or something like this)
Search the forums for a topic related to: "geocode and then identify/query"
... View more
05-09-2012
07:06 PM
|
0
|
0
|
386
|
POST
|
Chris, I looked at your code and line 124 needed a ";" I also added all the map layers because line 381 was looking for them and couldn't find those objects. line 387: I added a console.log (buildingExtent); if you open firefox and use firebug this will log for you the values that are being returned when the user clicks on the zoom button for each layer. Like I mentioned there are some layers which seem to not exist or have any extent and if use view there values in firebug you can see which ones have issues. I think the added global varibles helped fix the zoom to error, once I added them it seems like it didn't zoom to Africa... Keep me posted and what you have built so far looks great..
... View more
05-09-2012
12:45 PM
|
0
|
0
|
386
|
POST
|
Chris, I added your map service into the zoom to datagrid ESRi sample: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/fl_zoomgrid.html Zooming to buildings work for some but not all.. it seems like some of the building from the map service are not drawing correct? Clicking on Downer Woods,Engleman Stadium and a few others does nothing. Your best bet is to try a get the ESRI sample to work 1st with your data and map service before you try and mash it into the sample with Google Basemap Sample. When I first starting working with the ArcGIS API for Javascript I would find the sample and functionality that I wanted and modify the code/map service to use my data. Once I had all the samples that I needed I would then build my web application from mashing together the samples and functionality that I needed for the web app. This might help you get used to working with the code, samples as well as writing and understanding javascript.... Good luck, FYI.. my sample code doesn't include the zoom to button image..
... View more
05-09-2012
11:33 AM
|
0
|
0
|
386
|
POST
|
better Lat/long measurement for Milwaukee: -9782122.122 5314126.278
... View more
05-07-2012
11:00 AM
|
0
|
0
|
881
|
POST
|
Chris, wkid = 102100 is actually the one you should be using in your code... There might be an issue in regards to the units of your feature? Open your .MXD and mouse over a certain location/feature to view the Lat/Long. It should look something like this: -557592.705 4843327.594 I'm not an expert coder but I had to an this line of code to one of my recent application. var mp = new esri.geometry.webMercatorToGeographic(evt.mapPoint); Before I added the above line I was zooming to the Ocean just east of Africa..... You can also use Firebug to try and capture the actual values that the zoom to function is returning. Place a console.log somewhere within your zoom to function... console.log(extent????or something like this); Firebug is an amazing tool that you should try a learn to use for building any javascript api's. If you could post your code or parts of the zoom to feature function that may work best. good luck and if I run into the same issue of find a better solution for you I'll post it...
... View more
05-07-2012
10:58 AM
|
0
|
0
|
881
|
Title | Kudos | Posted |
---|---|---|
23 | 08-23-2011 09:27 AM |
Online Status |
Offline
|
Date Last Visited |
03-12-2024
05:00 PM
|