[Google Maps] ESRI Map

[Google Maps] ESRI Map

  
Forge Component
(20)
Published on 9 Mar by Steve Collins
20 votes
Published on 9 Mar by Steve Collins

Hi,

Has anyone done any integration with ESRI ArcGIS maps? Any insight will be really helpful.

Thanks!

Arvinder

Hi Arvinder,

From what I know, integration with ArcGIS maps is a matter of adding some custom html, javascript and CSS to a web page. The simplest way to do that would be to add that code to an xy Expression and set the Escape Content property to No. 

If you can not make it to work, can you share a sample oml with what you are trying to do? Or share the code that you have to insert on a page?

Cheers,

José

Hi Jose,

Thanks for helping . I am attaching the .oml file. It is just a simple screen and I added a container div. I added the css and script but it doesnt seem to work. 

below is the sample html for reference:

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Simple Map</title>
    <link rel="stylesheet" href="https://js.arcgis.com/3.22/esri/css/esri.css">
    <style>
      html, body, #map {
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
    <script src="https://js.arcgis.com/3.22/"></script>
    <script>
      var map;

      require(["esri/map", "dojo/domReady!"], function(Map) {
        map = new Map("map", {
          basemap: "topo", 
          center: [-122.45, 37.75], // longitude, latitude
          zoom: 13
        });
      });
    </script>
  </head>

  <body>
    <div id="map"></div>
  </body>
</html>
Solution

Hi Arvinder,

You were missing the external css and js scripts.

Check the attached oml.

Cheers,

José

Solution

Thanks for your help Jose.