RSS to KML Overlay - google-maps

I'm want to display my blog as a Google Map overlay (each post contains geotags). How can I dynamically create a KML overlay from an RSS? Or better, how can I create a loop (PHP) that would display map placemarks according to given geotags?
Thank you!

Converting from one XML format to another XML format? Sounds like a job for XSLT!
Then again, I’ve just noticed that the Google Maps API seems to accept RSS as well: http://googlemapsapi.blogspot.com/2007/03/kml-and-georss-support-added-to-google.html

Related

Attach image to Trello card

I'm working with the Trello API. I want to attach an image to a newly created card. I have no problem POSTing the new card and getting the card id to then PUT the attachment.
My project is made in Laravel 5.4 and I'm using Guzzle to make the HTTP requests.
The image I want to attach is from the Google static maps API and I'm using an encoded polyline (which I generate using this script) to draw a figure over some area.
This is how the card should look like:
But it ends up looking like this:
If I go to Trello and attach the image (as an URL) manually everything works perfectly but when I do it through a HTTP request it looks like the second image above.
After doing some research I think the problem resides in the polyline string because it usually contains some characters that HTTP does not support. I've tried using PHP's urlencode() without any result.
I send the image URL as an URL encoded param since that is the only way the Trello API accepts it (even though the official Trello API docs say otherwise).
Do you guys have any other ideas | work-arounds | experience with this issue?
I think you can try to use Google URL Shortener or similar service to convert the complicated URL with encoded polyline to something really simple.
For example, I have the following static maps URL with polyline
https://maps.googleapis.com/maps/api/staticmap?size=512x512&scale=2&maptype=terrain&style=feature:all&path=weight:3%7Ccolor:0xff0000ff%7Cgeodesic:true%7Cenc:}sp}Gmrkl#m#wIiAaB_BaA}IcCmLoFqG_DuFkAyN[mEiBqN}MqFsLqUoxAyG{#qGqJwDkBeJMod#lScMzFcFvAwHn#wH[oGwAwI{EwFqGaHwKcS{e#mKkd#iGsi#wKem#iKg[aPg[_N_RiE{EoUaR{f#}X}d#sWo[mN}]_KqYcDePyCcQaGeUuM{PoO_SsWcLeTiSsi#{Ka[yRgb#sN{S}RaS_XkRiX{OiO{GgMiEoc#aDwq#{Eig#qHyhAeQ{n#Nqj#uOqp#qTcZmNyZkUcRkSsIiL{Qq[qHuPuLk]wIe]mLqd#sLm\kf#yAiRm^oXwe#uAazA}JgR{Qeb#yHsX}Gg\uDyViEwn#wHup#w#sCyT~AaKgo#qJmg#kGaT}Qud#cZch#y{#{gB_OeTaPkQkf#ae#kQcQ}MwPoQu[{GgPkJiZiEoRaIgh#_Gm[oQyj#kPk\iPkTi[cYuOyIqQsGcYuFm]gCug#g#cU{G}IaGeHcH}IsMyFaMsKi]eLw#qKab#kIwe#eDkLyKwRiGsFoOuGcGkAuQm#uH_#{W}DmOkFcJ}E_MkJ{WgTkLgL}I_KwJgGcHoBeGMaIjBuDhA_GRab#aEoKuCqFaEoIsQaG}NkDuL_#qR~BmNdR{b#zEaW~Cee#vEsv#vA}JfEeNpG_Q|A_HfAwOq#qQ{DeRgSou#eb#i|AyJc^aKcOeHyEm_#aNeOsFkDiCmEaGiIiV}e#__B}Kkc#{Q{fAg\wpBkLqrAeWuiDyUuwCqGak#aA_SFeNjCwWhI_WMaRjFgLbVueAdHa[fP}w#fAqT_BoVoHi}#{Hq{#yF}QyFaImH_FaQqGmQcJqH}IuWag#yFkQ{FyZcVcmAeJ_W{LcRqOaNgK{KeI{PeFoW}#eTp#qp#e#oRqHkr#gx#{|IwA_St#iSbAgNnGsXhRks#pNwk#bQsp#tVu|#zF}PhN}\rDoH~BaCvDqEn]el#fP_VrDiFbDaCdXoMbIgErCcDpCaFdCqIpFil#vFsq#ViQ}#qS{Bop#uCkaA{#o[\yVN{t#~W{zAdVowAZeNvA_MbEmTxHeZb#}IpCwQbIe#jMgp#tC_PvFkT~CgMdAaGeAGq#xDkAhEaBdHsBvIcESG|OsAlKaDlF{ErBgFg#}CoCaDcI{EcQ}F{FcHaDiNiGwGoDwGgEgOkEca#mQmVaLyFgEcIiOaG_QiDuLsBuCuJkIgWsT_m#uj#iPgNqSaEoKc#cBRgFpB_DdCqMjHyJxCsJv#aW_AcNsGuF}J&key=AIzaSyDztlrk_3CnzGHo7CFvLFqE_2bUKEq1JEU`
Now I apply the shortener service and get this URL: goo.gl/iytwvS
So, I can use the latter as src of the image as shown in the following example
http://jsbin.com/quridub/edit?html,output
I hope this helps!

Imported KML does not show formatted description in Google Maps

I created two KML files by copying and pasting their content directly from Google Manual. One file it the first example (using CDATA), another one is the second (without CDATA). I then created a new custom Google Map and added two layers importing both KML files.
The problem is that I cannot make formatting work. There are no red, italic, or bold fonts on the description as they should be according to both KML files.
That is how I can see the description in both Chrome and IE, on two different computers (Windows 10 64 and Windows 7 64):
Any ideas why I cannot see formats and how to make them work?
I think Google Earth supports HTML tags, but Google custom map (old name : my map) does not support HTML tags currently. KML file is just a data file. Supporting all features of KML format, or not is depends on the application.

Google maps display customer data in balloons without disclosing it (publicly or to Google)?

I'm trying to create a map of customer locations using Google maps.
It would be very convenient to display customer information in the balloons that pop up when you click a marker. However, some of that data should not be public, and the company would rather not disclose it to Google either.
I have access to (and can set up a server if need be) that runs something server side to generate .kml, Javascript, or serve a web page (including the js in that).
I've thought of a few ways to go about this. First is embedding html in .kml and having the contents of the balloon replaced by JavaScript making an asynchronous request to a private url/server. Unfortunately, it looks like JavaScript is stripped out if you are loading a .kml file by just putting the URL of the .kml file in the search box of google maps. I also found that it seems that iframes are also stripped out. One thing I do not know is if I set up a xhtml page that uses the Google maps API if that would let me load data from a private server directly to the browser without that data being loaded through Google.
One option that appears it will work is just putting a link in the .kml html for the balloon and having that link go somewhere. But that makes a whole extra step to see what the marker is, and diminishes the value of the whole thing in the first place.
So, is there a way to do what I'm attempting to do (load private data into the placemark bubbles directly to the user's browser instead of through Google)? If so, which option is the most maintainable/clean?
With Google's map API, you can write an (x)html page that loads a google map using javascript.
You can then have that javascript load data from a server directly to the browser (in something like JSON or XML) where the javascript can parse it and then add each point to the map. That way, the data does not route through Google's servers.

Dynamically integrating data from YouTube and Flickr in Google Maps

I am building a map where I want to create filters that dynamically pull data (all images and videos) from a specific YouTube and Flickr Channel/set.
Does anyone have a working example of this or some code I can try...?
You could be looking for something like this?
Linking Up the Google Maps and Flickr APIs

Converting Web Page with Google map into PDF

I am using iTextSharp library for converting my .aspx page into PDF. I am using Table, labels and Google map in my page. Every thing converts into PDF except Google map. In PDF file it shows Google map code instead of showing Map. I could not understand, how to fix this problem ?
Any help to fix this
So you're using iTextSharp to parse HTML, right? Unfortunately iText and iTextSharp's HTML parsers are still in their infancy and Google's maps use both iframes and JavaScript, neither of which are supported in the parser. You can see a list of supported HTML tags here. I would not be surprised if adding a JavaScript interpreter is not even on the to-do list.