pass KML to Google Maps - google-maps

i found out that i can open google maps with a linkt to a kml-file like that:
http://maps.google.com/maps?q=http://econym.org.uk/gmap/example1.kml
that is exactly what i need, but i don't like to provide a public URL with the Data. Is it possible to pass the data with a post request or get parameter?
Or has anybody another idea how to create a link to google maps with multible markers?
Thanks in advance

Updated based on your comment: You could upload the KML to a Google My Map: maps.google.com->My Places->Create Map->Import. There isn't currently programmatic access to My Maps. Otherwise, maps.google.com requires a public server to host the KML data.

Related

Getting pins from a saved Google Map into v3 API

I have a saved google map in 'My Places', with over 100+ pins added for locations around the UK. Is there any way I can avoid having to use the embed feature to display this map on a webpage, sort of calling the saved map by ID via the google API?
Essentially what I want to do is get access to google's new visual refresh and be able to control the settings of the map more with API.
The map link is this: https://maps.google.co.uk/maps/ms?msid=207590858966548688521.0004aa52150024d3431b2&msa=0
Can we parse anything here...?
You can overlay the KML output by MyMaps using a KmlLayer in the Google Maps API also:
your MyMaps data displayed on an API based map
Updates in MyMaps will (eventually) be reflected on the map.
Using https://mapsengine.google.com I was able to import the maps data and utilise the pins that way. Not ideal, but still some better functionality.

Google maps (API v3) with kml layer. how to hide kml URL?

I would like to di splay a Google Map with a kml inside through API v3. the proble is that every one can see the url of the kml and easily download it. Is there a trick to 'hide' the .KML URL?
wikimapia.org seems to do something similar displaing kml polygons but if you check with Firebug through the script tag you won't see the kml URL.
thanks everyone for help.
A. from Italy.
You could generate it at run time, so that the server sends the page the URL. However, it is still discoverable at some point. Security through obscurity just doesn't really work. The KMLLayer Layer requires your KML to be on a public server. You could instead parse the KML and render it that way, say using egeoxml. However that delivers much less performance.

Acces to user-created map with Google map API

Is it possible?
With the Google Data api, we could use:
http://maps.google.com/maps/feeds/maps/default/owned
but now that it is deprecated, I have no idea how to do this.
Thanks for your help.
Currently there is no programatic access to user created data in Google My Maps.

KML overlay as string

Is there any way to create a KML overlay in Google Maps by passing the KML as a string rather than as a publicly accessible URL? AFAICT there is no such option in the Google Maps API v3. I am not asking about the API but about possible end runs around this limitation.
Personally I can think of only one: to parse the KML and generate equivalent JS. Does anyone have a better suggestion?
geoxml3 has a parseKmlString method, which will parse a string of kml and can create native google maps API v3 objects from it. I have used it to parse kml fragments out of FusionTables.
I've tried too but i haven't found a way to do this.
The reason is explained here: https://stackoverflow.com/a/6152916/2131283
For the tests my work around was sharing the kml file on my dropbox then give the direct access url with the token to the constructor
kmlLayer = new google.maps.KmlLayer
url: 'https://dl.dropboxusercontent.com/s/eg/gmaps.kmltoken_hash=HASH_CODE&dl=1'
Looking over the API it doesn't appear that this is possible.

Is there an API to add markers to user created public/unlisted maps in Google Maps?

I created a map with a few markers and saved it at http://maps.google.com/.
Is there a way to edit the map with an API, like inserting and deleting markers from it?
Or, is there a way to add markers to the default preview at http://maps.google.com/ without saving it? (Possibly through adding parameters to the URL).
The problem raises due to contract between Google Maps and Israel's map provider, which doesn't allow Google to show Israel's streets through an API, and only through the interactive map at http://maps.google.com/.
Thanks ahead!
if you are using Google Maps API, you can save markers in an database, so, you can inser, delete, update markers. When you load you web app where you are using the API you have to create an XML file with coordenates and info, then use a javascript to read XML file