Hi!


Hi friends,
I am facing a problem that full map is not viewable in second time. Only a part of map is seen. When I delete cookies,temp internet files. Then it is visible.
Or, when I am making changes in my JSP in which I have implemented Map, it is showing complete map.

Plz suggest me solution.






Re: I am unable to view complete map in second time

Derrick


Could you post the code you're using to load the map. Thanks.




Re: I am unable to view complete map in second time

Hi!

/*Here is a code sample*/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></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();
var arrProp_price = new Array();
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%>';
arrLatitude = Latitude.split(",");
arrLongitude = Longitude.split(",");
arrPropDet = PropDet.split("~");
arrList_nos = list_nos.split(",");
arrProp_price = prop_list_pric.split(",");
</script>
</head>
<body onLoad="load()";>

<div id="mymapcontroldiv" style="position:relative; width:500px; height:304px;"></div>
</div>
</body>
</html>
<script type="text/javascript">

var image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
var image1 = "http://labs.google.com/ridefinder/images/mm_20_green.png";

var map=null;
var newShape=null;


function load() {

map = new VEMap('mymapcontroldiv');

function getIcon(no)
{

if(no==1){
for (var i = 0; i < arrLatitude.length; i++) {
var pushpinforall = new VEPushpin(i,
new VELatLong(arrLatitudeIdea,arrLongitudeIdea),
image1,
arrList_nos Idea,
arrPropDetIdea
);
map.AddPushpin(pushpinforall);
}

else{
var pushpin = new VEPushpin('0a',
new VELatLong(<%=request.getParameter("latitude").toString()%>,<%=request.getParameter("longitude").toString()%>),
image,
list_no,
mainPropDet
);
map.AddPushpin(pushpin);
}
}

map.LoadMap(new VELatLong(<%=request.getParameter("latitude").toString()%>, <%=request.getParameter("longitude").toString()%>),
10,
VEMapStyle.Road,
false);
map.SetCenter(new VELatLong(<%=request.getParameter("latitude").toString()%>, <%=request.getParameter("longitude").toString()%>));
getIcon(2);
if(arrLatitude.length > 1) {
getIcon(1);
}
}
</script>





Re: I am unable to view complete map in second time

Derek Chan

Okay, I've fixed up your code and removed some out (since there's some asp.net <%= script blocks) so the map will generate properly. It's best just to cross reference this with your original code and add things as you need.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></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();
var arrProp_price = new Array();
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%>';
arrLatitude = Latitude.split(",");
arrLongitude = Longitude.split(",");
arrPropDet = PropDet.split("~");
arrList_nos = list_nos.split(",");
arrProp_price = prop_list_pric.split(",");
</script>
<script type="text/javascript">

var image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
var image1 = "http://labs.google.com/ridefinder/images/mm_20_green.png";

var map=null;
var newShape=null;


function load() {

map = new VEMap('mymapcontroldiv');
map.LoadMap();
}
function getIcon(no)
{

if(no==1){
for (var i = 0; i < arrLatitude.length; i++) {
var pushpinforall = new VEPushpin(i,
new VELatLong(arrLatitude,arrLongitude),
image1,
arrList_nos ,
arrPropDet
);
map.AddPushpin(pushpinforall);
}
}
else{
}
}
</script>
</head>
<body onLoad="load()">

<div id="mymapcontroldiv" style="position:relative; width:500px; height:304px;"></div>
</div>
</body>
</html>



Hope that helps,






Re: I am unable to view complete map in second time

Hi!

I think U hav missed else block.
I am again posting my whole code It is not working now.

<!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>
</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")
image1 = "http://labs.google.com/ridefinder/images/mm_20_green.png"; //for Active
else if(arrStatusIdea == "S" || arrStatusIdea == "Sold" )
image1 = "http://labs.google.com/ridefinder/images/mm_20_orange.png"; // for sold
else if(arrStatusIdea == "U")
image1 = "http://labs.google.com/ridefinder/images/mm_20_yellow.png"; // for under Agreement
else
image1 = "http://labs.google.com/ridefinder/images/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);

}
}
var latt=<%=request.getParameter("latitude")%>;
var longi=<%=request.getParameter("longitude")%>;
alert("latitude= " + latt + " Longitude= " + longi);
map.LoadMap(new VELatLong(parseFloat(latt), parseFloat(longi)),
10,
VEMapStyle.Road,
false);
map.SetCenter(new VELatLong(parseFloat(latt), parseFloat(longi)));
getIcon(2);
if(arrLatitude.length > 1) {
getIcon(1);
}
}

</script>







Re: I am unable to view complete map in second time

Hi!

Actually I am using IFrame in Yahoo tab feature using JavaScript and I am placing file in dataSrc attribute of Yahoo tab.
can any one help me in getting out of this situation

Thx