Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to get a popup window that identifies a location to be moveable. My code is similar to the API example:

var popupOptions = {
    fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
                new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
                new dojo.Color([255, 0, 0]), 2),
                new dojo.Color([255, 255, 0, 0.25]))
}

var popup = new esri.dijit.Popup(popupOptions, dojo.create("div"));

map = new esri.Map("map", {
    infoWindow:popup,
    extent: initExtent
});

I can't seem to find anywhere that will allow me to make that popup infowindow moveable (was thinking of trying to implement dojo.dnd.moveable).

I've tried, unsucessfully:

function makeMoveable(node){
    var dnd = new dojo.dnd.Moveable(dojo.byId(node));
}
makeMoveable(popup);

Anyone have a suggestion?

share|improve this question
1  
If I were you I wouldn't use dijit's made by ESRI. I work a lot with esri JS api and I've found lots of bugs in those. And IMO those modules are not very configurable. –  Krystian Feb 26 '13 at 13:57
1  
I previously thought about doing something similar, but making the popup moveable is only part of the problem - the window points to the location it references using one of these images: serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/dijit/… Unless you want to get into a rather sticky problem you will have to live with the popup no longer pointing to the correct location –  tomfumb Feb 26 '13 at 17:27
add comment

2 Answers 2

Add a div with id identifyDiv to your html code and change you javascript to be

var popup = new esri.dijit.Popup({popupOptions}, "identifyDiv");

map = new esri.Map("map", {
    infoWindow:popup,
    extent: initExtent
});

makeMoveable("identifyDiv");
share|improve this answer
add comment

Based on comments to my question, I decided to not make this box moveable and keep the close icon for the users.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.