It seems to usually be 24-32 (?) characters long./maps//data=!4m3!11m2!2sXXXX.XXXX!3e3 However, for my use-case this is not really important, so I extracted the correct pb-block once and called it a day.Īs explained in the other answers, the id of the list is visible in the basic url (here, the 2sXX.) when you navigate to the list in your browser. Getting the correct url currently seems to be the hardest part when doing this and I have not fully figured this out aswell. # curr = the description you can manually type in when savingĬurr = txt.split(cord).split("\"]]") Highlighted is the feature ID from the link you with other maps parameters when you hit that link you're actually manually triggering the same callback that Google's own scripts in maps use to parse the data to feed back to the maps UI if you look at array item 2, or ]", txt) Your saved places list actually has what you call a feature ID attribute, this isn't a common practice and Google frowns upon this technique but take a look at this URL: I can see the original feature id being included at the end of the url, but have no idea how to construct this url in full though to get the next 20 items. That seems to trigger another call to get the next 20 results and looks a bit like: That seems to work a bit, but when trying with lists over 20 items long, google only gets the first 20 and is waiting for the user to 'scroll down' to get the next 20. Deep inside the array/map structure, I managed to get the google name and google place id out of that array. I then convert it to an javascript array and loop over it. I managed to get something working by visiting the shared link, then processing the html and storing the window.APP_INITIALIZATION_STATE variable. I even tried parsing the resulting HTML but it seems everything is handled by some Javascript Engine and I can't find any reference to Google Ids there - I dont even know how they handle clicks!Īny help? There must be a way to retrieve this information programmatically! I created this list on Google Maps, then hit share and obtained that link. That apparently there used to be a way to obtain the URL, but it does not seem to work with my list of not seem to work if I append &output=kml or &output=json Now I know there isnt an API for this (for whatever reason), but I saw here: I am trying to obtain the list of places the user has saved on Google Maps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |