KML Map Layer

8 38 14.2K
  • UX
38 REPLIES 38

This is a great feature. I think there is a limitation to the file size you can import as KML, right @Peter?

Yes @Santiago there are some constraints on the size of KML files that can be displayed (you can read more here๐Ÿ˜ž

  • Maximum fetched file size (raw or compressed): 3MB
  • Maximum uncompressed KML file size: 10MB
  • Maximum number of network links: 10
  • Maximum number of total document-wide features: 1000
  • Maximum number of KML layers: 10 to 20

These constraints are established by Google Maps (we use the Google Maps library to display maps in AppSheet) and we do not have the ability to modify them. An example of a KML file that fits these constraints is: http://code.google.com/apis/kml/documentation/us_states.kml

Hi there,
Iยดve tried to use a KML file which I created myself on google mymaps to import to appsheet.

Iยดve done what the appsheet blog was displaying.

No results

@Jonyxjake If youโ€™re hosting in Google Drive, you may have a hard time linking directly to the file, instead of Google Driveโ€™s file preview page. Wherever youโ€™re hosting the file, make sure your URL ends with the extension โ€˜.kmlโ€™

yep, u were right. I uploaded it my own website and used a kml networklink generator. It worked out for me! Thanks for the hint

Hi @Jonyxjake, what is the network kml link generator you used?

You can host kml files in Google drive and use "Google Drive Direct Link Generator" to generate a valid url.

https://sites.google.com/site/gdocs2direct/

Hi - it may be that the size of the file exceeds what Google allows. Check the AS docs for details and to confirm this, but I believe there is a 8 mb limit.

Hi @Peter,
I tried to use a kml as a secondary data layer. But I think this is not possible. Can you confirm?

@Fabian I believe it can only be used right now in the primary map layer, but may evolve. Whatโ€™s your use-case?

Hi @Peter,
would be great if we could use kml in a second layer.

I want the user to have the possibility to show or to hide the kml.
For that I created an extra table with just one row and the kml attached to an address column.
Further I created a slice for that table. This slice is my secondary data layer.
In my dashboard I have also an ENUM with Buttons where the user can select or deselect the KML.
If selected, the KML slice contains the one row with the kml. If deselected, the KML slice is empty and the KML is hidden in the map.
You can see it in my App
Wartungsliste_Test-38452-651676
View: KD Planung
The KML Layer is called โ€œFahrzeugpauschalenโ€

Hi @Peter do you have any timeline for enabling this?

@Fabian no timeline currently, but the feedback is very helpful, being considered by the team. Thank you!

Great! I cannot see that? How can I rey tour test versiรณn?

Sorry this is not a public App. I canโ€™t share it.

@Peter I was reading the documentation for working with maps and it says that max number of KML layers is 10-20; does this mean we can add multiple layers? I think we are looking at 3 possible layers to the current base map: Level A evacuation, Level B evacuation, and Level Cโ€ฆ

Also, when GIS exports the file it automatically saves it as a .kmz file not .kml - they donโ€™t get an option to save as just .kml. I believe I am looking into hosting via Google Drive , seems like that is the easiest?? Are you familiar with kmz files and how should I handle this?

Last question, I currently have our evacuation centers pinned to the base google map. How are the pins impacted by the layers? Do they need to be redone? Sorry if this is a stupid question. Iโ€™ve never worked with layers before.

Thanks

@tcanelli a few ideas:

  • The โ€˜10-20 layersโ€™ refers to the layers within the KML file itself (not number of KML files that can be layered within your AppSheet app.
  • I believe only KML files will work for now. There are some online KMZ to KML conversion tools that may work for you. Also, if you may be able to use Google โ€˜My Mapsโ€™ to help create / export custom maps and shapes to either KML or KMZ files. For example, this U.S. map file in a custom Google Map.
  • Like mentioned above, the KML file must be linked to directly - Google Drive
  • KML layers are basically just static layers that donโ€™t affect plotted points in any way - theyโ€™re just a layer applied to the base map. Depending on how youโ€™re trying to present the information, it may make more sense to have multiple map views, each with a unique XY-Type map layer, instead of the KML layer(s). Itโ€™s worth exploring some of these options: XY Column Type

@Peter Is there anything in the pipeline about making the KML URL field formula-enabled?

Meaning, Iโ€™d like to be able to use a formula to derive the KML file URL dynamically.

This would give me the ability to input the text once somewhere and then reference back to that;
or save the KML file to a parent record, then de-ref it into each child so they see the layers as well.


Peter Iโ€™m also wondering about Network Links inside the KML? Is that in the pipeline?

Right, it would be awesome to be able to do something like draw simple shapes on XY too!

For real. My mind goes to the following track:

  • The maps displayed inside AppSheet are a Google Map
  • Now that AppSheet is owned by GCP, perhaps the Maps integration will get stronger.

Ultimately, Iโ€™d like to see a way to integrate โ€œMy Mapsโ€ from Google with an App - this would give you the KML building abilities directly inside the app.

Hi @Peter
I have the same question, Is there any way to use a formula for KML layer field?

Negative; though Iโ€™m told itโ€™s on the roadmap, but how far out that isโ€ฆ

Peter,

Is there a way for a public app to be embedded on a page like you have done with your sample app on this thread? Is it something that can only be done on the community page? Iโ€™ve been trying to do something similar but it doesnโ€™t work like this for me.

Hey @Taylor_Felt2.

When you view the page of your sample app, thereโ€™s some HTML code for embedding the sample into a webpage.


Hereโ€™s what happens when I paste what I copied in the video below:

hmmmโ€ฆ seems the iframe code is broken.

Thanks for the heads up about this @MultiTech_Visions and @Taylor_Felt2 - definitely a bug, will try to keep the thread updated here.

This would be a great solution for me if it does work. Iโ€™m using my in-browser public app as a lead gen click funnel so any type of authorization screen will affect my conversion rate. I thought this was mandatory so maybe appsheet doesnโ€™t want people to get around itโ€ฆ let me know if you get it working.

@Taylor_Felt2 youโ€™re going to see that initial screen no matter what.

As @MultiTech_Visions mentions you cannot get around the privacy screen. It is not authentication.

Yes, this message can be a turn off for some people so I recommend softening the message with one of your own in the above About screen fields. A summarized version of the info that would typically appear in the Privacy details on your website anyway.

Hi @Taylor_Felt2 this is what you can do:

That would be perfect. Iโ€™ll check this out, Thanks!

Hi @Peter itโ€™s still not possible to use a kml as a secondary data layer. Is there any update on this?

This is a really great feature. It helps a lot to show areas on the map for the application Iโ€™ve developed. However, when a user selects a point from my internal data, then wants to click outside that point to deselect it, they wind up selecting the KML polygon areas on the map instead. Is there a way to prevent this behavior so clicks on the background polygons deselect the selected point?

Hereโ€™s an example. Iโ€™ve selected a point and made my edits. Now I need to deselect the point to create another LatLon point, but anywhere I click on the map is one of my KML polygons.

So clicking away from the selected point pops up voting precinct info instead of deselecting the point.

Hi @Carl_Fischer I saw the same. I think there is no workaround when you use Polygons. In Google My Maps you would see the same behavior: Clicking inside a Polygon will open the Polygonโ€™s Info Card.
So I think the only way would be to change the Polygon to a Line. Then the Info Card will open up only if you click on the Line.

Thanks for the suggestion. I found a way to edit the KML so Polygons become lines, but now it just doesnโ€™t load. \shrug I suppose itโ€™s not a critical element of my app.

Dear Sir,

I trying to make it but it does not work.

please can you give me instruction for how can make it!

I 'm using an dynamic connection with mymaps. You can export your map as an KML file and keep it dynamic.
Great option. The only problem is that when i click on a pinpoint the text in the infobox is light-grey and so it is heardly to read.


Hello everybody,

In resume, wich is the solve solution???

Thanks 

Top Labels in this Space