POST
|
If this InfoWindow always misbehaves, is there a way to always display it in the same location, i.e.: in the lower left corner say?
... View more
09-16-2014
04:25 AM
|
0
|
1
|
507
|
POST
|
Here are images showing what is happening. One image shows the problem and the other shows when things are ok.
... View more
09-15-2014
11:31 AM
|
0
|
0
|
507
|
POST
|
Hi, Here is the code. We are using a MVVM model with KnockoutJS popupV.js: (function() { 'use strict'; define(['gcviz-vm-datagrid' ], function(datagridVM) { var initialize; initialize = function($mapElem) { var $popup, popupWindow, config = $mapElem.datagrid, mapid = $mapElem.mapframe.id; $mapElem.find('#' + mapid).append('<div id="popup' + mapid + '" class="gcviz-popup"></div>'); $popup = $mapElem.find('.gcviz-popup'); return(datagridVM.initialize($popup, mapid, config)); }; return { initialize: initialize }; }); }).call(this); popupVM.js: (function() { 'use strict'; define(['knockout', 'gcviz-i18n', 'gcviz-func', 'gcviz-gismap' ], function(ko, i18n, gcvizFunc, gisMap) { var initialize, vm; initialize = function($mapElem, mapid, config) { // data model var datagridViewModel = function($mapElem, mapid, config) { var _self = this, layerInfo = config.layers, popupid = 'popup' + mapid; _self.init = function() { var mymap = gcvizFunc.getElemValueVM(mapid, ['map', 'map'], 'js'); if (config.enable) { // Are popups desired? for (var i=0; i < layerInfo.length; i++) { if (layerInfo.popups) { gisMap.addPopup(mymap, layerInfo); } } } return { controlsDescendantBindings: true }; }; _self.clickPrevious = function() { //to be coded later }; _self.clickNext = function() { //to be coded later }; _self.init(); }; vm = new datagridViewModel($mapElem, mapid, config); ko.applyBindings(vm, $mapElem[0]); // This makes Knockout get to work return vm; }; return { initialize: initialize }; }); }).call(this); addPopup function inside gisMap module referenced inside popupVM: addPopup = function(mymap, layerInfo) { var fill = new esriFill('solid', null, new esriColor('#A4CE67')), i, layer, thedescription, template, thetitle, popup = new esriPopup({ fillSymbol: fill, titleInBody: true }, domConstruct.create('div')); //Add the dark theme domClass.add(popup.domNode, 'dark'); //Hide the maximize button domClass.add(popup.domNode.childNodes[0].childNodes[0].childNodes[0].childNodes[4], 'hidden'); //Add popup to map mymap.infoWindow = popup; if (layerInfo.popups.title.usefield) { thetitle = '{' + layerInfo.popups.title.titlefield + '}'; } else { thetitle = layerInfo.popups.title.titletext; } //Put the desired fields in the content description thedescription = '<table style=\"text-align: left;\">'; //TODO: Add it i18... thedescription += '<tr><th>Property</th><th>Value</th></tr>'; for (i=0; i < layerInfo.popups.fields.length; i++) { thedescription +='<tr>'; thedescription += '<td>' + layerInfo.popups.fields.fieldlabel + ':</td>'; thedescription += '<td>{' + layerInfo.popups.fields.fieldname + '}</td>'; thedescription +='</tr>'; } thedescription += '</table>'; //Setup the template template = new esriPopupTemplate({ title: thetitle, description: thedescription }); //Attach the template to the layer //Check if in feature layers for (i=0; i < mymap.layerIds.length; i++) { layer = mymap.getLayer(mymap.layerIds); if (layer.id === layerInfo.layerid) { layer.infoTemplate = template; } } //Attach the template to the layer //Check if in a GraphicLayer for (i=0; i < mymap.graphicsLayerIds.length; i++) { layer = mymap.getLayer(mymap.graphicsLayerIds); if (layer.id === layerInfo.layerid) { layer.infoTemplate = template; } } }; popup.css: @import "gcviz-mixin"; .gcviz-popup { width: 350px!important; height: 200px!important; } .infowindow { width: 350px!important; height: 200px!important; } /* Change color of icons in Popups */ .esriPopup.dark div.titleButton, .esriPopup.dark div.titlePane .title { color: $white!important; } .esriPopup.dark .titlePane { background-color: $black; background-image: url("http://s-bsc-geoappint.nrn.nrcan.gc.ca/GeoCanViz/gcviz/images/headBlackbar.png")!important; } .esriPopup.dark .actionsPane { color: $black!important; background-color: $palegrey; background-image: url("http://s-bsc-geoappint.nrn.nrcan.gc.ca/GeoCanViz/gcviz/images/footGreybar.png")!important; } .esriPopup.dark .action { color: $black!important; } .esriPopup.dark .titlePane, .dj_ie7 .esriPopup.dark .titlePane .title, .esriPopup.dark .contentPane, .esriPopup.dark .actionsPane { width: 350px!important; } .esriPopup.dark .sizer { width: 350px!important; } /* Additional customizations */ .esriPopup.dark .esriPopupWrapper { border: none!important; width: 350px!important; background-color: $black; } .esriPopup .contentPane { text-align: center!important; background-color: $white!important; max-height: 150px!important; color: $black!important; @include app-text(1.0, bold, $black); width: 325px!important; } .esriViewPopup .gallery { margin: 0 auto!important; } .esriPopup { z-index: 999999!important; color: $black!important; background-color: $white!important; width: 350px!important; }
... View more
09-15-2014
11:25 AM
|
0
|
0
|
507
|
POST
|
Hi, I am adding popups to my application and followed the sample http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=popup_chart In that sample, when you click on a location close to the edge of the map, it puts the popup automatically on the inside. In my case, it does not do that properly, and sometimes, the popup is outside the map and therefore gets partially cut. This happens mostly when I click on the right side of the map. It put the popup to the right of where I clicked instead of to the left as expected. Any idea what is causing this behavior? Thanks, Paul
... View more
09-15-2014
11:04 AM
|
0
|
6
|
1243
|
POST
|
Hi Paul, Sorry I didn't port my print sample to the Javascript API. The sample is very related to the .net API and not easy to port to Javascript as it is. Bonne chance. ok, pas de problèmes. Merci. Paul
... View more
07-02-2014
09:11 AM
|
0
|
0
|
320
|
POST
|
Salut Dominique, Have you ever rewritten your printing sample using the JavaScript API? We are moving away from Silverlight into JavaScript and would like to reuse this widget. Thanks, Paul
... View more
06-30-2014
05:37 AM
|
0
|
0
|
409
|
POST
|
Hi, We are trying to use a local Geometry Service from our ArcGIS Server 10.1 and we are finding that it has limits compared to the same service from an ESRI server. When we hit our server to project objects, we find it it will take about 15 objects at a time. If we use the ESRI server "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/project", we find we can send it about 250+ objects. I cannot find any setup parameters for the service that would affect this limitation. Does anyone have similar issues and what can we do? Installed on a Windows Server 2008 R2 Thanks, Paul
... View more
06-06-2014
07:36 AM
|
0
|
0
|
495
|
POST
|
Hi, When we publish a service and ask to have WMS supported, the server generates default capabilities files for the service. I know you can use external capabilities also, but my question is the following. Can we edit something in the server configuration that would modify the default capabilities files the server automatically generates, a style sheet maybe, or something else? I have browsed around in the server folders and have not yet anything. Thanks, Paul
... View more
06-02-2014
05:19 AM
|
0
|
0
|
515
|
POST
|
Hi, Does anyone have a sample of an overview map using a WebTiledLayer (using a WMTS service) as the basemap? Thanks, Paul
... View more
04-23-2014
06:53 AM
|
0
|
0
|
495
|