We are using ESRI ArcGIS JavaScript API in one of our Mobile web app. When map is loaded first time, Onload event is fired. But when we change orientation from Portrait to Landscape, OnLoad event does not fired. We need such event so that when map is completely loaded in Landscape mode we can perform some opearion. We know that there is Orientation change event in javascript but we need event which should fire when Map is loaded completely in Landscape mode after orientation change event is fired?
Is there any Map event fired when map is loaded completely when we device is oriented from portrait to landscape mode?
1.2k Views Asked by Harshanand Wankhede At
2
There are 2 best solutions below
0
Juffy
On
I think you may need a combination of two events:
- The javascript
orientationchangeevent, and - The ArcGIS API map's
update-endevent.
In the handler for the orientationchange event, set a flag variable to indicate that you're waiting for the end of an update. The handler for update-end checks the flag to see if you've just changed orientation, does whatever magic you're trying to do, then unsets the flag.
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in ARCGIS
- Add Google map or bing as base layer in ArcGIS api for android
- Load local KML file using ArcGIS api for android
- GRIB2 weather data into ArcGIS
- How to makeIdentify Task in ArcGIS API for android work with a standard WMS
- EsriSecurityException while Utilizing Client's Map services
- dojo.require statement is not loading esri Map module as expected
- ArcGIS - FME coordinate rounding difference
- Using OR operator in NumPy Array to Append multiple items
- ArcGIS / Esri Custom Theme not showing in appbuilder
- Python: How to loop through several ini files with ConfigParser?
- Resource interpreted as Script but transferred with MIME type text/plain using arcgis api for javascript
- VB Collection Conversion to c# LinkedList
- How to get current Location in ArcGis map In android using Imagery Map server
- After insert auto increment trigger
- File not found exception when using ShapefileFeatureTable with ArcGIS on Android
Related Questions in ESRI
- Read geometries from ESRI shapefile 'one-by-one'
- dojo.require statement is not loading esri Map module as expected
- ArcGIS - FME coordinate rounding difference
- ArcGIS / Esri Custom Theme not showing in appbuilder
- Convert ESRI Shapefile to (lat, long) points for each region
- Proper format to request sde.st_intersects with a Well Known Binary input from C#
- Unable to read from "/vsimem/" using vtkGDALVectorReader
- How to convert ESRI shapefile format using QGIS or python gdal library to extract lat lon
- Problems changing value of a text element in Esri Arcmap
- Generate convex hull from points
- @types 404 not found angular2
- COMException Out Of Server Memory
- ARCGIS Runtime for .NET: Why am I getting System.ArgumentException 'An item with the same key has already been added'?
- Arcgis without WPF
- ArcGis Query Task never returns a result
Related Questions in ARCGIS-JS-API
- How can I return the value of a deferred method in javascript
- dojo.require statement is not loading esri Map module as expected
- ArcGIS / Esri Custom Theme not showing in appbuilder
- How do I access $NAME variable in a if else statement?
- Adding html item to infoWindow - ArcGIS Javascript API 3.18
- Need to create a UI5 custom control which need some other AMD modules
- Show the attribute inspector without saving a new feature
- How to draw routes on arcgis map using javascript API?
- How do I combine TextSymbol and a picture marker symbol in ArcGIS for javascript API
- ArcGIS JS API SetOpacity not working in IE8
- feature layers don't appear in the print result
- Esri JS Bookmark in separate Div
- Type error: Undefined is not a function (esri map)
- ArcGIS Javascript API - How to add multiple states to existing map?
- ESRI Map is not centered properly when orientation changes from Portrait to Landscape mode
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This StackOverflow post might already answer your question:
How do I correctly detect orientation change using javascript and Phonegap in IOS?
There is also this blog post:
http://jbkflex.wordpress.com/2011/12/06/429/
Basically: