zoom level automatically increases after Ist time

Hi,
I m facing a problem that Ist time map is showing main location at center. But after that, It goes to upper left corner and zoom level is automatically increases.
I have set zoom level to 10.

I m in need of early solution.

Thx

[242 byte] By [Hi!] at [2008-1-6]
# 1
Hmmm,
can you post a link to your map?
Its always best to have a look on your buggy page.
JeffK at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 2
I would like to know how a link that i will send u work. Actually i am using tomcat and to my project is configured in my eclipse. how it will work?
or where should I post my code so as to giv u link?
Hi! at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 3
Hi, the easiest thing to do is past your code in here, then make sure you click on the "Code block" icon in the toolbar above when you first create the post.

Alternatively if you can host it up on a server through tomcat manager that will work too if you know how to deploy with it.

DerekChan at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*,com.ftg.roaams.to.property.*,com.ftg.roaams.constants.PropertyConstants,com.ftg.roaams.constants.*,com.ftg.roaams.model.manager.property.*,com.ftg.roaams.util.MiscUtil,com.ftg.roaams.model.manager.*" errorPage="" %>
<html>
<head>
<title>Programming Virtual Earth</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src=
"http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5">
</script>
<script language="javascript">
var arrLatitude = new Array();
var arrLongitude = new Array();
var arrPropDet = new Array();
var arrList_nos = new Array();
<!-- for price of properties, Gaurav -->
var arrProp_price = new Array();
var arrStatus = new Array();
<%
Residential res = null;
Land lnd = null;
Commercial comm = null;
String propType = "";
String zip = "", strTemp = "",strTmp = "",mainPropDet ="",list_nos="",mainPropPrice="";
String list_prop_price="";
String status="";
String statforarrS="";
int intTmp;
int intTemp;
double dblTmp;
double dublTmp;
int totRoom;
int bedRoom;
double acres;
double sq_feet;
String latitude = "";
String longitude = "";
String propdet = "";
String propMsg = "";
PageListing pageListing = (PageListing) session.getAttribute("PROP_LIST");
String list_no = "";
String selZip = "";
int index = Integer.parseInt(request.getParameter("index"));
ArrayList propList = pageListing.getArrList();
Object[] objarray=propList.toArray();
Property_Intf propObject = null;
if(objarray.length>0){
propObject = (Property_Intf)objarray[index];
propType = propObject.getProp_type();
if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_RESIDENTIAL)){
res = (Residential)propObject;
strTemp = res.getZip_code();
selZip = (strTemp==null || strTemp.equals(""))?""Tongue TiedtrTemp;
list_no = res.getList_no();

strTmp=res.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
// propdet += (propdet.equals(""))? " Status : " + status : " Status : " + status ;
}
/*else{
status="";
propdet += (propdet.equals(""))? status : status;
}*/

intTmp=res.getNo_rooms();
totRoom = intTmp;
propdet += (propdet.equals(""))? " Total Room : " + totRoom : " Total Room : " +totRoom ;

intTemp=res.getNo_bedrooms();
bedRoom = intTemp;
propdet += (propdet.equals(""))? " BedRoom : " + bedRoom : " bedRoom : " +bedRoom + "<BR>" ;

strTmp = res.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp);
mainPropPrice=strTmp = String.valueOf(res.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = res.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = res.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = res.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
mainPropDet = propdet;

if(!selZip.equals("")){
for(int i=0;i<objarray.length;i++){

propdet ="";
propObject = (Property_Intf)objarrayIdea;
propType = propObject.getProp_type();
if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_RESIDENTIAL)){

res = (Residential)propObject;
strTemp = res.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? res.getLongitude() : ","+ res.getLongitude();
latitude += (latitude.equals("")) ? res.getLatitude() : ","+ res.getLatitude();
list_nos += (list_nos.equals("")) ? res.getList_no() : ","+ res.getList_no();
list_prop_price += (list_prop_price.equals("")) ? res.getList_price() : ","+ res.getList_price();
statforarrS += (statforarrS.equals("")) ? res.getStatus() : ","+ res.getStatus();

strTmp="";
strTmp=res.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
}
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;

intTmp=res.getNo_rooms();
totRoom = intTmp;
propdet += (propdet.equals(""))? " Total Room : " + totRoom : " Total Room : " +totRoom;

intTemp=res.getNo_bedrooms();
bedRoom = intTemp;
propdet += (propdet.equals(""))? " BedRoom : " + bedRoom : " bedRoom : " +bedRoom + "<BR>";

strTmp = res.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(res.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = res.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = res.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = res.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}

}else if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_LAND)){

lnd = (Land)propObject;
strTemp = lnd.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? lnd.getLongitude() : ","+ lnd.getLongitude();
latitude += (latitude.equals("")) ? lnd.getLatitude() : ","+ lnd.getLatitude();
list_nos += (list_nos.equals("")) ? lnd.getList_no() : ","+ lnd.getList_no();
list_prop_price += (list_prop_price.equals("")) ? lnd.getList_price() : ","+ lnd.getList_price();
statforarrS += (statforarrS.equals("")) ? lnd.getStatus() : ","+ lnd.getStatus();

status="";
strTmp="";
strTmp=lnd.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
}
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;
dblTmp=lnd.getAcres();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot : " + acres : " Lot : " +acres + "<BR>" ;

strTmp = lnd.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(lnd.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ; strTmp = lnd.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = lnd.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = lnd.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}

}else{

comm = (Commercial)propObject;
strTemp = comm.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? comm.getLongitude() : ","+ comm.getLongitude();
latitude += (latitude.equals("")) ? comm.getLatitude() : ","+ comm.getLatitude();
list_nos += (list_nos.equals("")) ? comm.getList_no() : ","+ comm.getList_no();
list_prop_price += (list_prop_price.equals("")) ? comm.getList_price() : ","+ comm.getList_price();
statforarrS += (statforarrS.equals("")) ? comm.getStatus() : ","+ comm.getStatus();
status="";
strTmp="";
strTmp=comm.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
}
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;

dblTmp=comm.getLot_size();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot Size : " + acres : " Lot Size : " +acres ;

dublTmp=comm.getSquare_feet();
sq_feet = dublTmp;
propdet += (propdet.equals(""))? " Square Feet : " + sq_feet : " Square Feet : " +sq_feet + "<BR>";

strTmp = comm.getList_type();

if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(comm.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = comm.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = comm.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = comm.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}
}
}
}
}else if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_LAND)){
lnd = (Land)propObject;
strTemp = lnd.getZip_code();
selZip = (strTemp==null || strTemp.equals(""))?""Tongue TiedtrTemp;
list_no = lnd.getList_no();
strTmp=lnd.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " + status ;
}

dblTmp=lnd.getAcres();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot : " + acres : " Lot : " +acres + "<BR>";

strTmp = lnd.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
mainPropPrice=strTmp = String.valueOf(lnd.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = lnd.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = lnd.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = lnd.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
mainPropDet = propdet;

if(!selZip.equals("")){
for(int i=0;i<objarray.length;i++){

propdet ="";
propObject = (Property_Intf)objarrayIdea;
propType = propObject.getProp_type();
if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_RESIDENTIAL)){

res = (Residential)propObject;
strTemp = res.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? res.getLongitude() : ","+ res.getLongitude();
latitude += (latitude.equals("")) ? res.getLatitude() : ","+ res.getLatitude();
list_nos += (list_nos.equals("")) ? res.getList_no() : ","+ res.getList_no();
list_prop_price += (list_prop_price.equals("")) ? res.getList_price() : ","+ res.getList_price();
statforarrS += (statforarrS.equals("")) ? res.getStatus() : ","+ res.getStatus();

strTmp="";
strTmp=res.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
}
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;

intTmp=res.getNo_rooms();
totRoom = intTmp;
propdet += (propdet.equals(""))? " Total Room : " + totRoom : " Total Room : " +totRoom ;

intTemp=res.getNo_bedrooms();
bedRoom = intTemp;
propdet += (propdet.equals(""))? " BedRoom : " + bedRoom : " bedRoom : " +bedRoom + "<BR>" ;

strTmp = res.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(res.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = res.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = res.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = res.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}

}else if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_LAND)){

lnd = (Land)propObject;
strTemp = lnd.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? lnd.getLongitude() : ","+ lnd.getLongitude();
latitude += (latitude.equals("")) ? lnd.getLatitude() : ","+ lnd.getLatitude();
list_nos += (list_nos.equals("")) ? lnd.getList_no() : ","+ lnd.getList_no();
list_prop_price += (list_prop_price.equals("")) ? lnd.getList_price() : ","+ lnd.getList_price();
statforarrS += (statforarrS.equals("")) ? lnd.getStatus() : ","+ lnd.getStatus();

strTmp="";
strTmp=lnd.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
}
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;

dblTmp=lnd.getAcres();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot : " + acres : " Lot : " +acres + "<BR>" ;

strTmp = lnd.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(lnd.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = lnd.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = lnd.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = lnd.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}

}else{

comm = (Commercial)propObject;
strTemp = comm.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? comm.getLongitude() : ","+ comm.getLongitude();
latitude += (latitude.equals("")) ? comm.getLatitude() : ","+ comm.getLatitude();
list_nos += (list_nos.equals("")) ? comm.getList_no() : ","+ comm.getList_no();
list_prop_price += (list_prop_price.equals("")) ? comm.getList_price() : ","+ comm.getList_price();
statforarrS += (statforarrS.equals("")) ? comm.getStatus() : ","+ comm.getStatus();

strTmp="";
strTmp=comm.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
}
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;

dblTmp=comm.getLot_size();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot Size : " + acres : " Lot Size : " +acres ;

dublTmp=comm.getSquare_feet();
sq_feet = dublTmp;
propdet += (propdet.equals(""))? " Square Feet : " + sq_feet : " Square Feet : " +sq_feet + "<BR>" ;

strTmp = comm.getList_type();

if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(comm.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = comm.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = comm.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = comm.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}
}
}
}
}else {

comm = (Commercial)propObject;
strTemp = comm.getZip_code();
selZip = (strTemp==null || strTemp.equals(""))?""Tongue TiedtrTemp;
list_no = comm.getList_no();

strTmp=comm.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
// propdet += (propdet.equals(""))? " Status : " + status : " Status : " + status ;
}

dblTmp=comm.getLot_size();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot Size : " + acres : " Lot Size : " +acres ;

dublTmp=comm.getSquare_feet();
sq_feet = dublTmp;
propdet += (propdet.equals(""))? " Square Feet : " + sq_feet : " Square Feet : " +sq_feet + "<BR>" ;

strTmp = comm.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
mainPropPrice=strTmp = String.valueOf(comm.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = comm.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = comm.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = comm.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
mainPropDet = propdet;

if(!selZip.equals("")){
for(int i=0;i<objarray.length;i++){

propdet ="";
propObject = (Property_Intf)objarrayIdea;
propType = propObject.getProp_type();
if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_RESIDENTIAL)){

res = (Residential)propObject;
strTemp = res.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? res.getLongitude() : ","+ res.getLongitude();
latitude += (latitude.equals("")) ? res.getLatitude() : ","+ res.getLatitude();
list_nos += (list_nos.equals("")) ? res.getList_no() : ","+ res.getList_no();
list_prop_price += (list_prop_price.equals("")) ? res.getList_price() : ","+ res.getList_price();
statforarrS += (statforarrS.equals("")) ? res.getStatus() : ","+ res.getStatus();

strTmp=res.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;
}

intTmp=res.getNo_rooms();
totRoom = intTmp;
propdet += (propdet.equals(""))? " Total Room : " + totRoom : " Total Room : " +totRoom;

intTemp=res.getNo_bedrooms();
bedRoom = intTemp;
propdet += (propdet.equals(""))? " BedRoom : " + bedRoom : " bedRoom : " +bedRoom + "<BR>" ;

strTmp = res.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(res.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = res.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = res.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = res.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}

}else if(propType.equals(PropertyConstants.MAIN_PROP_TYPE_LAND)){

lnd = (Land)propObject;
strTemp = lnd.getZip_code();
if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? lnd.getLongitude() : ","+ lnd.getLongitude();
latitude += (latitude.equals("")) ? lnd.getLatitude() : ","+ lnd.getLatitude();
list_nos += (list_nos.equals("")) ? lnd.getList_no() : ","+ lnd.getList_no();
list_prop_price += (list_prop_price.equals("")) ? lnd.getList_price() : ","+ lnd.getList_price();
statforarrS += (statforarrS.equals("")) ? lnd.getStatus() : ","+ lnd.getStatus();

strTmp=lnd.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;
}

dblTmp=lnd.getAcres();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot : " + acres : " Lot : " +acres + "<BR>" ;

strTmp = lnd.getList_type();
if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(lnd.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = lnd.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = lnd.getCiti_name();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = lnd.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}

}else{

comm = (Commercial)propObject;
strTemp = comm.getZip_code();

if(index!=i && strTemp!=null && (!strTemp.equals("")) && (strTemp.equals(selZip))){

longitude += (longitude.equals("")) ? comm.getLongitude() : ","+ comm.getLongitude();
latitude += (latitude.equals("")) ? comm.getLatitude() : ","+ comm.getLatitude();
list_nos += (list_nos.equals("")) ? comm.getList_no() : ","+ comm.getList_no();
list_prop_price += (list_prop_price.equals("")) ? comm.getList_price() : ","+ comm.getList_price();
statforarrS += (statforarrS.equals("")) ? comm.getStatus() : ","+ comm.getStatus();

strTmp=comm.getStatus();
if(strTmp!=null || !strTmp.equals("")){
if(strTmp.equals("A"))
status="Active";
else if(strTmp.equals("S"))
status="Sold";
else if(strTmp.equals("U"))
status="Under Agreement";
else if(strTmp.equals("W"))
status="Withdrawn";
//propdet += (propdet.equals(""))? " Status : " + status : " Status : " +status;
}

dblTmp=comm.getLot_size();
acres = dblTmp;
propdet += (propdet.equals(""))? " Lot Size : " + acres : " Lot Size : " +acres ;

dublTmp=comm.getSquare_feet();
sq_feet = dublTmp;
propdet += (propdet.equals(""))? " Square Feet : " + sq_feet : " Square Feet : " +sq_feet + "<BR>" ;

strTmp = comm.getList_type();

if (strTmp != null)
propdet += (propdet.equals(""))? ResourceManager.getPropertyTypeDes(strTmp) : ResourceManager.getPropertyTypeDes(strTmp) ;
strTmp = String.valueOf(comm.getList_price());
if (strTmp != null)
propdet += (propdet.equals(""))? " Price : $" + strTmp : " Price : $" +strTmp ;
strTmp = comm.getAddress_street();
propdet = (strTmp != null) ? propdet : "";
strTmp = comm.getCiti_name();
if (strTmp != null)

propdet += (propdet.equals(""))? strTmp : "<BR>" +strTmp ;
strTmp = comm.getState_short();
if (strTmp != null)
propdet += (propdet.equals(""))? strTmp : "," +strTmp ;
propdet += (propdet.equals(""))? selZip : "," +selZip ;
propMsg += (propMsg.equals("")) ? propdet : "~"+ propdet;
}
}
}
}

}
}
%>
var Latitude = '<%=latitude%>';
var Longitude = '<%=longitude%>';
var PropDet = '<%=propMsg%>';
var mainPropDet = '<%=mainPropDet%>';
var list_nos = '<%=list_nos%>';
var list_no = '<%=list_no%>';
var list_pric= '<%=mainPropPrice%>';
var prop_list_pric= '<%=list_prop_price%>';
var prop_list_status= '<%=statforarrS%>';
arrLatitude = Latitude.split(",");
arrLongitude = Longitude.split(",");
arrPropDet = PropDet.split("~");
arrList_nos = list_nos.split(",");
arrProp_price = prop_list_pric.split(",");
arrStatus = prop_list_status.split(",");
</script>
</head>
<body onLoad="load()";>
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<link href="<%=Constants.URL_DESIGN%>/css/system/text.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="rowbk5">
<td width="5">&nbsp;</td>

<td height="20" class="arial12"><img src="<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_red.png"> Main Property | <img src="<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_green.png">Active | <img src="<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_orange.png"> Sold | <img src="<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_yellow.png"> Under Agreement | <img src="<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_blue.png"> Withdrawn </td>
</tr>
</table>
<!-- <body MS_POSITIONING="GridLayout"> -->
<div id="mymapcontroldiv" style="position:relative; width:500px; height:305px;"></div>
</body>

</html>
<script type="text/javascript">
var image="";
var image1="";
var map=null;
var newShape=null;

function load() {
map = new VEMap('mymapcontroldiv');
function getIcon(no){
var pin=0;
if(no==1){
var icon1 = "<div style='font-size:12px;font-weight:regular;borderTongue Tiedolid 2px Black;background-color:Aqua;width:75px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$&nbsp;";

var icon2 = "</div>";
var icon3 = "";
var infobox1 = "";
var point="";
try
{
for (var i = 0; i < arrLatitude.length; i++) {

if(arrStatusIdea == "A")
icon.image = "<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_green.png"; //for Active
else if(arrStatusIdea == "S" || arrStatusIdea == "Sold" )
icon.image = "<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_orange.png"; // for sold
else if(arrStatusIdea == "U")
icon.image = "<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_yellow.png"; // for under Agreement
else
icon.image = "<%=Constants.URL_DESIGN%>/images/map-icon/mm_20_blue.png"; // for With drawn

var pushpinforall = new VEPushpin(i,
new VELatLong(arrLatitudeIdea,arrLongitudeIdea),
image1,
"",
arrPropDetIdea
);
map.AddPushpin(pushpinforall);

var lat = parseFloat(arrLatitudeIdea);
var lng = parseFloat(arrLongitudeIdea);
point = new VELatLong(lat,lng);
newShape = new VEShape(VEShapeType.Pushpin,new VELatLong(lat,lng));
icon3 = icon1 + arrProp_priceIdea + icon2;
newShape.SetCustomIcon(icon3);
map.ClearInfoBoxStyles();
newShape.SetTitle("");
newShape.SetDescription(arrPropDetIdea);
map.AddShape(newShape);
}
}catch(exception){
if (exception.description == null)
{
alert("Error " + exception.message)
}
else
{
alert("Error is " + exception.description);
}
}

}
else{
image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; // Main property
var pushpin = new VEPushpin('0a',
new VELatLong(<%=request.getParameter("latitude").toString()%>,<%=request.getParameter("longitude").toString()%>),
image,
"",
mainPropDet
);

map.AddPushpin(pushpin);
var icon = "<div style='font-size:12px;font-weight:regular;borderTongue Tiedolid 2px Black;background-color:Aqua;width:75px'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$&nbsp;<%=mainPropPrice%></div>";
var infobox = mainPropDet;
var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(<%=request.getParameter("latitude").toString()%>, <%=request.getParameter("longitude").toString()%>));
shape.SetCustomIcon(icon);
map.ClearInfoBoxStyles();
shape.SetTitle("");
shape.SetDescription(infobox);
map.AddShape(shape);

}
}
map.LoadMap(new VELatLong(<%=request.getParameter("latitude").toString()%>, <%=request.getParameter("longitude").toString()%>),
10,
'r',
false);
getIcon(2);
if(arrLatitude.length > 1)
getIcon(1);
}

</script>

Code Snippet

Hi! at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 5

giv me reply soon!
Hi! at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 6

Hello,

1. I can't test JSP pages. Maybe you can provide a plain html example.

2. You wrote that your map "goes to upper left corner and zoom level is automatically increases" . This description remembers me of a similar case. Read this topic carefully and see if that will help you.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1774471&SiteID=1

AlexandruMatei at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 7
Actually I am using IFrame in Yahoo tab feature in JavaScript and I am placing source in dataSrc attribute of Yahoo tab.
can any one help me out of this situation? So that I may able to display in yahoo tab for repeated request?

Thx

Hi! at 2007-9-28 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...

Windows Live Developer Forums

Site Classified