I am noticing that many update events are being sent to the server even though no changes were made. It happens soon after the scheduler is loaded. Any ideas what may be causing this?
Can you provide a demo which demonstrates the issue?
Here is the link:
secure.fieldmatic.com/scheduler/test.html
You will notice that many ‘events.do?editing=true’ requests will be made when the page loads. I used Chrome to see Network activity.
Thanks,
It is caused by
scheduler.config.map_resolve_event_location = true;
if events in database doesn’t have lat and lng values there will be an attempt to resolve them on event loading, useful for migration, but not so useful for production stage. For each event which has not lat and lng data, scheduler will try to locate their coordinates based on the location text and save the retrieved info.
You can safely disable this options, as it doesn’t control any other aspects of locations resolving.
I need to set map_resolve_event_location to true, because I want to capture lat/long and update the database for new addresses. I added lat, lng columns to the table. But when these columns are null for new addresses, I don’t see the map properly.
I was expecting that dhtmlx would get new geocode if lat/long elements are null. But, looks like map_resolve_event_location works only if these elements are not in the xml result. Is it true? If yes, how can I override this behavior and capture lat/long and update the database.
This option will affect only events which are loaded from DB.
If you will create new event, it will try to resolve its location anyway. So you can have this options and false, and each new event will try to convert its location string to valid coordinates.
But, looks like map_resolve_event_location works only if these elements are not in the xml result. Is it true?
not really, they may present in xml, but must be empty
is fine
nullnull will not trigger location resolution
You can alter logic at end of dhtmlxschedule_map.js ( better take version from sources folder )
I am using dhtmlxConnect for Java using Oracle. My results are being sent as:
or
How can I change this to send as:
Thanks,
I was able to fix the issue by setting event.lat and event.lng to empty string in onEventLoading. But now, when I drop a new event with no lat/long information from a grid onto scheduler, I don’t see lat/long being resolved. I tried to set them to empty string onExternalDragIn but that didn’t help also.
Hi,
can you show the code?
I’ve tried following with our sample, and it seemed workedscheduler.attachEvent("onExternalDragIn", function(id, source, e) {
var ev = scheduler.getEvent(id);
ev.lat = "";
ev.lng = "";
return true;
});
I am doing the same thing but still doesn’t work.
Please check following URL:
secure.fieldmatic.com/scheduler/test.html
Thanks,
Hi,
the grid is empty, there is nothing to d’n’d into scheduler. Can you add some test data?