Error while trying to create a geofence

ilango g7 years ago

Hi
I have registered my device with demo.traccar and I am trying to create a geofence, and this is what I get:

Unknown geometry type
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@4685704b; line: 1, column: 50] (through reference chain: org.traccar.model.Geofence["area"])

I can continue to do my own diligence on your forum to get the answer, but I felt that this might be an issue in the code.
Thanks always.

Anton Tananaev7 years ago

Have you defined area for the geofence?

ilango g7 years ago

Okay, Right now, I am trying to define the area in the Geofence popup form (after hitting +) in the Geofences window. Chose the polygon option
It then brings up a blue large map that shows Europe and I would like to set a geofence around where my device is, right now, in St Louis in the US.
I need to somehow scroll over the map to the US and locate where I am?
The feature looks cool, but I guess I am not able to figure out how to set a geofence.

Anton Tananaev7 years ago

You can always set default location and zoom of the map. Otherwise yes, you need to pan and zoom to the area, and draw the polygon.

ilango g7 years ago

Okay, I am was able to make a geofence.
I was able to hover over the map of the US and do this, but I guess what I was really looking for was the bright green marker showing exactly where I am, so that drawing a polygon around it is more readily visible to me.
But since I am still learning this, maybe I am doing this wrong?

Anton Tananaev7 years ago

I agree that geozone creation is not ideal, but that's what we have at the moment. What you can do to simplify it is set default map location in your user preferences.

ilango g7 years ago

Ah, ha., I need to set the default location.
I am now looking to create a circular geofence - really small geofence of no more than say 10 km in radius around my default location (my house).
Is that kind of fence definable?

Anton Tananaev7 years ago

There is a circle option in the drop-down.

ilango g7 years ago

Okay, as you suggested, I will set default map location in my user preferences" .
As you can see, I have also been able to create a circular geofence.. It is cool. Right now, I agree that the geofence creation is still not evolved to a totally mature feature. For example, if I clicked on the newly created fence, it should just show me the map again, with the circular fence.
What I would like to ideally see is a very configurable geofence feature that lets us set set small circular geofences of a 10 miles or 20 mile radius around the default location.

Anton Tananaev7 years ago

If you have any feature suggestions, please use GitHub.

ilango g7 years ago

Sure, i will submit a feature request.
Also, can you suggest where in the code I might be able to poke around to take a shot at improving this geofence?

Anton Tananaev7 years ago

Just search for "geofence" keyword and the code.

ilango g7 years ago

Of course. Thank you

ilango g7 years ago

So, before I log out of demo.traccar. in the Preferences under Account, can I set the latitude and longitude to set default map location to my house. Or am I not following your instructions properly about "set default map location in your user preferences"?

Anton Tananaev7 years ago

Yes, that's exactly what I meant. There is also a button to automatically take current map state, so you can zoom to your house first and click on that button.