Using key().id() on GAE Datastore and reverse geocoding

Posted by Ivan Slaughter on Stack Overflow See other posts from Stack Overflow or by Ivan Slaughter
Published on 2010-04-21T20:36:47Z Indexed on 2010/04/22 21:53 UTC
Read the original article Hit count: 367

I have 6000 data of district, subdistrict. I need to represent this on dependent dropdown. The datamodel is for example;

class Location(db.Model):
    location_name = db.StringProperty()
    location_parent = db.IntegerProperty()

location_parent is reference to key() or id()? Still cannot decide which one is good. When i use key() as reference then using JSON to create jquery dependent drop down. My page loading/query and rendering time the dropdown is quite slow? Can i use key().id() as drop down option value to lighten up the page load? Any better solution for this parent/child reference for the drop down? For example: for the district record/entities the location-parent is null, for sub district record location_name will contain reference to parent district record.

Other issue is to reverse geocoding the location to store or display geoPoint (lat,long)? Is google MAP API always find the exact lat,long of specific region boundaries or any error checking for the result?

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about google-datastore