Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2011, 01:41 PM   PM User | #1
cutexxbaby
New Coder

 
Join Date: Apr 2011
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
cutexxbaby is an unknown quantity at this point
Exclamation Urgent: How to fix infowindow to a point so when map drag it won't move

How to fix a infowindow or a info template to a point so that when i drag the map the infowindow will no change place or move ...what is the code...and where shld i place it at?

this is my code :
var stX = "23319.3347409758";
var stY = "28825.7191286444";
var pt= new esri.geometry.Point(stX,stY,map.spatialReference);
//var strImage = "http://www.rw-designer.com/i/download48b.png";
var symbol = new esri.symbol.PictureMarkerSymbol(strImage, 25,25);
var attr = {"PlaceName":"Peranakan musem of Singapore","PlaceAddr":"addr"};
var infoTemplate = new esri.InfoTemplate();
infoTemplate.setTitle("Building Name:");
infoTemplate.setContent(getInfoContent);
var graphic = new esri.Graphic(pt,symbol,attr,infoTemplate);
gLayer.add(graphic);
}

function getInfoContent(graphic){
var bc = new dijit.layout.BorderContainer({style: "font-size: 11pt; height: 520px; width:493px; background: #CCFFFF;"});
var c1 = new dijit.layout.ContentPane({
region: "top",
style: "height: 20px width: 100%",
content: "hello"
});
bc.addChild(c1);


//make a tab container
var tc = new dijit.layout.TabContainer({
region: "center",
style: "height: 65%; width: 100%; "
}, dojo.create("div"));

//display attribute information
var cp1 = new dijit.layout.ContentPane({
//style: " background-color: red; ",
title: "<font color= #E4287C><b>detail</font> ",
content: "sfdfsdfsdf"
});
tc.addChild(cp1);
bc.addChild(tc);
return bc.domNode;
}
dojo.addOnLoad(addSymbol);
cutexxbaby is offline   Reply With Quote
Reply

Bookmarks

Tags
api, infowindow, javascript, map

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:57 PM.


Advertisement
Log in to turn off these ads.