Esri Map v3.9 and Websphere Portal v8

480
2
06-16-2014 03:53 AM
AsifPalimar
New Contributor
I am a newbie to Esri Maps.

Can somebody provide me a sample map code which will run in WebSphere Portal v8. The issue which I am facing is currently Websphere Portal is using dojo 1.7 and it gets loaded first and the esri map uses dojo v 1.9 and hence it is not able to find the required libraries as it search within the dojo v1.7.

I tried using the link suggesting custom dojo by copying the contents in the portlet jsp. But i didnt worked. If somebody can provide me a working snippet html code which if i can copy it in the portlet jsp and test in the WebSphere Portal server That will be really much appreciated.

Regards,
Asif
0 Kudos
2 Replies
F__DeWayneLane
New Contributor
This is from Portal V7, but it may help.

We have a check in our head.jsp that checks to see if it is an ESRI page.  If so, we're pulling in ESRI's dojo, otherwise, we're pulling in Portal's.

Hope that helps.

DeWayne


<c:choose>
 <c:when test='${(currentNavNode.metadata["esriPage"] == "true")}'>
  <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css">
  <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/Grid.css">
  <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/grid/resources/claroGrid.css">
  <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/dijit/css/InfoWindow.css">
  <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dojox/widget/Dialog/Dialog.css">

<%--  <link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/esri/css/esri.css">  --%>

  <%-- link the  customStyles.css for the page --%>
  <link rel="stylesheet" type="text/css" href="<%=(String)pageContext.getAttribute("themeWebAppBaseURI", PageContext.REQUEST_SCOPE)%>/css/customStyles${localEnvironment}.css" />

  <!-- Dojo JS Files -->
  <script type="text/javascript">
   djConfig = {
    isDebug: false,
    locale: 'en',
    dojoIframeHistoryUrl: '<%=(String)pageContext.getAttribute("themeWebAppBaseURI", PageContext.REQUEST_SCOPE)%>/fromDojo/iframe_history.html'
   };
  </script>
<%-- <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8compact"></script>  --%>
  <script type="text/javascript" src="https://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8"></script>
 </c:when>
 <c:otherwise>
  <%-- link the dojo stylesheets for the page --%>
  <link rel="stylesheet" type="text/css" href="${dojoRoot}/dojo/resources/dojo.css">
  <link rel="stylesheet" type="text/css" href="${dojoRoot}/dijit/themes/claro/claro.css">
  <link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/grid/resources/Grid.css">
  <link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/grid/resources/claroGrid.css">
  <link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/grid/enhanced/resources/claro/EnhancedGrid.css">
  <link rel="stylesheet" type="text/css" href="${dojoRoot}/dojox/widget/Portlet/Portlet.css">

  <%-- link the core portal stylesheet (we use parts related to the search center) --%>
  <link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/base/core.css"/>
  <link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/defaultTheme/defaultTheme.css"/>
  <link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/base/dojo.css"/>
  <link rel="stylesheet" type="text/css" href="https://community.esri.com/PortalTheme/themes/html/css/defaultTheme/dojoTheme.css"/>
  <link rel="stylesheet" type="text/css" href="https://community.esri.com/wps/search/css/searchWidgets.css" />

  <%-- link the  customStyles.css for the page --%>
  <link rel="stylesheet" type="text/css" href="<%=(String)pageContext.getAttribute("themeWebAppBaseURI", PageContext.REQUEST_SCOPE)%>/css/customStyles${localEnvironment}.css" />

  <!-- Dojo JS Files -->
  <script type="text/javascript">
   var djConfig = {
    parseOnLoad: false,
    locale: 'en',
    modulePaths : { "ibm"   : "/portal_dojo/ibm", 
        "com"   : "/portal_dojo/com"
         }
   };
  </script>
  <script type="text/javascript" src="${dojoRoot}/dojo/dojo.js" ></script>
  <!-- <script type="text/javascript" src="/portal_dojo/v1.6/dojo/dojo.js" ></script> -->
 </c:otherwise>
</c:choose>

0 Kudos
AsifPalimar
New Contributor
Hi,

Will it possible to share a sample map example created using v3.2 esri api as I beliver that uses Dojo 1.7 same as that of Websphere Portal Dojo. I looked in the net but couldnt find a example for the same.

Regards,
Asif Palimar
0 Kudos