tsioularisa
Lurker
i want to create a real estate app and i have some questions.
1) How should i make the client-server communication? is it good solution to use json? is there any good tutorial for this?
2) the biggest problem is how to handle the google maps. I guess that retrieving all the markers from the server and add them to the map would cause the application to be very slow. I have two thoughts on this problem but neither of them is perfect.
i. The user can choose a specific country and town and after the appropriate query in server's database only the correct markers will be added to the map. But in this case if the user scrolls out of the city's bounds, the markers of the other cities won't be shown.
ii. Add only the markers that are visible in screen. The problem with this solution is that it will be probably less effective to scan a huge amount of markers, to check which of them are inside the visible area (compare coordinates).
How do you think trulia or other real estate apps handle this problem? They have a huge amount of markers (houses) and their apps are very responsive.
Do they make queries every time the user changes react with the map?
Do they copy all of their markers in a list in their code and handle them inside their java code?
Do they have categorized them in a special way?
Even if you don't know please tell me your opinion.
Thanks in advance and sorry for my English!
1) How should i make the client-server communication? is it good solution to use json? is there any good tutorial for this?
2) the biggest problem is how to handle the google maps. I guess that retrieving all the markers from the server and add them to the map would cause the application to be very slow. I have two thoughts on this problem but neither of them is perfect.
i. The user can choose a specific country and town and after the appropriate query in server's database only the correct markers will be added to the map. But in this case if the user scrolls out of the city's bounds, the markers of the other cities won't be shown.
ii. Add only the markers that are visible in screen. The problem with this solution is that it will be probably less effective to scan a huge amount of markers, to check which of them are inside the visible area (compare coordinates).
How do you think trulia or other real estate apps handle this problem? They have a huge amount of markers (houses) and their apps are very responsive.
Do they make queries every time the user changes react with the map?
Do they copy all of their markers in a list in their code and handle them inside their java code?
Do they have categorized them in a special way?
Even if you don't know please tell me your opinion.
Thanks in advance and sorry for my English!
