POST
|
This works by replacing window for document.getElementById('map') if it's not in an iframe.
... View more
05-13-2016
12:08 PM
|
2
|
0
|
1035
|
POST
|
In the previous API version I was able to update the geometry of a graphic using the setter (e.g. myGraphic.setGeometry(new Point([lon, lat])) ). In the current version, this functionality has been replaced by watchers/observers, but it seems this is missing on graphics. I've tried: myGraphic.geometry = new Point([lon, lat])); // The obvious one
// And all these other ones...
myGraphic.geometry.update(lon,lat);
myGraphic.geometry.latitude = lat;
myGraphic.geometry.longitude = lon;
myGraphic.geometry.setLatitude(lat);
myGraphic.geometry.setLongitude(lon);
// Same methods using x and y, etc... This will work if you haven't added the graphic to the map / graphicsLayer, but once you do so it is stuck at that position, no matter what method you use to update the geometry. In the meantime, I've implemented a workaround where I remove the old graphic and add a new one with the new geometry, but this is not desirable since it causes a momentary flash on the screen where there are no graphics.
... View more
05-13-2016
12:03 PM
|
0
|
7
|
6397
|
POST
|
It is strange that expanding the extent did not work for you. Have you tried a smaller value for the expand function and setting the fit option to true? app.map.setExtent(stateExtent.expand(1.3), true);
... View more
04-14-2016
11:31 AM
|
0
|
0
|
804
|
POST
|
I've fixed this issue. I discovered it may have been caused by the method Angular Material uses to handle gestures and touch events. I didn't dig into their code too much, so I'm not sure what the optimal solution for this kind of problem would be. However, my workaround was to add a mousedown event to the feature layer myLayer.on("touchend, click, mouse-down", function(evt) { //do something }
... View more
04-11-2016
12:56 PM
|
1
|
0
|
660
|
POST
|
Thank you again. Unfortunately, this solution did not make a difference in my application. I agree with you. I have noticed that this has been an issue from as early as 2012. Is there any way we can get in touch with the developers and point this out? This is very much a crucial feature of the Javascript API and the application I'm working on. I'm a bit surprised it doesn't work so well on mobile devices (it is not just this single issue, but there are other modules such as the LocateButton, other events handling, etc that don't work well).
... View more
04-07-2016
03:41 PM
|
0
|
0
|
660
|
POST
|
Robert, Thank you for your suggestion and prompt response. Unfortunately, this did not work. I also have a mouse-over event going on that triggers a tooltip, and this seems to work just fine on mobile devices. I don't think this other event is conflicting with the mouse click / touchend event since I've tried to turn the mouse-over event off and still ran into the same issue. I've also noticed that it IS possible to trigger the click event. You just have to be extremely precise on where you tap and it can take 50+ attempts to get it to work. Any other ideas?
... View more
04-07-2016
06:57 AM
|
0
|
2
|
660
|
POST
|
I'm having an issue where click events don't fire as touch/tap events on mobile and would like to know what is the proper way to do this. Currently, my code looks like this: var myLayer = new FeatureLayer(...);
myLayer.on('click', function (evt) {
// do something
}); Also worth noting, I've tried requiring this module 'dojox/mobile/View' and setting this variable document.dojoClick = false; Any help would be appreciated. Thank you!
... View more
04-07-2016
06:29 AM
|
0
|
5
|
3834
|
Title | Kudos | Posted |
---|---|---|
1 | 04-11-2016 12:56 PM | |
2 | 05-13-2016 12:08 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|