%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
/******************************************************************************
* Copyright (c) 2000-2004 e-Deal
*
* e-Deal S.A.
* 55 rue Brillat Savarin
* 75013 Paris
* France
*
* T: +33 (0)1 53 80 80 30
* F: +33 (0)1 73 01 69 77
* http://www.e-deal.com
*
* La diffusion de ce code source sous quelque forme que ce soit sans
* l'autorisation de E-DEAL est interdite.
*
* Vous êtes autorisés à modifier ce code source uniquement pour votre usage
* propre et sous réserve que les mentions de copyright demeurent intactes.
*
* Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
* implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
* responsable des dommages pouvant résulter de l'utilisation de ce code
* source.
*
*
******************************************************************************/
%><%@page session="true" import="com.edeal.frontline.*,java.util.*,java.net.*,java.io.*"%>
<%@ page import="com.edeal.frontline.helper.BasicHelper"%>
<%@ page import="com.edeal.frontline.helper.custom.ActorHelper"%>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %>
<%
final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass());
String contextPath = (String) session.getAttribute("contextPath");
FlContext context = null;
if (contextPath!=null) {
context = Frontline.getContext(contextPath);
} else {
context = Frontline.getContext(request.getContextPath());
}
DataDictionary dico = context.getDataDictionary();
String id = (String) request.getParameter("id");
String latitude =(String) request.getParameter("latitude");
String longitude=(String) request.getParameter("longitude");
EnterpriseBean entBean = new EnterpriseBean(id,context);
String add1=null;
String add2=null;
String add3=null;
String zip=null;
String country=null;
String countryStr=null;
try {
add1 = entBean.getEntAd1();
}catch (FieldNotInitializedException e){}
try {
add2 = entBean.getEntAd2();
}catch (FieldNotInitializedException e){}
try {
add3 = entBean.getEntAd3();
}catch (FieldNotInitializedException e){}
try {
zip = entBean.getEntZip();
}catch (FieldNotInitializedException e){}
try {
country = entBean.getEntCtrID();
countryStr=(String) dico.getRefDisp("EntCtrID", country);
}catch (FieldNotInitializedException e){}
float latitudeF=Float.parseFloat(latitude);
float longitudeF=Float.parseFloat(longitude);
float latitudeS=0;
try {
latitudeS =entBean.getEntLa();
} catch (FieldNotInitializedException e){}
float longitudeS=0;
try {
longitudeS =entBean.getEntLa();
} catch (FieldNotInitializedException e){}
if (latitudeS==0 && longitudeS==0){
try {
entBean.setEntLa(latitudeF);
entBean.setEntLo(longitudeF);
entBean.save();
} catch(AccessDeniedException e){}
}
String address="";
if (add1 != null)
{
address+=add1+" ";
}
if (add2 != null)
{
address+=add2+" ";
}
if (add3 != null)
{
address+=add3+" ";
}
if (zip != null)
{
address+=zip+" ";
}
if (countryStr != null)
{
address+=countryStr;
}
String entAcronym = "";
try{
entAcronym = entBean.getEntAcronym();
}catch(FieldNotInitializedException e){}
String entCorpName = "";
try{
entCorpName = entBean.getEntCorpName();
}catch(FieldNotInitializedException e){}
int entTurnOver = 0;
try{
entTurnOver = entBean.getEntTurnOver();
}catch(FieldNotInitializedException e){}
String entPosID = "";
try{
entPosID = entBean.getEntPosID();
}catch(FieldNotInitializedException e){}
String entPosition = (String)dico.getRefDisp(session,"entPosID", entPosID);
String key=(String) context.getContextParameter("GoogleMapKey");
String html = (Utils.isEmpty(entAcronym)) ? entCorpName : entAcronym;
String currency = BasicHelper.getContextParameter(context, "Grid.Currency", "€");
html += (!Utils.isEmpty(address)) ? "
" + address : "";
html += (entTurnOver > 0) ? "
" + entTurnOver + " " + currency : "";
html += (!Utils.isEmpty(entPosition)) ? "
" + entPosition : "";
html = Utils.formatToJavascript(html);
ActorBean actor = ActorHelper.getSessionActor(session);
ActorHelper actorHelper = new ActorHelper(actor);
String actorAddress = actorHelper.getActorAddress();
%>
Google Maps Multi-Point Routing
">
<%
/******************************************************************************
* CVS Log File - This is no longer maintained!
*
* Revision 1.1 2004/07/23 17:52:10 brian
* Initial Revision
*
*****************************************************************************/
%>