POST
|
correct, but that is attaching nodes in the dom, within the same DOM tree. What I dont know how to do is moving things around within two windows.
... View more
05-01-2014
09:29 AM
|
0
|
0
|
300
|
POST
|
correct. I oversimplified it a bit. The divs live in two different windows (parent - child windows)
... View more
05-01-2014
09:13 AM
|
0
|
0
|
300
|
POST
|
Is it possible to reassign the map object to another div on the page ?
var map = new esri.Map('mapone');
so my map object is created with type esri.Map and attached to the div with id 'mapone' I would like to do at some point something like this in my code
map.reattach('maptwo');
where 'maptwo' is the id of another div. (I madeup the reattach method, but something like tis is what I am looking for) so that now my map will show in div 'maptwo' Thanks
... View more
05-01-2014
08:37 AM
|
0
|
6
|
657
|
POST
|
So the couple of lines of code look like this
map.setExtent(polygon.getExtent(), true).then(function(){
map.setLevel(map.getLevel() - 1)
} );
The problem that I have is that visually so see it zooming in and then zooming out one level. What I need is to calculate what level the extent would be , and only then set the level on the map to level -1. The question is if is there any way to know what level a polygon would be displayed, without setting anything on the map, and then just set the level - 1.
... View more
03-05-2014
04:19 AM
|
0
|
0
|
299
|
POST
|
Currently I have a handle on a polygon and I set the extent of the map by doing map.setExtent(polygon.getExtent(), true); I would like to be able to move out one more level from the given extent. Meaning from the result of the setExtent operation above. I guess I could pseudocode so something like
1. map.setExtent(polygon.getExtent(), true);
2. extentDoneCallBack(map.setLevel(map.getLevel() + 1));
making use of the deferred call back of the setExtent action. Would this be the correct approach. It does not look right to me.
... View more
03-04-2014
11:57 AM
|
0
|
1
|
1998
|
POST
|
Yes, there is also map.reposition and what I thought was going to be the key, the reposition() event. Calling map.resize and map.reposition works when you call it at the right time, but for flexible enough ui there is no real way to manually call those methods on map for every single combination on when the map is going to be displaced. It has to be an event that tells you when the reposition happen. I of course tried listening for the reposition event, but it does not work. It only works when you resize the the browser window, but when you use the plank I shared, and add things to the dom, which causes the map to reposition, that event is not fired. As I said, what is even more important is targeting different devices, now you have stacking of elements that will for sure move the map.
... View more
02-03-2014
04:17 AM
|
0
|
0
|
250
|
POST
|
(I moved this post because I think it did not belong there) When I show other divs dynamically given certain state that move the div of the map up or down, the pointer on the map still thinks it is in the old location. To illustrate the current problem i have created the plunk rubberband example (I used as a base the plunk created on this thread) To reproduce the problem: 1. click on map link 2. click on Zoom By rubber button 3. create a box in the map 4. Click "Show Message" 5. click on Zoom By rubber button 6. You will see that when you try to create the box in the map, it is displaced by the height of the message. Calling a map.resize every time I show the message will solve the problem, but this was just an example. My application will show and hide different pieces of the page depending on state that will make the map div move up or down, or even worst since it is responsive different sizes will stack different ways. I also tried the suggestions http://forums.arcgis.com/threads/501...cross-browsers and I was able to create the listener, but it only fires when resizing the window, besides this is not so much a resize of the div but changing the position. This must be a fairly common usecase, What am i missing ?
... View more
02-01-2014
03:41 AM
|
0
|
3
|
576
|
POST
|
I believe the behavior I am experiencing is related to this thread. Basically when I show other divs dynamically given certain state that move the div of the map up or down, the pointer on the map still thinks it is in the old location. To ilustrate the current problem i have created the plunk rubberband example (I used as a base the plunk created on this thread) To reproduce the problem: 1. click on map link 2. click on Zoom By rubber button 3. create a box in the map 4. Click "Show Message" 5. click on Zoom By rubber button 6. You will see that when you try to create the box in the map, it is displaced by the height of the message. Calling a map.resize every time I show the message will solve the problem, but this was just an example. My application will show and hide different pieces of the page depending on state that will make the map div move up or down. I also tried the suggestions http://forums.arcgis.com/threads/5011-Map-Resizing-across-browsers and I was able to create the listener, but it only fires when resizing the window, besides this is not so much a resize of the div but changing the position. This must be a fairly common usecase, What am i missing ?
... View more
01-20-2014
07:04 PM
|
0
|
0
|
708
|
POST
|
I hooked up the resize event as explain above to the div of the map. The event fires when resizing the window, but when I programmatically change the height or width of the div, the event does not fire. My question is if it is suppose to fire on changes to height and width ? I would think so, otherwise just listening for window.resize event would have been enough.
... View more
01-18-2014
06:31 PM
|
0
|
0
|
179
|
POST
|
I tried to see if starting with a hidden map with ng-show="false", and then putting ng-show="true", I could see the map, but I get the following errors Error: Invalid negative value for <svg> attribute width="-2.222222328186035" Error: Invalid negative value for <svg> attribute height="-2.222222328186035"
... View more
01-17-2014
08:24 AM
|
0
|
0
|
708
|
POST
|
I have the same issue. Battling with angular and esri for a month now. I just tried 3.8 version and the problem persist. I would like to know what the known issue mentioned in the thread is. Thanks a lot.
... View more
01-16-2014
11:19 AM
|
0
|
0
|
708
|
POST
|
I decided to try the following code
function initMap(){
esriConfig.defaults.map.height = 600;
esriConfig.defaults.map.width = 623;
var myMap = new esri.Map('map');
var urlAerial = "http://gisweb.miamidade.gov/ArcGIS/rest/services/MapCache/MDCImagery/MapServer";
var tiled = new esri.layers.ArcGISTiledMapServiceLayer(urlAerial);
myMap.addLayer(tiled);
$rootScope.graphicLayer = new esri.layers.GraphicsLayer();
myMap.addLayer($rootScope.graphicLayer);
$rootScope.map = myMap;
}
dojo.ready(initMap);
So I do not do a resizing of the map or add any graphics. I am just changing the default configuration for height and width. It seems to work, but from time to time I get a 404 on tile like http://gisweb.miamidade.gov/ArcGIS/rest/services/MapCache/MDCImagery/MapServer/tile/8/140605/110499 At that Point I get: Problem parsing d="Z" and the map does not load.
... View more
12-11-2013
09:07 AM
|
0
|
0
|
398
|
POST
|
that is the whole problem. When the map display has changed, I have to call map.resize(), and add some graphics to the layer. I really dont find a solution for this.
... View more
12-11-2013
08:23 AM
|
0
|
0
|
398
|
POST
|
Ben thanks a lot for the response. This is an angular application which starts with other data but not displaying the map. After some actions by the user the map needs to show. Last night I did some more testing and you are right on your comments. I was not able to replicate just resizing the map or just adding a graphic to a graphic layer, but the moment I put both together it absolutely breaks after a few hits.
function(){
$scope.map.resize();
$scope.map.reposition();
...
var gra = new esri.Graphic(geometry, symbol2, '', '');
$scope.map.graphics.add(gra);
$scope.map.centerAndZoom(geometry, 8);
}
And I basically find no way to hook the map to the div size. I still dont understand how you are suggesting to do it. If I start with a style of display none, when I do
var myMap = new esri.Map('map');
esri, injects the styles inline into the div, and since ti is display none it puts the default values of 400x400. So wether I wait or not to bind the map to the div, I dont see how it will ever get the values of the div.
... View more
12-11-2013
03:45 AM
|
0
|
0
|
398
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|