schlot

Mobile example: issues with featurelayer, map load events

Discussion created by schlot on Mar 5, 2014
Latest reply on Mar 6, 2014 by schlot
I'm expanding on a basic mobile example, trying to add a featurelayer of my own data and  list of fish advisories (how many of what kinds of fish it's safe to eat from a river). It opens with a choice of viewing a list or a map.  From the list, the user should be able to click the map button to zoom into that river.

When viewing the map first, it is extremely cropped on the sides,and doesn't initially load my featurelayer, which generates errors (unable to draw graphic). There is a map load event that is supposed to manage the screen resolution and set the display.  I've tried commenting the line that fires that map on load event, but it is still cropped. 

If I start with the list, the first time I click the map button, it doesn't draw, giving errors on the featurelayer.  But subsequent selections do show the featurelayer and its zoomed to the correct river.  Obviously events are not firing/responding in the order I expect to see them.  I have no clue why my map is only showing for a few seconds before it disappears.

I still haven't figured out how to post my code anywhere for people to view and edit it for me.  That's a whole other thread to post!

Update:  Here's my first attempt at using JSFiddle.  At least this made me try again to use it!

http://jsfiddle.net/schlot/7t8Lu/1/

Outcomes