Build map , call service to update data , return - map is 'lost'....
i've been working for over 8 hours on this problem and time to call in the experts.
In my app, on a UI where I have a map, and I am dropping markers based on user input, the app:
Creates a map and drops markers based on data in a db (works great)
Prompts the user if s.he would like to add new markers, if so - gathers input, drops a new marker, and updates the DB for the new marker. I use a rest service to udpate the DB.
After calling the rest-service - exactly between the Javascript I run before the service executes mappings and updates the DB - and running the success event on the way back - my 'map' loses it's mind (the center moves to somewhere out in the Indian ocean (not desired lol) - and turns black (since there is no data for zoom 17 where it(the map) lands).....i've tried dealing with the after effects and just resetting the map center - still no luck.
if I take out the call to the data service - life is good and the map stays fine. I'm gathering data in a popup - writing the marker on the map, and then calling the rest service to update the data.
It appears that the framework has code in the event to update the DB that tries to show-hide my controls.... from the interpreted code in my debugger I see:
Apperyio.CurrentScreen = 'page_holedetail';
_.chain(Apperyio.mappings).filter(function(m) {
return m.homeScreen === Apperyio.CurrentScreen;
}).each(Apperyio.UIHandler.hideTemplateComponents);Is this or some other event causing my ill-desired behavior? if so - how do I work around it? I've tried changing the timing of this event , waiting till my popup closes and writing the data - the result is the same - calling a rest service to udpate data when my map is showing - causes this 'blackout' effect.
Best,
Bruce