POST
|
I did it and it doesnt show the layer on the map (doesnt show any result) var interFeature2 = new FeatureLayer("myServer/nterrupciones/PO_PC/MapServer/2"); interFeature2.show(); mapp.addLayers([chqmapabase, heatmapFeatureLayer, heatmapFeatureLayer1, gps_new, interFeature2]); And i also tried to add it in the arcgis viewer for js and this what i got As u can see there are 7 features but no one is shown... When i do a query in the rest service i got them
... View more
07-04-2018
08:24 AM
|
0
|
1
|
926
|
POST
|
Yes i did that and ... I also put the code u gave me in the file, not adding a new reference. let chqNisInfoTemp2= new InfoTemplate();
chqNisInfoTemp2.setTitle("test title");
let chqNisInfoContent2 = "<div style=padding-top: 10px;><b>test content</b><br></div>";
chqNisInfoTemp2.setContent(chqNisInfoContent2);
var interrClienteSED = new ArcGISDynamicMapServiceLayer(layers.read_dyn_predichos_confirmados(),{id:"po_interrupciones"});
interrClienteSED.setInfoTemplates({
0: {infoTemplate: getInfoTemplate2.getCriticalNisInfo()},
1: {infoTemplate: getInfoTemplate2.getNISInfoConf()},
2: {infoTemplate: chqNisInfoTemp2},
3: {infoTemplate: myinfotemplate.getSubConf()},
4: {infoTemplate: myinfotemplate.getSubPred()}
});
interrClienteSED.setVisibleLayers=[0,1,2,3,4,5] That layer(2) is the only one that has the problem, the other ones are working perfectly.
... View more
07-03-2018
02:43 PM
|
0
|
3
|
926
|
POST
|
How i do that? Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
... View more
06-30-2018
09:21 AM
|
0
|
5
|
926
|
POST
|
Hello, Im wondering a reason why my infoTemplate in one layer is not working. I have a dynamic service with 5 layers and all the other ones are working perfectly when i click in the map, showing the information about them, but when i click the number (2) it doesnt show anything and it says "no info available" Here is where i define the infoTemplate. interrClienteSED.setInfoTemplates({
0: {infoTemplate: getInfoTemplate2.getCriticalNisInfo()},
1: {infoTemplate: getInfoTemplate2.getNISInfoConf()},
2: {infoTemplate: getInfoTemplate2.getNISInfoPred()},
3: {infoTemplate: myinfotemplate.getSubConf()},
4: {infoTemplate: myinfotemplate.getSubPred()}
});
Here is where i have it: 2: {infoTemplate: getInfoTemplate2.getNISInfoPred()}, And this function gives me the infoTemplate that i use: getNISInfoPred(){
let chqNisInfoTemp2= new InfoTemplate();
chqNisInfoTemp2.setTitle("<b>NIS: ${ARCGIS.DBO.CLIENTES_XY_006.nis}</b>");
let chqNisInfoContent2 =
"<div style=padding-top: 10px;><b>ID Orden:</b> ${ARCGIS.dbo.view_tiempo_order_po.id_orden}<br></div>";
chqNisInfoTemp2.setContent(chqNisInfoContent2);
return chqNisInfoTemp2;
} It doesnt show anything. Even if the fields are not correct, it suppose to show the template with ID Orden and NIS empty, but it just doesnt work at all.
... View more
06-29-2018
04:39 PM
|
0
|
7
|
1107
|
BLOG
|
It is still little bit harder to implement as the way we found with some people here long time ago.
... View more
05-10-2018
01:39 PM
|
0
|
0
|
2405
|
POST
|
Hey there, im wondering if there is a way to put the new nova basemap in the basemap toggle, cuz i really like it. I hope u guys can help me, its really appreciated. Thanks in advice.
... View more
04-26-2018
02:01 PM
|
0
|
5
|
1278
|
POST
|
Ok, i make it work, but if i want to get the attributes from the infowindow when its more than 1 result?, like, lets say we have 2 results for the same point, but i only want to get the attributes from the second one . Here is what i have in my code: mapp.on('click', (event)=>{
var identifyTask, identifyParams;
identifyTask = new IdentifyTask(layers.read_dynamic_ap(this.props.token));
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 10;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [0, 1];
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = mapp.width;
identifyParams.height = mapp.height;
identifyParams.geometry = event.mapPoint;
identifyParams.mapExtent = mapp.extent;
var onlyLum = [];
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response) {
var filtered = response.filter(e=>{
return e.layerName =='Luminarias';
});
return arrayUtils.map(filtered, function (result) {
var feature = result.feature;
var layerName = result.layerName;
feature.attributes.layerName = layerName;
if (layerName === 'Luminarias') {
var template = ap_info(feature)
feature.setInfoTemplate(template);
}
return feature;
});
});
mapp.infoWindow.setFeatures([deferred]);
mapp.infoWindow.show(event.mapPoint);
on(document.getElementById('map'), '.clickMe:click', function(e,x) {
console.log("holasdASd", event);
});
});
... View more
03-19-2018
07:17 AM
|
0
|
0
|
580
|
POST
|
Hello, Im having an issue with the addEventListener for a button that i put inside a infoTemplate. I have the following code: var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response) {
var filtered = response.filter(e=>{
return e.layerName =='Luminarias';
});
return arrayUtils.map(filtered, function (result) {
var feature = result.feature;
var layerName = result.layerName;
feature.attributes.layerName = layerName;
if (layerName === 'Luminarias') {
var template = ap_info(feature)
feature.setInfoTemplate(template);
}
return feature;
});
});
mapp.infoWindow.setFeatures([deferred]);
mapp.infoWindow.show(event.mapPoint);
deferred.then(()=>{
document.getElementById("editar_btn").addEventListener('click', (e)=>{console.log(e,"button")});
})
}); And then where i make the info template: function ap_info(feature){
var content = `<div style=padding-top: 10px;>ROTULO: ${feature.attributes.ROTULO}<br /></div>
<div style=padding-top: 10px;>Tipo Conexión: ${feature.attributes.TIPO_CONEXION}<br /></div>
<div style=padding-top: 10px;>Tipo: ${feature.attributes.TIPO}<br /></div>
<div style=padding-top: 10px;>Propiedad: ${feature.attributes.PROPIEDAD}<br /></div>
<div style=padding-top: 10px;>Medido: ${feature.attributes.MEDIDO_TERRENO}<br /><Button class="ui button btn_busqueda" id="editar_btn"">Editar</Button></div>`;
var title = "ID Luminaria " + feature.attributes.ID_LUMINARIA;
var infoTemplate = new InfoTemplate();
infoTemplate.setTitle(title);
infoTemplate.setContent(content);
return infoTemplate;
} So how u see, in the info template i place the button inside the content. <Button class="ui button btn_busqueda" id="editar_btn"">Editar</Button> So i need to make the button work for each feature with a listener function that returns the current information shown in the infoWindow. Any ideas? thanks in advice for the help!
... View more
03-16-2018
09:08 AM
|
0
|
2
|
830
|
POST
|
A point, thats why. So how should i do the offset with a point? Thanks in advice
... View more
03-13-2018
08:05 AM
|
0
|
2
|
297
|
POST
|
Hello again. Im having an issue with this map.centerAndZoom(featureSet.features[0].geometry.getExtent().offset(10,0).getCenter(),20);
The error says Cannot read property 'offset' of null. Im doing a query to a layer and i got the geometry and attributes correctly. So still i cannot move the extent to the position i want.
... View more
03-12-2018
10:38 AM
|
0
|
6
|
1033
|
POST
|
This work for me, thanks! map.centerAndZoom(featureSet.features[0].geometry.getExtent().getCenter(),20);
map.setExtent(featureSet.features[0].geometry.getExtent().offset(-10,0), true);
... View more
03-02-2018
07:14 AM
|
0
|
2
|
1033
|
POST
|
Oh no, is there any example on how to apply that?. I should do it into the map or how? Thanks in advice
... View more
03-02-2018
06:13 AM
|
0
|
1
|
1033
|
POST
|
Hello. I want to know if there is a way to move the center of the map when querying a little bit. Iam querying some feature (just 1 result) and im doing this for showing it in the center of the map. map.centerAndZoom(featureSet.features[0].geometry.getExtent().getCenter(),20); In my app when i do this i have a problem on visualization, thats why i want to move it to the right a little bit. This is what i obtain: (See the blue line on the screen) The red container is over the map, thats why when i do the center i got that. this is what i want to get: Thanks in advice
... View more
03-02-2018
06:04 AM
|
0
|
13
|
1887
|
Title | Kudos | Posted |
---|---|---|
1 | 06-21-2017 02:09 PM | |
1 | 04-10-2015 07:52 AM | |
1 | 03-23-2016 02:08 PM | |
1 | 02-22-2016 05:01 AM | |
1 | 10-09-2018 07:10 AM |
Online Status |
Offline
|
Date Last Visited |
05-01-2024
03:05 AM
|