POST
|
12-12-2014
07:31 AM
|
0
|
0
|
248
|
POST
|
Using the field calculator try: !FieldName!.replace(" ", "") That should take care of the spaces
... View more
12-12-2014
05:19 AM
|
0
|
2
|
248
|
POST
|
no, I think the admin needs to update the popup. Because basicly you're changing the input of the app and seeing that it doesn't work probably means that the popup also needs to be changed with a change in the domain of the geodatabase.
... View more
12-12-2014
12:43 AM
|
0
|
5
|
781
|
POST
|
Hi, Doesn't the admin have to update the mapservice as well. So not only the data and the datasheme?
... View more
12-12-2014
12:21 AM
|
0
|
9
|
781
|
POST
|
It looks like you should be able just to add identifyParams.layerIds = visible to function executeIdentifyTask(evt) {
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent; to give you function executeIdentifyTask(evt) {
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.layerIds = visible Should work Thanks! It works!
... View more
07-17-2012
11:15 PM
|
0
|
0
|
1020
|
POST
|
I think you are experiencing [NIM042441 The layerOption LAYER_OPTION_VISIBLE not working as expected while using Identify Task.]. The LAYER_OPTION_VISIBLE seems only response to the default visible layers in the map service. To workaround this, as amarsden did, please assign the list of visible layer to the IdentifyParameters.layerIds property, which can force the identify task to only perform the find operation on the specified layers. Could you tell how I do this? My code is still the same as in the first post because I don't seem to be able to find out how to integrate the IdentifyParameters.layerIds
... View more
07-17-2012
10:15 PM
|
0
|
0
|
1020
|
POST
|
Thanks, I'm going to try it and I'll get back to you
... View more
07-16-2012
10:36 PM
|
0
|
0
|
928
|
POST
|
I was having the same issue. identifyParams.LAYER_OPTION_VISIBLE would still identify layers that are hidden (not checked in the dijit.legend). I *think* the LAYER_OPTION_VISIBLE pertains to the scale visibility, set in either the rest service or when the feat. layer is added to the map. So, if your at a scale within the layer visible scale range, it will identify, regardless if it's 'turned on' or not in the dijit.legend widget. I even tried adding LAYER_OPTION_VISIBLE param to the begining of the click event, so the layer visibility list would be 'more up to date' but it didn't work. I did find that the identifyParams.layerIds does restrict the identify layers, so I simply added this to the beginning of the onClick function, prior to identifyTask.execute(identifyParams):
//lets manually set the identifyParams.layerIds
//to the layers that are currently checked in the legend widget
var lids = [];
dojo.forEach(legendLayers, function(layer){
if (layer.layer.visible === true){
lids.push(map.getLayer(layer.layer.id).layerId)
}
});
identifyParams.layerIds = lids;
Thanks I've added your code but it's still not working. It still identifies sublayers which are turned off in the layerlist. I thought it is something with the lids and the build layer list. But I can't really pinpoint it.
... View more
04-23-2012
11:18 PM
|
0
|
0
|
928
|
POST
|
Hi James, Thanks, it now works in ie8! In ie7 it still doesn't but that's less then 1% of the visitors so it's not that big of a problem. But if i do find a workaround for this I'll post it. Swen
... View more
04-19-2012
10:37 PM
|
0
|
0
|
867
|
POST
|
Hey, I'm having the same problem in IE8. I have a div with a few checkboxes and I need the pop-up to go over it. But in IE8 (and 7) it doesn't. In IE9, firefox, chrome etc. this is not the case. I've googled the problem and it should work if you give everything a z-index. But it doesn't.
... View more
04-19-2012
05:24 AM
|
0
|
0
|
867
|
POST
|
Have you seen: http://help.arcgis.com/EN/webapi/javascript/gmaps/index.html? I've looked at it but i don't see an editor widget. You could use the regular javascipt api with bing maps instead of google maps.
... View more
02-06-2012
05:05 AM
|
0
|
0
|
274
|
POST
|
Have you tried: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/find_drilldown.html or: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/find_popup.html because they show how to use the esri.tasks.IdentifyParameters.LAYER_OPTION_ALL
... View more
02-06-2012
05:00 AM
|
0
|
0
|
182
|
POST
|
part two of the code <script type="text/javascript">
var djConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6"></script>
<script type="text/javascript">
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.dijit.Popup");
var layer, map, visible = [];
var identifyTask,identifyParams;
function init() {
//Popup
esri.bundle.widgets.popup.NLS_searching = "Zoeken...";
esri.bundle.widgets.popup.NLS_noInfo = "Niets gevonden";
esri.bundle.widgets.popup.NLS_nextFeature = "Volgende";
esri.bundle.widgets.popup.NLS_prevFeature = "Vorige";
esri.bundle.widgets.popup.NLS_maximize = "Maximaliseren";
esri.bundle.widgets.popup.NLS_restore = "Vorig formaat";
esri.bundle.widgets.popup.NLS_close = "Sluiten";
esri.bundle.widgets.popup.NLS_zoomTo = "Zoom in op selectie";
var initialExtent = new esri.geometry.Extent({"xmin":157741,"ymin":378600,"xmax":181240,"ymax":394100,"spatialReference":{"wkid":28992}});
//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([0,255,255]), 2), new dojo.Color([255,255,0,0]))
}, dojo.create("div"));
map = new esri.Map("map",{
infoWindow:popup,
extent: initialExtent,
logo: false});
dojo.addClass(map.infoWindow.domNode, "myTheme");//instellen dat de popup "myTheme" gebruikt
dojo.connect(map, 'onLoad', mapReady);
dojo.connect(map, "onLoad", function() {
map.disableDoubleClickZoom();
});
basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://atlas.sre.nl/ArcGIS/rest/services/TOPOGRAFIE/OSM_2011_ZW/MapServer");
map.addLayer(basemap);
layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://atlas.sre.nl/ArcGIS/rest/services/REGIO/lijst/MapServer", {opacity:.5});
if (layer.loaded) {
buildLayerList(layer);
}
else {
dojo.connect(layer, "onLoad", buildLayerList);
}
}
function buildLayerList(layer) {
var items = dojo.map(layer.layerInfos,function(info,index){
if (info.defaultVisibility) {
visible.push(info.id);
}
return "<input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" + info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label><br>";
});
dojo.byId("layer_list").innerHTML = items.join("");
layer.setVisibleLayers(visible);
map.addLayer(layer);
}
function updateLayerVisibility() {
var inputs = dojo.query(".list_item"), input;
visible = [];
dojo.forEach(inputs,function(input){
if (input.checked) {
visible.push(input.id);
}
});
//if there aren't any layers visible set the array to be -1
if(visible.length === 0){
visible.push(-1);
}
layer.setVisibleLayers(visible);
}
function mapReady(map){
dojo.connect(map,"onClick",executeIdentifyTask);
//create identify tasks and setup parameters
identifyTask = new esri.tasks.IdentifyTask("http://atlas.sre.nl/ArcGIS/rest/services/REGIO/lijst/MapServer");
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 10;
identifyParams.returnGeometry = true;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
identifyParams.width = map.width;
identifyParams.height = map.height;
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
}
function executeIdentifyTask(evt) {
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
// Let's return an array of features.
return dojo.map(response, function(result) {
var feature = result.feature;
feature.attributes.layerName = result.layerName;
if(result.layerName === 'Archeologie'){
console.log(feature.attributes.PARCELID);
var template = new esri.InfoTemplate("", "<p><strong>Monumentnummer:</strong> ${MONUMENTNR}<br><strong>Waarde:</strong> ${WAARDE}<br><strong>Type:</strong> ${COMPLEX}<br><strong>Toponiem:</strong> ${TOPONIEM}<br><strong>Begin periode:</strong> ${BEGIN_PERI}<br><strong>Eind periode:</strong> ${EIND_PERIO}</p><p><strong>Toelichting:</strong><br/>${TOELICHTING}</p>");
feature.setInfoTemplate(template);
}
else if(result.layerName === 'Monumenten'){
console.log(feature.attributes.PARCELID);
var template = new esri.InfoTemplate("", "<p><strong>Monumentstatus:</strong> ${Monumentstatus}<br/><strong>Monumentnummer:</strong> ${Monumentnummer}<br/><strong>Aanduiding:</strong> ${Aanduiding}<br><strong>Adres:</strong> ${Adres}<br><strong>Postcode:</strong> ${Postcode}<br><strong>Gemeente:</strong> ${Gemeente}<br><strong>Bouwjaar:</strong> ${Bouwjaar}<br><strong>Architect:</strong> ${Architect}</p><p><strong><a id=info href=${html} target=${target}>Meer informatie</a></strong></p>");
feature.setInfoTemplate(template);
}
else if (result.layerName === 'Rijksbeschermd stads/dorps-gezichten'){
var template = new esri.InfoTemplate("", "<p><strong>Monumentstatus:</strong> Rijksbeschemd stads/dorps-gezicht<br/><strong>Naam: </strong>${NAAM}</p><p><strong><a id=info href=${KICHLINK} target=${target}>Meer informatie</a></strong></p>");
feature.setInfoTemplate(template);
}
return feature;
});
});
// InfoWindow expects an array of features from each deferred
// object that you pass. If the response from the task execution
// above is not an array of features, then you need to add a callback
// like the one above to post-process the response and return an
// array of features.
map.infoWindow.setFeatures([ deferred ]);
map.infoWindow.show(evt.mapPoint);
}
//show map on load
dojo.addOnLoad(init);
</script>
</head>
<body class="soria">
<div dojotype="dijit.layout.BorderContainer" design="headline" gutters="false"
style="width: 100%; height: 100%; margin: 0;">
<div id="map" dojotype="dijit.layout.ContentPane" region="center">
<div style="position:absolute; top: 5px; text-align: left; right:5px; z-index:50" id="layerlist">
<strong>Kaartlagen:</strong><br>
<span id="layer_list" ></span>
<br>
<span style="font-size:x-small;">Ondergrond: © <a href="http://www.openstreetmap.org" title="OpenStreetMap" target="_blank">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" title="Creative Commons Attribution-ShareAlike" target="_blank">CC-BY-SA</a></span></div>
</div>
</div>
</body>
</html>
... View more
02-03-2012
09:37 AM
|
0
|
0
|
928
|
POST
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<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>Rijk van Dommel en Aa</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/soria/soria.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/esri/dijit/css/Popup.css">
<style type="text/css">
html, body {
height: 100%; width: 100%; margin: 0; padding: 0;
}
body{
background-color:#FFF; overflow:hidden; font-family: "Trebuchet MS";
}
#map{
overflow:hidden;
padding:0;
}
#layerlist{
background-color: #FFF;
padding: 5px;
border: solid 1px #769dc0;
}
a:link {
color: #009FB4;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #009FB4;
}
a:hover {
text-decoration: underline;
color: #009FB4;
}
a:active {
text-decoration: none;
color: #009FB4;
}
#info {
color:#F00;
}
/*Opmaak Popup Window*/
.esriPopup.myTheme .sizer {
width: 400px;
}
.esriPopup.myTheme .titlePane,
.dj_ie7 .esriPopup.myTheme .titlePane .title {
background-color: #b7dafb; /*Achtergrondkleur titel*/
color:#4a4a4a; /*Textkleur titel*/
font-weight:700; /*dikte letters*/
z-index:100;
}
.esriPopup.myTheme .titlePane {
border:1px solid #769dc0; /*kleur border titel*/
z-index: 100;
}
.esriPopup.myTheme a {
color:#0095aa; /*kleur van de hyperlinks*/
z-index:100;
}
.esriPopup.myTheme .titleButton,
.esriPopup.myTheme .pointer,
.esriPopup.myTheme .outerPointer,
.esriPopup.myTheme .esriViewPopup .gallery .mediaHandle,
.esriPopup.myTheme .esriViewPopup .gallery .mediaIcon {
background-image:url(images/popup_sprite.png); /*afbeelding met de opmaak van de popup*/
z-index:100;
}
.esriPopup.myTheme .contentPane,.esriPopup.myTheme .actionsPane {
background-color:#ffffff; /*Achtergrondkleur inhoud*/
color:#000000;/*Tekstkleur inhoud*/
border-left:1px solid #769dc0;/*border links kleur inhoud*/
border-right:1px solid #769dc0;/*border rechts kleur inhoud*/
z-index:100;
}
/*.esriPopup.myTheme{
border-bottom: 1px solid #769dc0; /*border onder kleur inhoud*/
z-index:100;
}*/
</style>
... View more
02-03-2012
09:37 AM
|
0
|
0
|
928
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|