Author Topic: Circles and Polygon  (Read 2543 times)

Offline trogdan

  • Newbie
  • *
  • Posts: 6
    • View Profile
Circles and Polygon
« on: December 07, 2012, 17:06:38 »
Really need a way to render a proximity circle AND/OR a polygon, especially via the third party API, so that I can use my app to draw simple waypoints, tracks, and area features (specifically circle, but this can be approximated with polygon) on the Locus app.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11354
  • Thanked: 293 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Circles and Polygon
« Reply #1 on: December 07, 2012, 17:11:38 »
hello trogdan, you wrote already an email on this request right? I not yet responded, sorry. Anyway please post this request on Google code http://code.google.com/p/android-locus-map/issues/list .. I'll look at it

anyway as I think about it, it may be really simple to create all these stuffs as KML file and send this file into locus. Did you tried this?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline trogdan

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Circles and Polygon
« Reply #2 on: December 07, 2012, 17:52:05 »
Heya,

I figured you were busy fixing bugs what with the Google Play store, so I figure this new feature should be lower priority until you get the big problems done first. I posted here so that in case someone else wanted a similar feature, they could comment on it. I will add to the google code issues.

I looked at KML, and there doesn't appear to be a way to draw circles directly, https://developers.google.com/kml/faq#circle, but you can draw a polygon using it, and then load the KML via the API.  This SHOULD work for my prototype.  I just need to make sure that I can update the polygon by ID, since the shape needs to be able to update as the circle changes size and position.  It's not the cleanest looking (the KML example does this example with 200 pts), and obviously a larger circle geographically will need more points to remain circular.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline trogdan

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Circles and Polygon
« Reply #3 on: December 07, 2012, 18:59:33 »
Okay, so what did I find out.  Neither GPX nor KML has a circle in their schemas. (GPX is really only good for points and lines). But I can use a polygon with KML. However, I need to update the polygon with real-time information.    This poses an issue because polygons in GPX and KML don't really have an ID field to do an update. At this point i can only hope that when locus reloads a file with the same path, it removes the old file data, then adds the new file data.

KML does have a way to update the entire KML (or a region of the KML for performance), using the <Update> tag under <NetworkLinkControl>.  This is probably an advanced feature that I doubt you have implemented in Locus, nor do I expect you to, since it's pretty complicated. https://developers.google.com/kml/docum ... nce#update

Both these methods lack the capability to shade the area in locus, which is another "nice to have"

What if i run a WMS server? I have much experience with WMS.  Does locus pro only do WMS raster, or does it handle vector?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline trogdan

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Circles and Polygon
« Reply #4 on: December 07, 2012, 19:14:53 »
If you are using MapsForge, it appears they have a CircleOverlay

http://code.google.com/p/mapsforge/wiki ... cleOverlay
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Online menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11354
  • Thanked: 293 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Circles and Polygon
« Reply #5 on: December 07, 2012, 19:32:18 »
understand. I don't use mapsForge for anything except generating map tiles. All other stuff are mine creation ...

seems you need quite complicated task. Even a points can be now refreshed simply by ID, so it's complex task to do, but doable for sure. Please write it in your time on Google code as I suggested anyway count that I cannot now promise time when it will be. What is your program? I expect your work is based on this and without these features, you cannot make progress right?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline trogdan

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Circles and Polygon
« Reply #6 on: December 07, 2012, 20:45:54 »
No worries, menion.

I make things more complicated than they need to be.  I can do what I need with KML, with polygons, and shading.  If I import a file with the same filename, the old shape is updated.  Problem solved    :D

I may take some time to create a branch of the repository to suggest a possible interface to your API.  Maybe it can give you some ideas, but again, I can do what I need right now.
« Last Edit: January 01, 1970, 01:00:00 by Guest »