POST
|
I have 3 files. Test.html; test.js and infoWindow.js. If I comment out the infoWindow.js, I get an error. I added the following code in test.js and infoWindow.js, I still do not get a button added >>>>>>>>>>>>>>>>>>>>>>>>>>>> test.js map.infoWindow.setTitle("Identify Results"); /// ADDED map.infoWindow.setContent( tc.domNode =="<input type='button' value='open newpage' onclick='window.open(http://www.google.co.uk)'/>"); /// ADDED map.infoWindow.setContent(tc.domNode); map.infoWindow.resize(360, 200); >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> infoWindow.js dojo.addClass(this.domNode, "myInfoWindow"); /// ADDED this._openButton = dojo.create("div", { "class": "openButton", title:"Open" }, this.domNode); /// ADDED this._closeButton = dojo.create("div", { "class": "close", title: "Close" }, this.domNode); this._title = dojo.create("div", { "class": "title" }, this.domNode); this._content = dojo.create("div", { "class": "content" }, this.domNode); >>>>>>>>>>>>>>>>>>>>>>>>>>>>
... View more
03-19-2012
09:13 AM
|
0
|
0
|
715
|
POST
|
I have commented out the external infoWindow.js. I have added in the code from the ESRI example (below). I still get the external infoWindow not the default ESRI infoWindow?? <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!--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> Mapping - COLGIS v0.01</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.7/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.7/js/esri/dijit/css/Popup.css"> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } .esriScalebar{ padding: 20px 20px; } #map{ padding:0; } .esriPopup.myTheme .titlePane, .dj_ie7 .esriPopup.myTheme .titlePane .title { background-color: #899752; color: #333333; font-weight: bold; } .esriPopup.myTheme .titlePane { border-bottom: 1px solid #121310; } .esriPopup.myTheme a { color: #d6e68a; } .esriPopup.myTheme .titleButton, .esriPopup.myTheme .pointer, .esriPopup.myTheme .outerPointer, .esriPopup.myTheme .esriViewPopup .gallery .mediaHandle, .esriPopup.myTheme .esriViewPopup .gallery .mediaIcon { background-image: url(../images/popup.png); } .esriPopup.myTheme .contentPane, .esriPopup.myTheme .actionsPane { border-color: 1px solid #121310; background-color: #424242; color:#ffffff; } </style> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.7/js/dojo/dojox/grid/resources/claro.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.7"></script> <script type="text/javascript" src="javascript/jquery-1.5.2.min.js"></script> // <script type="text/javascript" src="myModules/infoWindow.js"></script> // <link rel="stylesheet" type="text/css" href="myModules/infoWindow.css"> <link rel="stylesheet" type="text/css" href="myModules/colgis.css"> <link rel="stylesheet" type="text/css" href="myModules/BingMapControl.css"> <script type="text/javascript" src="myModules/col_common.js" ></script> <script type="text/javascript" src="myModules/colgis.js" ></script> <link href="css/screen.css" media="screen" rel="stylesheet" type="text/css"> </head>
... View more
03-19-2012
04:10 AM
|
0
|
0
|
715
|
POST
|
Hi Zhu, I changed the code, still getting the same error "addIdentifyResultsToMap error, details: [object error]" map.infoWindow.setTitle("Identify Results"); map.infoWindow.setContent(infoTemplate.content=="<input type='button' value='open newpage' onclick='window.open(http://www.google.co.uk)'/>"); map.infoWindow.setContent(tc.domNode); map.infoWindow.resize(360, 200);
... View more
03-19-2012
02:00 AM
|
0
|
0
|
715
|
POST
|
Hi Zhu, I added the code you suggested, still getting an error. I am trying to get a button at the top of the infoWindow. >>>>>>>>>>>>> map.infoWindow.setTitle("Identify Results"); map.infoWindow.setText(infoTemplate.content=="<input type='button' value='open newpage' onclick='window.open(http://www.google.co.uk)'/>" ); map.infoWindow.setContent(tc.domNode); map.infoWindow.resize(360, 200); >>>>>>>>>>>>>>>>>>>>>>>
... View more
03-15-2012
06:42 AM
|
0
|
0
|
715
|
POST
|
Also tried this, does not work ... error In webpage >>>>>>>>>>>> map.infoWindow.setTitle("Identify Results"); map.infoWindow.setText(<a target='_blank' href=http://en.wikipedia.org/wiki/"+ +">Wikipedia Entry</a>"); map.infoWindow.setContent(tc.domNode); map.infoWindow.resize(360, 200); >>>>>>>>>>>> In infoWindow >>>>>>>>>>>> this._closeButton = dojo.create("div", { "class": "close", title: "Close" }, this.domNode); this._title = dojo.create("div", { "class": "title" }, this.domNode); this._setText = dojo.create("div", { "class": "text" }, this.domNode); this._content = dojo.create("div", { "class": "content" }, this.domNode); >>>>>>>>>>>>
... View more
03-15-2012
05:52 AM
|
0
|
0
|
715
|
POST
|
Hi Zhu, Thanks for the email. I was trying to implment the page you sent. I am updating code spread over 4 files. >>>>>>>>>>>>>>>>>>>> The code in my code is: //Set the infoTemplate. infoTemplate = new esri.InfoTemplate(); infoTemplate.title = "${STREET_NAME}"; infoTemplate.content = "<b>Address: </b>${ADDRESS}<br /><b>PostCode: </b>${POSTCODE}" graphic.setInfoTemplate(infoTemplate); >>>>>>>>>>>>>>>>>>>>>>>> I tried to put a button and URL into this, no luck. It did not work
... View more
03-15-2012
05:32 AM
|
0
|
0
|
715
|
POST
|
I added the following code in the addIdentifyResultsToMap(idResults, event) function. This worked. >>>>>>>>>>>> /// PAN & CENTRE MAP ON SELECTED POINT map.infoWindow.show(event.screenPoint, map.getInfoWindowAnchor(event.screenPoint)); var centerPointScreen = map.toScreen(event.screenPoint); /// PAN MAP TO NEW centerpoint (in Map coordinates) centerPoint = map.toMap(event.screenPoint); map.centerAt(centerPoint); /// PAN & CENTRE MAP ON SELECTED POINT >>>>>>>>>>>>
... View more
03-15-2012
03:06 AM
|
0
|
0
|
116
|
POST
|
Hi, Is it possible to create a button in the infoWindow to launch a new window/web page?? Thanks, Clive
... View more
03-15-2012
02:58 AM
|
0
|
9
|
5423
|
POST
|
The map.infoWindow.setFixedAnchor is causing an object error in the addIdentifyResultsToMap function??? The error is addIdentifyResultsToMap error, details: [object error] I want to set the position that the imageWindow is displayed!! I have used the same syntex for the show(map.getInfoWindowAnchor) and setFixedAnchor I do not get an error with show() line. I get an error with setFixedAnchor() line?? map.infoWindow.show(event.screenPoint, map.getInfoWindowAnchor(event.screenPoint)); /// SET THE POSITION OF THE IMAGEWINDOW - UPPER RIGHT map.infoWindow.setFixedAnchor(map.infoWindow.ANCHOR_UPPERRIGHT); I have copied an example and still get the same error?? map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT); Can anyone spot an error??
... View more
03-15-2012
02:27 AM
|
0
|
3
|
2856
|
POST
|
Got the map.centre working. The code below in the function addIdentifyResultsToMap(idResults, event) /// PAN & CENTRE MAP ON SELECTED POINT map.infoWindow.show(event.screenPoint, map.getInfoWindowAnchor(event.screenPoint)); var centerPointScreen = map.toScreen(event.screenPoint); /// PAN MAP TO NEW centerpoint (in Map coordinates) centerPoint = map.toMap(event.screenPoint); map.centerAt(centerPoint); /// PAN & CENTRE MAP ON SELECTED POINT
... View more
03-15-2012
02:17 AM
|
0
|
0
|
903
|
POST
|
I have used the same syntex for the show(map.getInfoWindowAnchor) and setFixedAnchor I do not get an error with show() line. I get an error with setFixedAnchor() line?? map.infoWindow.show(event.screenPoint, map.getInfoWindowAnchor(event.screenPoint)); /// SET THE POSITION OF THE IMAGEWINDOW - UPPER RIGHT map.infoWindow.setFixedAnchor(map.infoWindow.ANCHOR_UPPERRIGHT); I have copied an example from the examples and still get an error?? map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT); Can anyone spot an error??
... View more
03-14-2012
07:22 AM
|
0
|
0
|
903
|
POST
|
I edited the addIdentifyResultsToMap function. I added two lines (below) map.infoWindow.setFixedAnchor(infoWindow.ANCHOR_UPPERRIGHT); map.infoWindow.show(infoWindow.ANCHOR_UPPERRIGHT); I get an error "addIdentifyResultsToMap error, details: [object error] Any suggestions?? >>>>>>>>>>>>>>>>>> if(tc.hasChildren()) { tc.domNode.style.display = 'block'; tc.domNode.style.visibility = 'visible'; tc.startup(); tc.resize(); map.infoWindow.setTitle("Identify Results"); map.infoWindow.setContent(tc.domNode); map.infoWindow.resize(360, 200); map.infoWindow.show(event.screenPoint, map.getInfoWindowAnchor(event.screenPoint)); map.infoWindow.setFixedAnchor(infoWindow.ANCHOR_UPPERRIGHT); map.infoWindow.show(infoWindow.ANCHOR_UPPERRIGHT); flushThis("tabs"); setCursorByID("map", "default"); } hideLoading();
... View more
03-14-2012
05:16 AM
|
0
|
0
|
903
|
POST
|
Hi, I have the imageWindow appearing in the UpperLeft window. I want to move the imageWindow to the UpperRight. I added the following, does not move the imageWindow to UpperRight?? >>>>>>>>>>>>>> show: function(location) { // Is location specified in map coordinates? if (location.spatialReference) { location = this.map.toScreen(location); map.infoWindow.show(location, InfoWindow.ANCHOR_UPPERRIGHT); } // Position 10x10 pixels away from the // requested location /// dojo.style(this.domNode, { /// left: (location.x + 10) + "px", /// top: (location.y + 10) + "px" /// }); >>>>>>>>>>>>>> I commented out the Position 10px, imageWindow on the edge did not show fully. Any suggestions, to get the Anchor working??
... View more
03-14-2012
04:03 AM
|
0
|
0
|
903
|
POST
|
Hi Zhu, I am selecting a Point feature. I amended the code as you suggested, clicked on various points, the map does not recenter?? Is the code above clear enough?? Any other suggestions??
... View more
03-14-2012
12:57 AM
|
0
|
0
|
903
|
POST
|
Hi Zhu, I changed the line as you suggested to: Change graphic.attributes.OBJECTID === foundItem[0] to graphic.attributes.OBJECTID === foundItem The map does not recenter where the user clicks??? It does not move or recenter???
... View more
03-13-2012
08:58 AM
|
0
|
0
|
903
|
Title | Kudos | Posted |
---|---|---|
1 | 02-05-2021 07:18 AM | |
1 | 11-06-2020 07:13 AM | |
2 | 07-07-2021 04:20 AM | |
1 | 01-07-2021 01:38 PM | |
1 | 01-07-2021 02:53 PM |
Online Status |
Offline
|
Date Last Visited |
02-23-2024
07:07 PM
|