Dynamic KML

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Dynamic KML

Postby MerseyCoder » Wed Aug 19, 2009 12:33 pm

Hi all,
I have a KML file that is generated on a server and sent to the phone with the following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent mapIntent = new Intent(Intent.ACTION_VIEW);
  2.  
  3. Uri uri = Uri.parse("geo:0,0?q=http://www.example.com/dynamic.kml");
  4.  
  5. mapIntent.setData(uri);
  6.  
  7. startActivity(Intent.createChooser(mapIntent, "Sample Map"));
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


All is well the first time, as it creates the MapActivity and loads the KML. But I'd like to poll the server every so often, and get the latest KML. I've tried setting the Intent on the MapActivity, but it does nothing.

I thought perhaps I need to explicitly render the KML, but I can find nothing in the docs that tell me how. I really don't fancy writing my own KML renderer! Especially as there seems to be a perfectly good one that MapActivity uses.

Any help would be much appreciated.

-JD
MerseyCoder
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Aug 19, 2009 12:17 pm

Top

Re: Dynamic KML

Postby android2 » Wed Oct 07, 2009 11:04 am

hello how do I remove the interface is ex.trova http://www.asdas.it???

MerseyCoder wrote:Hi all,
I have a KML file that is generated on a server and sent to the phone with the following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent mapIntent = new Intent(Intent.ACTION_VIEW);
  2. Uri uri = Uri.parse("geo:0,0?q=http://www.example.com/dynamic.kml");
  3. mapIntent.setData(uri);
  4. startActivity(Intent.createChooser(mapIntent, "Sample Map"));
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


All is well the first time, as it creates the MapActivity and loads the KML. But I'd like to poll the server every so often, and get the latest KML. I've tried setting the Intent on the MapActivity, but it does nothing.

I thought perhaps I need to explicitly render the KML, but I can find nothing in the docs that tell me how. I really don't fancy writing my own KML renderer! Especially as there seems to be a perfectly good one that MapActivity uses.

Any help would be much appreciated.

-JD
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Re: Dynamic KML

Postby android2 » Sun Oct 18, 2009 9:33 pm

I need see the location in the kml in a listview help me
android2 wrote:hello how do I remove the interface is ex.trova http://www.asdas.it???

MerseyCoder wrote:Hi all,
I have a KML file that is generated on a server and sent to the phone with the following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent mapIntent = new Intent(Intent.ACTION_VIEW);
  2. Uri uri = Uri.parse("geo:0,0?q=http://www.example.com/dynamic.kml");
  3. mapIntent.setData(uri);
  4. startActivity(Intent.createChooser(mapIntent, "Sample Map"));
Parsed in 0.037 seconds, using GeSHi 1.0.8.4


All is well the first time, as it creates the MapActivity and loads the KML. But I'd like to poll the server every so often, and get the latest KML. I've tried setting the Intent on the MapActivity, but it does nothing.

I thought perhaps I need to explicitly render the KML, but I can find nothing in the docs that tell me how. I really don't fancy writing my own KML renderer! Especially as there seems to be a perfectly good one that MapActivity uses.

Any help would be much appreciated.

-JD
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Re: Dynamic KML

Postby android2 » Fri Oct 30, 2009 2:59 pm

I pass through this call the kml code
Intent myMap = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("geo:0,0?q=http://www.dadasd.kml");
myMap.setData(uri);
startActivity(Intent.createChooser(myMap, "map"));

Can you tell me how do I zoom which goes 500 meters in 500 meters????
android2 wrote:I need see the location in the kml in a listview help me
android2 wrote:hello how do I remove the interface is ex.trova http://www.asdas.it???

MerseyCoder wrote:Hi all,
I have a KML file that is generated on a server and sent to the phone with the following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent mapIntent = new Intent(Intent.ACTION_VIEW);
  2. Uri uri = Uri.parse("geo:0,0?q=http://www.example.com/dynamic.kml");
  3. mapIntent.setData(uri);
  4. startActivity(Intent.createChooser(mapIntent, "Sample Map"));
Parsed in 0.036 seconds, using GeSHi 1.0.8.4


All is well the first time, as it creates the MapActivity and loads the KML. But I'd like to poll the server every so often, and get the latest KML. I've tried setting the Intent on the MapActivity, but it does nothing.

I thought perhaps I need to explicitly render the KML, but I can find nothing in the docs that tell me how. I really don't fancy writing my own KML renderer! Especially as there seems to be a perfectly good one that MapActivity uses.

Any help would be much appreciated.

-JD
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Re: Dynamic KML

Postby android2 » Fri Oct 30, 2009 2:59 pm

I pass through this call the kml code
Intent myMap = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("geo:0,0?q=http://www.dadasd.kml");
myMap.setData(uri);
startActivity(Intent.createChooser(myMap, "map"));

Can you tell me how do I zoom which goes 500 meters in 500 meters????
android2 wrote:I need see the location in the kml in a listview help me
android2 wrote:hello how do I remove the interface is ex.trova http://www.asdas.it???

MerseyCoder wrote:Hi all,
I have a KML file that is generated on a server and sent to the phone with the following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent mapIntent = new Intent(Intent.ACTION_VIEW);
  2. Uri uri = Uri.parse("geo:0,0?q=http://www.example.com/dynamic.kml");
  3. mapIntent.setData(uri);
  4. startActivity(Intent.createChooser(mapIntent, "Sample Map"));
Parsed in 0.036 seconds, using GeSHi 1.0.8.4


All is well the first time, as it creates the MapActivity and loads the KML. But I'd like to poll the server every so often, and get the latest KML. I've tried setting the Intent on the MapActivity, but it does nothing.

I thought perhaps I need to explicitly render the KML, but I can find nothing in the docs that tell me how. I really don't fancy writing my own KML renderer! Especially as there seems to be a perfectly good one that MapActivity uses.

Any help would be much appreciated.

-JD
android2
Developer
Developer
 
Posts: 48
Joined: Sun Oct 04, 2009 8:34 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests