|
POST
|
I have read that document actually and the problem is I need to interact with the map for the popup to appear based on that article. There's alot more to read! Have you tried creating a point object and setting the infoWindow location?
var point = new Point(x, y, map.spatialReference);
map.infoWindow.show(point);
I wonder if it is possible to have highlight and popup at the same time without clicking on the map itself. You can 🙂 There are samples that show both behaviors separately. You, as the developer, would need to combine them to produce your desired functionality.
... View more
05-14-2014
02:12 PM
|
0
|
0
|
2277
|
|
POST
|
Hi Ryan. This might be what you are looking for: https://developers.arcgis.com/javascript/jshelp/intro_infowindow.html I strongly recommend checking out the 'Concepts' section of our documentation if you haven't already. Reading the docs could potentially save you dozens of hours in the long run.
... View more
05-14-2014
01:50 PM
|
0
|
0
|
2277
|
|
POST
|
That sounds much easier than my solution. I'm glad you found something better 🙂 If you're satisfied, make sure you mark this thread as answered.
... View more
05-14-2014
12:02 PM
|
0
|
0
|
1867
|
|
POST
|
I would do everything in Javascript using a forEach loop on your newly created logo array. Check out DOJO's version because it tends to work on all older versions of IE as well. http://dojotoolkit.org/reference-guide/1.9/dojo/_base/array.html#dojo-base-array-foreach
... View more
05-14-2014
11:59 AM
|
0
|
0
|
1723
|
|
POST
|
Unfortunately, the documentation is a bit misleading in this case. There is no explicitly set default width and height for PictureMarkerSymbols. The values *should be* the actual width and height of the image being used. I will bring this up with the documentation folks. In the meantime, it would be best if your symbols all used the same dimensions. If you absolutely cannot figure any other solution, you can use javascript to calculate the dimensions of the image after it is loaded into memory.
map.on("click", function(evt){
// Remove old Graphics
myGraphicsLayer.graphics.forEach(function(g){
if(g.visible === true)
myGraphicsLayer.remove(g);
});
var symbol, point, graphic;
var img = new Image();
img.src = '../../uihlein/test/images/star.png';
img.onload = function() {
symbol = new PictureMarkerSymbol('../../uihlein/test/images/star.png', this.width, this.height);
point = new Point(evt.mapPoint.getLongitude(), evt.mapPoint.getLatitude());
graphic = new Graphic(point, symbol);
myGraphicsLayer.add(graphic);
map.infoWindow.show(point);
}
});
This is not the best solution (it took two minutes to write and is more of a proof of concept). I strongly encourage you to seek out alternative solutions.
... View more
05-14-2014
11:49 AM
|
0
|
0
|
1867
|
|
POST
|
You're almost done! That javascript snippet is exactly what you want. It relies on the existence of: configOptions.customlogo.image Since that code only executes once, you'll need to do two things to make it work for multiple logos: 1) set up an array of logo urls 2) set up a length-based loop for creating the img dom nodes and populating your container div You'll want to wrap most of that javascript code inside your loop. Further CSS changes will probably be required.
... View more
05-14-2014
11:30 AM
|
0
|
0
|
1723
|
|
POST
|
Interesting... I am also using Firefox 29.0.1 (on Win7 64) but am unable to replicate this issue. @Jeff, in the sample Pau linked, are you seeing the event fire twice?
... View more
05-14-2014
11:14 AM
|
0
|
0
|
2181
|
|
POST
|
You would probably have to edit this specific CSS class in esri.css:
.map .logo-med {
background-image: url("../images/map/logo-med.png");
cursor: pointer;
display: inline-block;
height: 36px;
vertical-align: bottom;
width: 200px;
z-index: 30;
}
Otherwise, you would want to use javascript to add more images to that div on initial load. What method have you used to add a custom image so far and why can't you use the same method to add more logos?
... View more
05-14-2014
11:07 AM
|
0
|
0
|
1723
|
|
POST
|
In short, you need to temporarily override the _deNormalizePoint() function in _Box.js (which lives inside the toolbars directory) with the following: _deNormalizePoint:function(d,a){ return d;}
... View more
05-13-2014
12:47 PM
|
0
|
0
|
2050
|
|
POST
|
Hi Jeff, Geolocate worked for me in Firefox using your JSFiddle. It could be your browser settings (https://www.mozilla.org/en-US/firefox/geolocation/) What errors are you seeing in the console? As for clearing the text from your input box, it appears that your spotlight is being placed on top of the input. You will want to change the z-index of your input container. <div style="position:absolute; left:40px; top:10px; z-Index:999;"> <div id="search"></div> </div>
... View more
05-05-2014
12:00 PM
|
1
|
0
|
936
|
|
POST
|
Vanilla Javascript: http://jsfiddle.net/Ev8ZH/3/ DOJO Javascript (recommended): http://dojotoolkit.org/reference-guide/1.9/dojo/dom-construct.html#dojo-dom-construct-place This should be all you need. Check out DOJO's samples and tutorials if you need any other help. Make sure you mark this thread as answered if you are satisfied. Thanks!
... View more
05-01-2014
09:25 AM
|
0
|
0
|
1503
|
|
POST
|
I would move the dom node itself to the second parent. This is the easiest way.
... View more
05-01-2014
09:16 AM
|
0
|
0
|
1503
|
|
POST
|
What is your specific use-case? You can always move the dom node itself. I think this would be easier.
... View more
05-01-2014
09:12 AM
|
0
|
0
|
1503
|
|
POST
|
Hi Eric, I highly recommend reading the starter tutorials for the ESRI JSAPI. Even though you are using a storymaps template, you really do need to know javascript basics before coding with our library. Concerning your issue: it looks like the majority of your application logic exists in main.js, which you did not post. I assume the map object is defined in main.js, which would most likely be out of scope if you were trying to access it from your main html. You also override any preexisting context by using "var map" at the beginning of your require block. The starter tutorials address things like this. If you don't know much about scope and context, I also suggest reading up on those concepts. Hope this helps!
... View more
05-01-2014
09:10 AM
|
0
|
0
|
3295
|
|
POST
|
In that specific example, it is not using the specific geometry of a particular feature in the query. It is setting the query geometry to the point where the user clicked the map. query.geometry = evt.mapPoint; Because evt.mapPoint is not exactly equal to the geometry of one of your features, the queryTask will return nothing (e.g: 4.00001 does not equal 4, return nothing). If you were to pass the geometry of your feature to the queryTask, it would return that feature as a graphic. However, if you were to have that feature information already, you probably wouldn't need to run a query at all.
... View more
04-30-2014
09:58 AM
|
0
|
0
|
1860
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-26-2014 09:56 AM | |
| 1 | 09-18-2014 11:50 AM | |
| 1 | 09-19-2014 11:28 AM | |
| 1 | 07-09-2014 01:43 PM | |
| 1 | 07-09-2014 02:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-14-2024
05:31 PM
|