hi guys,
this is something i made tonight for work. i figured it would be useful for others around here
whats KML?
KML file is what google earth uses to store placemarks and other stuff, so if you need to share place marks with others you make a KML file and give it to them
read more about KMLs here it has much more uses than just storing place marks
what does this script do?
this script simply takes some arguments about the KML you want to generate and sends it as a file to download or text to view in browser
how can i use it?
i made it in half an hour so its not finished but its working fine.
it takes 3 arguments
1-array of place marks that looks like this:
2. true /false: true means you want the output as a file which will propmt a download(used Jann method)Code:array( array( 'name'=>'my place mark 1' , //name/title of the place mark 'desc'=>'this is my home', // the description that pops up when you open it 'coordinates'=>'102.594411,14.998518' ) , array( 'name'=>'my place mark 2' , 'desc'=>'this is another point', 'coordinates'=>'102.594411,14.9983' ) );
3. the file name, make sure it ends with ".kml";
sample usage:
+REP me if you like itCode:
generatekml(
array(
array(
'name'=>'sample point 1',
'desc'=>'this is <h3>HTML</h3> text',
'coordinates'=>'102.594411,14.998518'
)
,
array(
'name'=>'sample point 2',
'desc'=>'this is another <h3>HTML</h3> text',
'coordinates'=>'101.594411,14.998518'
)
)
,true,"test.kml"
);
screenshot:
![]()
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
Very cool! That could come in handy.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks