saurabhd / hk_realestate

GNU General Public License v2.0
1 stars 0 forks source link

Shadow apartments on the map #18

Closed heliogabal closed 7 years ago

heliogabal commented 8 years ago

The Map Stack: modules: leaflet leaflet_markercluster leaflet_mapbox leaflet_label leaflet_widget ip_geoloc

custom module: hk_leaflet

proprietary addon: regionbound

several patches

The Problem:

Client needs a way to display apartments without exact location on the map. These are dubbed "shadow apartments", indicated by a checkbox on the node creation form, and should appear as grey markers instead of red from zoom level 10-14, and disappear on a zoom level of 15 (or 16, we'll have to see). In their marker balloon, there should be a special text coming from field_object_text_schattenobjekt instead of field_object_txt_map_popup, obviously no address, and in the apartment details table, there should be no Objekt ID, as it is derived from the street and house number, and no Details link.

To accomplish this, Rik de Boer, author of ip_geoloc already added a function to randomly displace markers. I'm not sure if it is working reliably with the newest version of ip_geoloc, so you would have to implement and check the patches that Rik sent me in a first step, so we can see where we are.

Then, the logic to hide shadow apartments for zoom levels 15-18 and to show the specific texts in the balloon needs to be implemented.

There also seems to be a problem with the counting of apartments in a marker that he provided before, because right now, when apartments are clustered (until zoom 18), the number correctly only shows published apartments, but on zoom 18, without the cluster function, published and unpublished aparts are shown (see object KÖP50 to see what I mean - instead of 3 it says 11).

I will send you all the code and communication with Rik concerning this on Skype to bring you up to speed.

heliogabal commented 8 years ago

After input from Rik and feedback from the client, the specs have changed here. Only requirement now is that shadow apartments have a grey marker, and a different popup content, only special text coming from field_object_text_schattenobjekt instead of field_object_txt_map_popup, obviously no address, and in the apartment details table, there should be no Objekt ID, as it is derived from the street and house number, and no Details link.

darshi-shah commented 8 years ago

map_page_view.txt Here is the view file, let me know any questions.

Thanks

heliogabal commented 8 years ago

as of now, there are still a number of problems with the shadow apartments:

heliogabal commented 8 years ago

While showing the solution to the client, there were the following requests for changes:

There should be a button (Reading "Anfrage stellen") that opens the inquiry form without the visible "inquiry for" field - we realized that it might be hard to tell for an agent otherwise which apartment the visitor is interested in, so the initial idea of just providing a telephone number is not really working.

heliogabal commented 7 years ago

this seems to be about ready. Will have to wait until the first shadow apartments are actually online to see if everything is fine with it, but we can probably close it then.

heliogabal commented 7 years ago
darshi-shah commented 7 years ago

Hi Rainer,

First two points are done and pushed in develop branch.

Multiple shadow apartment issue needs time. We will be working on this once other issues are completed.

Thanks Darshi

heliogabal commented 7 years ago

Ok.

heliogabal commented 7 years ago

please look at this first. It's vital for the client being able to publish more shadow apartments, and solving of other issue #40 as well.

darshi-shah commented 7 years ago

Okay.

darshi-shah commented 7 years ago

Hi Rainer,

We tried various things for shadow objects and nothing has worked perfectly so far in every scenario. We will keep trying for this. Can we get in touch with Rik again for this? Please do let us know.

Thanks Darshi

darshi-shah commented 7 years ago

Hi Rainer,

I have pushed code for this in develop branch. We made changes in ip_geoloc module. We have checked this against all scenarios and it is working fine. Please take pull and do let us know if you find any scenario in which this is not working.

Thanks Darshi

heliogabal commented 7 years ago

Hi Darshi, that looks very good! As far as I can see, this seems to work in all cases currently on the dev map. Ready to push to master and close this monster issue I'd say.

heliogabal commented 7 years ago

apparently, we didn't check for all scenarios after all, as the "inquiry for" field doesn't get filled out when an anonymous user is inquiring about a shadow apartment (which is the standard case). So the whole inquiry process is basically not working, as H+K doesn't know which apartment is inquired.

Shadow apartments are in workflow state active but unpublished, and there needs to be a function to allow an anonymous user that fills out the form to attach the unpublished apartment.

If that is not possible in the short amount of time, an alternative would be to include the anonmymously visible features of the shadow apartment (rooms, size, prize) so they are able to find out which apartment is inquired.