Google Maps with custom GEORss file - google-maps

Where would I need to host an xml file in order to use it in Google maps for GEORss ??
From google api docs...
var georssLayer = new google.maps.KmlLayer('http://api.flickr.com/services/feeds/geo/?g=322338#N20&lang=en-us&format=feed-georss');
georssLayer.setMap(map);
this seems to do a great job of creating the info popouts and everything...
It would seem i cannot have one locally...
So i guess i need an aspx or ashx to push the xml...but does it have to be web accessible?
Thx

Yes, it needs to be web accessible because Google converts the GeoRSS to KML on the server side:
"The Google Maps API supports the KML and GeoRSS data formats for displaying geographic information. These data formats are displayed on a map using a KmlLayer object, whose constructor takes the URL of a publicly accessible KML or GeoRSS file.
The Maps API converts the provided geographic XML data into a KML representation which is displayed on the map using a V3 tile overlay."
http://code.google.com/apis/maps/documentation/javascript/overlays.html#KMLLayers
If you are hosting a static XML file, you might use Amazon Web Service's Simple Storage Service: http://aws.amazon.com/s3/

Related

Google Maps q parameter for adding a KML with URL stopped working

On our website we have several map previews for various KML datasets. When clicking the preview button the link would go to:
http://maps.google.com/maps?q=http://magic.lib.uconn.edu/magic_2/vector/37800/statect_37800_0000_2010_s100_census_1_kml.kmz
which would show a map with the overlaid KML file.
Support for this syntax from Google Maps apparently has stopped working recently, and I cannot find any new information about adding KML layers to a Google Map using the q parameter in a URL. Most of the resources I have found are for JavaScript or embedding maps, which hasn't been helpful. I have also found this thread from StackOverflow (Why has google maps "q" parameter stopped working?) but this is related to a specific location rather than adding a KML file. If anyone has new information or can help, that would be greatly appreciated.
See KML files on Google Maps in the documentation.
From February 2015, maps created in the classic Google Maps — https://maps.google.com/ — will no longer load KML/KMZ files from external websites. However, we know that KML files are a really useful way to work with geographic data, so we’ve added KML to Google My Maps, and continue to support this format with other Google Maps APIs. We hope that one of these options will meet your needs.
There they only list:
Google My Maps
Google Maps JavaScript API
So if you can't use Google My Maps or the Google Maps Javascript API v3, you may be out of luck.
Another reference from "support" is:
KML content isn't available in Google Maps
While using Google Maps, you might have received a notification saying "Some custom on-map content could not be displayed."
That’s because a certain type of content isn’t available anymore in the classic version of Google Maps or in maps embedded on other websites from the classic version of Maps. The content type that’s no longer available is KML, the file format Google Earth uses for the exchange of geographic information.
If you're the owner of a custom map with KML content, you need to update your content. Or, you can import your KML content into My Maps.

How can we display the dynamic kml files data with in the Arcgis online maps

Hi I have developed a website using google maps.My map will display the markers based on the kml files data which is on my server.Now I want to change the maps to Arcgis Online .Can I display the same kml files data with the Arcgis online maps ?
My kml files data will be changed accordingly.The total website is depends upon the kml files.
please suggest me whether I can change from google maps to Arcgis online.
Note:I dont have much idea on java and .net so Can I make an attempt to Arcgis online maps
As long as your KML is accessible to the web application user, you can display it using the ArcGIS API for JavaScript. Use the KMLLayer class. Note that this class requires a connection to ArcGIS Online, which converts the KML.

Importing a KML file to Google Maps with api call/request

I have geographical data which is represented by a set of points (latitudes and longitudes which form lines), the data is in json. I want to create a Google Map on my website with that data, but the map should also be editable by the user, so he can move the lines, add markers etc.
I could create it using the Google Maps API - with it I can draw polylines, add markers but everything has to be done by my javascript which adds a lot of work.
Google Maps offers a regular user a really nice map editor. To create a map with it the user has to click through the interface or import a KML file.
What I was thinking about, was mixing methods 1. and 2. like this:
a) Export my data to a KML file
b) Import the KML file to a users Google Maps account
c) The user can edit the map with the awesome Google Maps editor
d) Embed the map back on my website with embed code
The problem is with point b) - is it possible to import a KML file to Google Maps using some request/api call?
if you mean on android, yes you can call googlemaps app as an intent from your app and supply a kml file for it to show.
String kmlWebAddress = "http://www.afischer-online.de/sos/AFTrack/tracks/e1/01.24.Soltau2Wietzendorf.kml";
String uri = String.format(Locale.ENGLISH, "geo:0,0?q=%s",kmlWebAddress);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
if you mean online, then you can do so by calling googlemaps and appending "?q=http://www.yourdomain.com/yourfile.kml".
like this:
www.googlemaps.com?q=http://www.afischer-online.de/sos/AFTrack/tracks/e1/01.24.Soltau2Wietzendorf.kml

Google Earth loads KML 2.2 but not Google Maps

The Google maps script I have seems to load the example KML from Chicago files fine, but when I add my own, it fails. The KML standard is 2.2 - why doesn't Google Maps manage to read it (Google Earth seems to work fine)? When I tried to validate the file it said there were some errors - is there any way around it given that this is an output I get from an application?
geoxml3, KmlLayer and Google Maps load your kml for me. My server doesn't support KML with the .kml extension, just as XML with the .xml extension because it isn't configured for the KML/KMZ MIME types, you might have the same problem on your server.
See this issue on the Google Maps API v3 issue tracker regarding the "spikes" on the line.
Another option would be to to see what KmlLayer.getStatus() returns (Kml Status:DOCUMENT_NOT_FOUND). The cta.kml example returns Kml Status:OK.

Can I display some KML on a Google Map?

Is it possible to have some KML hardcoded into some Html page and have google maps display that hardcoded KML to a google map?
Right now, I keep seeing documentation that requires the KML to be located somewhere else -> an HTTP endpoint on some webserver (which is not what I want).
Any ideas?
The geoxml3 KML parser will parse a KML string embedded in your page and display it on the map (as native Google Maps API v3 objects, not a KmlLayer, that does require a publicly available KML file).