function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vasvas 

Viewing KML file in visualforce page

I need to display KML overlays on Google map embedded in a Visualforce page. The KML files are stored either in a custom object/field or in CRM content.

I googled and came across some gadgets that can be embedded in a page but they seem to use an external service that typically accepts a URL of the KML file which I'm not sure works in my situation.

 

Can someone pls help me get started on this? Some code samples would be very helpful.

 

Thanks

gtuerkgtuerk

I've gotten KML overlays to work on a Google Map embedded in a VF page using Flex.  There is a GoogleMapsUtility swc that allows you to parse the KML.  The way I got it working was with using Box.net to host the KML and using FileLoader to load it from the hosted url.  If you're open to that approach I can try to dig something up

vasvas

Thanks for your response. My files are stored within Salesforce, they can't be hosted anywhere else.

I found a viewer at http://wakaba.c3.cx/kmlview which accepts the kml content as string and displays the map. I could probably use URL post, but it doesn't work with my kml files. Even if it did, not sure if I could rely on that site. Its not even https.

 

Pls help. Thanks