Circles and Polygon

Started by trogdan, December 07, 2012, 17:06:38

0 Members and 1 Guest are viewing this topic.

trogdan

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.
  •  

Menion

#1
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?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

trogdan

#2
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.
  •  

trogdan

#3
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?
  •  

trogdan

#4
If you are using MapsForge, it appears they have a CircleOverlay

http://code.google.com/p/mapsforge/wiki ... cleOverlay
  •  

Menion

#5
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?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

trogdan

#6
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.
  •