Preload Map in Angular Ionic?

1542
0
08-07-2016 10:09 PM
DanielPascual
New Contributor II

I'm working on an Angular, Ionic, ESRI application that shows EV charge stations on a map. I have a view that displays the map with feature layer of charge stations. I have another view that displays a list of charge stations pulled from the graphics property of the feature layer.

My problem is that the list of charge stations is empty until the map view loads, because that's when the feature layer loads (using angular-esri directives). If I select the menu item to load the map view first, then navigate to the view that displays the charge station list, the list values are available and everything displays fine.

How can I preload the map and feature layer perhaps on application start? Or what other ways can I load the data?

If I can't figure it out, I have a workaround, which is to make a separate request out to the REST API feature service to get the values, but I don't want to make that extra call since the data is available when the map is loaded.

Thanks in advance!

0 Replies