This is my first question of three where I am trying to convert a responsive web created Tom Wayson. His original app is here: tomwayson/responsive-citizens · GitHub
From my original app, I want to add the following:
// set custom extent
var initialExtent = new Extent({
"xmin": 777229.03,
"ymin": 1133467.92,
"xmax": 848340.14,
"ymax": 1185634.58,
"spatialReference": {
"wkid": 3435
}
});
// create map and set slider style to small
map = new Map("mapDiv", {
showAttribution: false,
sliderStyle: "small",
extent: initialExtent,
logo: false
});
// Starts initEditing after the feature layer(s) have been added
map.on("layers-add-result", initEditing);
// add imagery
var tiled = new ArgGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer");
map.addLayer(tiled);
// add operational layer
var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", {
"opacity": 0.5
});
map.addLayer(operationalLayer);In the app that I am trying to add this information into, I believe I want to modify the following, but I am not sure how (the complete app is at: csergent45/streetSigns · GitHub
excerpt 1:
var config = {
mapOptions: {
basemap:'topo',
center:[-117.1825, 34.0547],
zoom:14,
sliderPosition: 'bottom-right'
},
citizenRequestLayerUrl: 'http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0',
infoTemplate: {
title: '<b>Request ${objectid}</b>',
content: '<span class="infoTemplateContentRowLabel">Date: </span>' +
'<span class="infoTemplateContentRowItem">${requestdate:DateFormat}</span><br><span class="infoTemplateContentRowLabel">Phone: </span>' +
'<span class="infoTemplateContentRowItem">${phone:formatPhoneNumber}</span><br><span class="infoTemplateContentRowLabel">Name: </span>' +
'<span class="infoTemplateContentRowItem">${name}</span><br><span class="infoTemplateContentRowLabel">Severity: </span>' +
'<span class="infoTemplateContentRowItem">${severity:severityDomainLookup}</span><br><span class="infoTemplateContentRowLabel">Type: </span>' +
'<span class="infoTemplateContentRowItem">${requesttype:requestTypeDomainLookup}</span><br><span class="infoTemplateContentRowLabel">Comments: </span>' +
'<span class="infoTemplateContentRowItem">${comment}</span>'
}
};excerpt 2:
// initialize the map and add the feature layer
// and initialize map widgets
var initMap = function() {
app.map = BootstrapMap.create('map', config.mapOptions);
app.citizenRequestLayer = new FeatureLayer(config.citizenRequestLayerUrl, {
mode: FeatureLayer.MODE_ONEDEMAND,
infoTemplate: new InfoTemplate(config.infoTemplate),
outFields: ['*']
});
app.map.addLayer(app.citizenRequestLayer);