I have a shapefile with 1500 records that I've converted to a KMZ in ArcGIS, and then imported into Google Maps. I want to symbolize the markers by a particular field, however, the issue is that Google Maps is not reading in the field names associated with the original GIS data. When I try to "Style by Data Column", it only presents me with two options, "Name" and "Description". I had roughly 20 fields in the original data and while these fields are showing up as information associated with each marker, Google Maps is not letting my symbolize by these fields.
I'm reading that when converting to KMZ in ArcGIS:
By default, the pop-up display will be composed of all visible fields from the layer.
My question is how to retain the field information when importing as KMZ into Google Maps. Is there something I'm missing?
Thanks.
Related
I'm playing around with Google Fusion Tables, particularly how it geocodes location entries.
Is there anyway, using the REST API, to get a hold of the raw Geocoded KML / GeoJSON for each table row?
Thanks!
If you want the coordinates available through a query you have to geocode them externally and put the coordinates in the fusion table yourself (the coordinates used by the fusion table that it generates through its "geocode" operation aren't available to you in a query).
related issue in the issue tracker: Issue 437: Restore support for exporting the geographic coordinates in KML exports
I need export line coordinates from KML. I use some KML2CSV export tools. but this programs cant read my kml. Error: Read Error.
WHY i need coordinates:
I`v kml which there pipelines of regions. i must show this coordinates on google map without KML..
I hope that I can explain to yours.
One solution: Google Fusion Tables
One way to extract coordinates from your KML is to upload your KML to Google's Fusion Tables.
If Google Earth parses your data then most likely you'll be able to import into a Fusion Table.
Short-cut to create a "Fusion Table" is simply clicking "Create a Fusion Table" from here and pick your KML file. The direct way to create Fusion Table is login to Google Drive (aka Google Docs) then click "Create" and under "More" pick "Fusion Table" and import your KML file.
After it's imported you have lots of visualization options to try online.
You can also select "Download" under File menu and export the data back as a CSV or KML file.
http://support.google.com/fusiontables/answer/2548807/
However, CSV export of KML import in Fusion Tables exports a KML geometry (not a separated latitude/longitude field) so you can further edit the resulting file in a text editor and strip off the KML markup.
1,"<Point><coordinates>-122.536226,37.86047,0.0</coordinates></Point>"
Google Fusion Tables also allows programmatic access through a RESTful API with SQL-like queries to insert, update or delete rows of data.
UPDATE: Google Fusion tables will be retired in Dec 3, 2019 after which will no longer work.
Validating KML
If you're unable to use other KML2CSV converters then your KML probably has some invalid elements preventing it. Google Earth can still render badly formed KML so when you need to use that KML elsewhere you need to validate the KML data.
You can use the Galdos KML Validator. Also suggest some tips to validate your KML.
This should help here, you have to made a small change to your kml file: save it as a xml file, and then use excel to get what you want.
I have Google Map with about 1200 points. When I try to save it as KML or view in Google Earth there is only 1000 point. Is there a way (for example using some API) to download all points (I don't need KML - I just want coordinates with description - it may be in some other format)?
Map can be found here. When you save KML there will be no points from 6th page.
Apparently there is a 1000 feature limit on exports from My Maps:
Restrictions
#4. There is a 1,000 feature limit on a single My Maps export, and approximately 1,000
in displaying KML - so large maps wont particully benefit from this trick. Wont show an
error just the first 1000 points/lines/features.
See this post on the google map product forum for a workaround to export all the points, Barry Hunter also recommends (and I concur) using FustionTables if you need to display more points on a map (sounds like you don't need to display them on a map, just retrieve the data from your map).
Seems to work, here is a combined file displayed on Google Maps (goes up to 1193)
geoxml3 reports 1197: geoXmlDoc: Object -> placemarks: Array[1197]
Is it still possible using JavaScript to get My Places data out of Maps? With the move to Fusion Tables and deprecation of the Maps Data API, I can't seem to find information on how to get this data...if it's even available in FT.
The Maps Data API was the only programmatic endpoint to accessing this dataset. However you can still export the data by selecting a map, and then clicking the KML link.
A variety of tools are available for visualizing, importing, and converting KML data in case you want to import it elsewhere.
Is it possible to mask away neighbor countries in GoogleMap? In my case I just want to show Sweden on one view. On a second view just Norway, Denmark etc etc...
I know it is possible to draw polygon lines and fill them accordingly on to Maps API. Problem is that or the result sets get huge or the lines get very rough etc... Would be nice if GoogleMaps could deliver a country at the time without neighbors.
Does anyone know about a good coordinate database with country borders?
You can create very complex polygons in Maps without a drop in performance if you store them in KML file format and load them as KmlLayers. KML is an XML based vector file format for geo data. The beauty of using KML files in Google Maps is that they are rendered on Google servers into simple PNG files, matching the current resolution and bounding box of your Maps view at any time, no matter how complex the original polygon data is. So all complexity is handled server side at Google.
Here is a sample of a project, where I have used such a masking for one of the federal states of Germany. (The surroundings in this case are not fully masked away but only dimmed. But you can also mask them off just as easily by changing the alpha value of the fill color in the KML file.)
For a quick review KML files can also be loaded directly into the Google Maps public website (by entering their URL into the search field). Here is the KML file that I have used in the above project, loaded directly into Google Maps. (I have actually used a KMZ file here, but that is simply a KML file packed into a ZIP archive. You can pack and unpack it with normal ZIP tools.) BEGIN UPDATE 07/2015: Unfortunately Google has REMOVED the possibility to directly enter the URL of a KML/KMZ file into the search field of their public Google Maps when they launched its redesigned version in 2014. You can still use all techniques discussed in this answer but you cannot simply preview KML files by entering their URL in the search field anymore. If you need the KMZ mentioned above for further analysis, you can download it here. END UPDATE
Please be aware that Google implies a size limit to KML/KMZ files (currently 10 Mb uncompressed, 3 Mb compressed - details see here). If your KML files should be to large, there is software available to reduce the complexity (see examples here and here).
You will find free map data at many places on the Internet, most of them being in ESRI shapefile format. A great source for country maps is http://www.gadm.org/ with the big advantage of providing their data in KML/KMZ format too. If you should have to convert ESRI shapefiles to KML, have a look at the great (and free) OGR converter.
Please notice that KML files are only a solution if your polygons are static (like the border of Sweden is) and not depending on any user input. For dynamic polygons you will still have to use the Polygon class of the Maps API with the complexity restrictions that you have mentioned.
had a similar problem and managed it by combining gamps with fusion tables:
var table_id = 420419; //can be exchanged wit another table
var FT_Query = "SELECT 'kml_4326' FROM "+ table_id +" WHERE 'name_0' NOT EQUAL TO 'SWEDEN'";
var FT_Options =
{
suppressInfoWindows: true,
query: FT_Query
};
var layer = new google.maps.FusionTablesLayer(table_id, FT_Options);
layer.setMap(map);
Have you considered loading in a custom map?
I haven't used it myself, but hopefully that link could help you out a bit :)