<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ionic popup going outside map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ionic-popup-going-outside-map/m-p/556269#M51890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am using Esri Map an Ionic Mobile app&lt;/P&gt;&lt;P&gt;Referred :&amp;nbsp;&lt;A class="link-titled" href="https://stackblitz.com/edit/esri-popup" title="https://stackblitz.com/edit/esri-popup"&gt;esri-popup - StackBlitz&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case of Angular Web App popup works fine, opens at the place clicked on Map. But in case of Ionic App, it opens popup outside the map.&lt;/P&gt;&lt;P&gt;Please help to figure out the issue with popup position in Ionic App.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;Code:&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;tab1.page.html&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;lt;ion-content&amp;nbsp;padding&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;lt;div&amp;nbsp;id="map"&amp;nbsp;#map&amp;nbsp;style="border:&amp;nbsp;solid&amp;nbsp;red;&amp;nbsp;width:&amp;nbsp;50%;&amp;nbsp;height:&amp;nbsp;60%;"&amp;nbsp;&amp;gt;&amp;lt;/div&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;lt;/ion-content&amp;gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';&lt;/P&gt;&lt;P&gt;import { Platform } from '@ionic/angular';&lt;/P&gt;&lt;P&gt;import { loadModules } from 'esri-loader';&lt;/P&gt;&lt;P&gt;@Component({&lt;BR /&gt; selector: 'app-tab1',&lt;BR /&gt; templateUrl: 'tab1.page.html',&lt;BR /&gt; styleUrls: ['tab1.page.scss']&lt;BR /&gt;})&lt;BR /&gt;export class Tab1Page implements OnInit{&lt;/P&gt;&lt;P&gt;@ViewChild('map') mapEl: ElementRef;&lt;BR /&gt; projects: any;&lt;BR /&gt; map: any;&lt;BR /&gt; mapView:any;&lt;/P&gt;&lt;P&gt;constructor( public platform: Platform) {&lt;BR /&gt; this.projects = [{ "projectId": "Project 0", "projectName": "Project 0", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 1", "projectName": "Project 1", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 2", "projectName": "Project 2", "categoryName": "Project Cat", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 3", "projectName": "Consultancy", "categoryName": "Project Cons", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 4", "projectName": "Consultancy", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 5", "projectName": "Consultancy", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 }];&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;async getGeo() {&lt;/P&gt;&lt;P&gt;// Reference: https://ionicframework.com/docs/api/platform/Platform/#ready&lt;BR /&gt; await this.platform.ready();&lt;/P&gt;&lt;P&gt;// Load the ArcGIS API for JavaScript modules&lt;BR /&gt; const [Map, MapView]:any = await loadModules([&lt;BR /&gt; 'esri/Map',&lt;BR /&gt; 'esri/views/MapView'&lt;BR /&gt; ])&lt;BR /&gt; .catch(err =&amp;gt; {&lt;BR /&gt; console.error('ArcGIS: ', err);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log('Starting up ArcGIS map');&lt;/P&gt;&lt;P&gt;this.map = new Map({&lt;BR /&gt; basemap: 'streets'&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Inflate and display the map&lt;BR /&gt; this.mapView = new MapView({&lt;BR /&gt; // create the map view at the DOM element in this component&lt;BR /&gt; container: this.mapEl.nativeElement,&lt;BR /&gt; center: [54.076542200, 24.093884800], // "latitude": 24.093884800, "longitude": 54.076542200&lt;BR /&gt; zoom: 12,&lt;BR /&gt; map: this.map&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Popup Approach #1&lt;BR /&gt; // this.mapView.popup.autoOpenEnabled = false;&lt;BR /&gt; // this.mapView.on("click", (event) =&amp;gt; {&lt;BR /&gt; // this.mapView.popup.open({&lt;BR /&gt; // // Set the popup&lt;BR /&gt; // location: event.mapPoint, // location of the click on the view&lt;BR /&gt; // title: "You clicked here", // title displayed in the popup&lt;BR /&gt; // content: "This is a point of interest" // content displayed in the popup&lt;BR /&gt; // });&lt;BR /&gt; // });&lt;/P&gt;&lt;P&gt;// Popup Approach #2&lt;BR /&gt; /////////////////////////////////&lt;BR /&gt; this.mapView.on("click", (event) =&amp;gt; {&lt;BR /&gt; console.log('clicked');&lt;BR /&gt; event.stopPropagation();&lt;/P&gt;&lt;P&gt;// Get the coordinates of the click on the view&lt;BR /&gt; var lat = Math.round(event.mapPoint.latitude * 1000) / 1000;&lt;BR /&gt; var lon = Math.round(event.mapPoint.longitude * 1000) / 1000;&lt;/P&gt;&lt;P&gt;this.mapView.popup.open({&lt;BR /&gt; // Set the popup's title to the coordinates of the location&lt;BR /&gt; title: "Reverse geocode: [" + lon + ", " + lat + "]",&lt;BR /&gt; location: event.mapPoint &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log(this.mapView.popup.title);&lt;BR /&gt; this.mapView.popup.content = "This is the content";&lt;BR /&gt; this.mapView.popup.title = "This is the title";&lt;BR /&gt; console.log(this.mapView.popup.title);&lt;BR /&gt; });&lt;BR /&gt; //////////////////////////////////&lt;/P&gt;&lt;P&gt;this.projects.forEach( (item) =&amp;gt; {&lt;BR /&gt; // playStore.push(item)&lt;BR /&gt; this.mapView.graphics.add({&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-marker",&lt;BR /&gt; color: "#"+ Math.floor(Math.random() * 16777215).toString(16)&lt;BR /&gt; },&lt;BR /&gt; geometry: {&lt;BR /&gt; type: "point",&lt;BR /&gt; longitude: item.longitude, // 73.0188,&lt;BR /&gt; latitude: item.latitude // 26.2979&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;ngOnInit() {&lt;BR /&gt; // this.getGeo();&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2020 17:11:20 GMT</pubDate>
    <dc:creator>GauravArora</dc:creator>
    <dc:date>2020-08-24T17:11:20Z</dc:date>
    <item>
      <title>ionic popup going outside map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ionic-popup-going-outside-map/m-p/556269#M51890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am using Esri Map an Ionic Mobile app&lt;/P&gt;&lt;P&gt;Referred :&amp;nbsp;&lt;A class="link-titled" href="https://stackblitz.com/edit/esri-popup" title="https://stackblitz.com/edit/esri-popup"&gt;esri-popup - StackBlitz&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case of Angular Web App popup works fine, opens at the place clicked on Map. But in case of Ionic App, it opens popup outside the map.&lt;/P&gt;&lt;P&gt;Please help to figure out the issue with popup position in Ionic App.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;Code:&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;tab1.page.html&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;lt;ion-content&amp;nbsp;padding&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;lt;div&amp;nbsp;id="map"&amp;nbsp;#map&amp;nbsp;style="border:&amp;nbsp;solid&amp;nbsp;red;&amp;nbsp;width:&amp;nbsp;50%;&amp;nbsp;height:&amp;nbsp;60%;"&amp;nbsp;&amp;gt;&amp;lt;/div&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;lt;/ion-content&amp;gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';&lt;/P&gt;&lt;P&gt;import { Platform } from '@ionic/angular';&lt;/P&gt;&lt;P&gt;import { loadModules } from 'esri-loader';&lt;/P&gt;&lt;P&gt;@Component({&lt;BR /&gt; selector: 'app-tab1',&lt;BR /&gt; templateUrl: 'tab1.page.html',&lt;BR /&gt; styleUrls: ['tab1.page.scss']&lt;BR /&gt;})&lt;BR /&gt;export class Tab1Page implements OnInit{&lt;/P&gt;&lt;P&gt;@ViewChild('map') mapEl: ElementRef;&lt;BR /&gt; projects: any;&lt;BR /&gt; map: any;&lt;BR /&gt; mapView:any;&lt;/P&gt;&lt;P&gt;constructor( public platform: Platform) {&lt;BR /&gt; this.projects = [{ "projectId": "Project 0", "projectName": "Project 0", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 1", "projectName": "Project 1", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 2", "projectName": "Project 2", "categoryName": "Project Cat", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 3", "projectName": "Consultancy", "categoryName": "Project Cons", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 4", "projectName": "Consultancy", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 },&lt;BR /&gt; { "projectId": "Project 5", "projectName": "Consultancy", "categoryName": "Project", "status": "Assigned", "latitude": 24.093884800, "longitude": 54.076542200 }];&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;async getGeo() {&lt;/P&gt;&lt;P&gt;// Reference: https://ionicframework.com/docs/api/platform/Platform/#ready&lt;BR /&gt; await this.platform.ready();&lt;/P&gt;&lt;P&gt;// Load the ArcGIS API for JavaScript modules&lt;BR /&gt; const [Map, MapView]:any = await loadModules([&lt;BR /&gt; 'esri/Map',&lt;BR /&gt; 'esri/views/MapView'&lt;BR /&gt; ])&lt;BR /&gt; .catch(err =&amp;gt; {&lt;BR /&gt; console.error('ArcGIS: ', err);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log('Starting up ArcGIS map');&lt;/P&gt;&lt;P&gt;this.map = new Map({&lt;BR /&gt; basemap: 'streets'&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Inflate and display the map&lt;BR /&gt; this.mapView = new MapView({&lt;BR /&gt; // create the map view at the DOM element in this component&lt;BR /&gt; container: this.mapEl.nativeElement,&lt;BR /&gt; center: [54.076542200, 24.093884800], // "latitude": 24.093884800, "longitude": 54.076542200&lt;BR /&gt; zoom: 12,&lt;BR /&gt; map: this.map&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Popup Approach #1&lt;BR /&gt; // this.mapView.popup.autoOpenEnabled = false;&lt;BR /&gt; // this.mapView.on("click", (event) =&amp;gt; {&lt;BR /&gt; // this.mapView.popup.open({&lt;BR /&gt; // // Set the popup&lt;BR /&gt; // location: event.mapPoint, // location of the click on the view&lt;BR /&gt; // title: "You clicked here", // title displayed in the popup&lt;BR /&gt; // content: "This is a point of interest" // content displayed in the popup&lt;BR /&gt; // });&lt;BR /&gt; // });&lt;/P&gt;&lt;P&gt;// Popup Approach #2&lt;BR /&gt; /////////////////////////////////&lt;BR /&gt; this.mapView.on("click", (event) =&amp;gt; {&lt;BR /&gt; console.log('clicked');&lt;BR /&gt; event.stopPropagation();&lt;/P&gt;&lt;P&gt;// Get the coordinates of the click on the view&lt;BR /&gt; var lat = Math.round(event.mapPoint.latitude * 1000) / 1000;&lt;BR /&gt; var lon = Math.round(event.mapPoint.longitude * 1000) / 1000;&lt;/P&gt;&lt;P&gt;this.mapView.popup.open({&lt;BR /&gt; // Set the popup's title to the coordinates of the location&lt;BR /&gt; title: "Reverse geocode: [" + lon + ", " + lat + "]",&lt;BR /&gt; location: event.mapPoint &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log(this.mapView.popup.title);&lt;BR /&gt; this.mapView.popup.content = "This is the content";&lt;BR /&gt; this.mapView.popup.title = "This is the title";&lt;BR /&gt; console.log(this.mapView.popup.title);&lt;BR /&gt; });&lt;BR /&gt; //////////////////////////////////&lt;/P&gt;&lt;P&gt;this.projects.forEach( (item) =&amp;gt; {&lt;BR /&gt; // playStore.push(item)&lt;BR /&gt; this.mapView.graphics.add({&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-marker",&lt;BR /&gt; color: "#"+ Math.floor(Math.random() * 16777215).toString(16)&lt;BR /&gt; },&lt;BR /&gt; geometry: {&lt;BR /&gt; type: "point",&lt;BR /&gt; longitude: item.longitude, // 73.0188,&lt;BR /&gt; latitude: item.latitude // 26.2979&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;ngOnInit() {&lt;BR /&gt; // this.getGeo();&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2020 17:11:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ionic-popup-going-outside-map/m-p/556269#M51890</guid>
      <dc:creator>GauravArora</dc:creator>
      <dc:date>2020-08-24T17:11:20Z</dc:date>
    </item>
  </channel>
</rss>

