A followup: I am still not sure exactly what was/is going on with this issue, but I have come up with a perfectly fine and totally obvious workaround -- setting the map zoom level after defining map zoom handler. As I said before, I've had things set up such that the RPC is made within the click handler. The problem I described in the last message had to do with attempting to do the RPC directly within onModuleLoad as opposed to through the handler.
Initially, I had placed my call to MapWidget.setZoomLevel() before defining the click handler. I have now placed the MapWidget.setZoomLevel() call further down in my onModuleLoad. The event fires, the RPC is made and everything is cool. Still doesn't explain why the RPC pulled no records when called directly in onModuleLoad() but for my purposes my workaround (setting map zoom after defining the associated handler instead of before) is perfectly sufficient. - Nick Zaillian On Sat, Aug 1, 2009 at 10:58 PM, contrived_username <[email protected]>wrote: > Hey all. > I've encountered an odd problem with my GAE/Java app and I thought I'd > see if anybody here could shed light on it. I've got an app (at > nicksmap.org) that scrapes craigslist apartment listing pages for > information relevant to location, and then attempts to map them. The > scraping is all handled by a backend, which figures out the relevant > information in listings, builds objects with that info, and then > persists them in the Data Store. The client makes an RPC to fetch > markers within the map's bounds whenever the map is dragged or > resized. I've therefore got the marker-fetching RPC wrapped up in map > drag and map zoom handlers. What I would like to be able to do is > also to invoke the RPC once near the beginning of my onModuleLoad() so > that when the map first renders it is populated with all of the > markers within its bounds. I have tried to do this but it does not > work. I've put print/debug statements throughout my code to pinpoint > the source of the problem. What I have found is that the marker > fetching service is getting called with valid parameters when the app > loads, but that when it runs the query on the Data Store, no records > are returned. If I drag or resize the map a half-second later, the > same service successfully retrieves records. So what gives? Does it > take a moment for the service to establish a connection with the > datastore? That's my best theory as of now. I would like to test it > out but GAE won't let me do System/pause type calls (or will it?). > Anyone else running into this sort of problem? > Thanks, > Nick Zaillian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
