I've created a program in Java to create a KML file. The output is this:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Placemark>
<name>Evidence File</name>
<description>London</description>
<Point>
<coordinates>51.522416,-0.131836,0<coordinates>
</Point>
</Placemark>
</kml>
However, when I import it into Google maps - I have the error:
We could not finish uploading your file. No changes have been made to
the map.
Can anyone see any errors that I'm missing?
You're closing coordinates tag is missing a '/', i.e. it should be:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Placemark>
<name>Evidence File</name>
<description>London</description>
<Point>
<coordinates>51.522416,-0.131836,0</coordinates>
</Point>
</Placemark>
</kml>
Related
I am using React and would like to use the data within the .env file and insert it into my .xml file.
Is this achievable somehow, could not find anything useful on the net?
The file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
<!--IMPORTANT! Id must be unique for each add-in. If you copy this manifest ensure that you change this id to your own GUID. -->
<Id>c6890c26-5bbb-40ed-a321-37f07909a2f0</Id>
<Version>1.0</Version>
<ProviderName>Contoso, Ltd</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Northwind Traders Excel" />
<Description DefaultValue="Search Northwind Traders data from Excel"/>
<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" />
<AppDomains>
<AppDomain>https://www.northwindtraders.com</AppDomain>
</AppDomains>
<DefaultSettings>
<SourceLocation DefaultValue="https://www.contoso.com/search_app/Default.aspx" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
</OfficeApp>
And instead of the lets say Id property i would like to have some preset value from .env.
I have an office 365 account with the following accounts :
One main user: mainuser#company.onmicrosoft.com
Another user: someuser#company.onmicrosoft.com
someuser#company.onmicrosoft.com has shared his calendar with mainuser#company.onmicrosoft.com
Then I execute the following EWS operation (through mainuser#company.onmicrosoft.com) to get the calendar permissions set for someuser#company.onmicrosoft.com
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010"/>
</soap:Header>
<soap:Body>
<GetFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<FolderShape>
<t:BaseShape>Default</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="folder:PermissionSet"/>
</t:AdditionalProperties>
</FolderShape>
<m:FolderIds>
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>someuser#company.onmicrosoft.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:FolderIds>
</GetFolder>
</soap:Body>
</soap:Envelope>
Everything is working fine, as I get a response looking like this :
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="56" MinorBuildNumber="13" Version="V2017_07_11"/>
</s:Header>
<s:Body>
<m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetFolderResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:CalendarFolder>
<t:FolderId Id="some-folder-id"/>
<t:DisplayName>Calendar</t:DisplayName>
<t:TotalCount>67</t:TotalCount>
<t:ChildFolderCount>2</t:ChildFolderCount>
<t:PermissionSet>
...
</t:PermissionSet>
</t:CalendarFolder>
</m:Folders>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope>
Except when someuser#company.onmicrosoft.com shares his calendars with an external contact, then when I execute the same request I suddenly get this response error :
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="20" MajorBuildNumber="56" MinorBuildNumber="13" Version="V2017_07_11"/>
</s:Header>
<s:Body>
<m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetFolderResponseMessage ResponseClass="Error">
<m:MessageText>Access is denied. Check credentials and try again., Can't look up the requested Entry ID.</m:MessageText>
<m:ResponseCode>ErrorAccessDenied</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Folders/>
</m:GetFolderResponseMessage>
</m:ResponseMessages>
</m:GetFolderResponse>
</s:Body>
</s:Envelope>
I don't understand why does Office 365 return an EWS error instead of filtering the data which we should not have access to... We should be able to get the calendar permissions concerning the internal organization regardless of any external calendar sharing.
Anyone having the same issue or info about scheduled resolution ?
Is there any documentation why does the google caldav api ignores this request.
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-query xmlns:d="DAV:"
xmlns:C="urn:ietf:params:xml:ns:caldav"
xmlns:A="http:/ /apple.com/ns/ical/">
<d:prop>
<d:getetag/>
<C:calendar-data/>
</d:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="UID">
<C:text-match collation="i;octet">xxxxxxxxxxxx</C:text-match>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
It returns every event but it should return only the one i requested in the filter.
I can only filter the events with
<C:time-range start="20160326T230000Z" end="20160430T220000Z"/>
but everything else is just ignored.
I find another solution to get only one event by uid with caldav api google.
I use href url of the event like $href="https://apidata.googleusercontent.com/caldav/v2/IDCalendar/events/**uid.**ics
And i query with :
<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-multiget xmlns="DAV:"mlns:C="urn:ietf:params:xml:ns:caldav">
<prop><getetag/><C:calendar-data/></prop>
<href>$href</href>
</C:calendar-multiget>
and i get only the event with UID :) .
Dam
but Google CalDAV supports calendar-multiget, where you can use same url pattern
https://icalendar.org/CalDAV-Access-RFC-4791/7-9-caldav-calendar-multiget-report.html
Example:
<?xml version='1.0' encoding='utf-8'?>
<C:calendar-multiget xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:D="DAV" xmlns:I="http://apple.com/ns/ical/">
<ns0:prop xmlns:ns0="DAV:">
<ns0:getetag/>
<C:calendar-data/>
</ns0:prop>
<ns0:href xmlns:ns0="DAV:">/caldav/v2/[calendar_id]/events/[UID]</ns0:href>
</C:calendar-multiget>
with response
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:ical="http://apple.com/ns/ical/">
<D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
<D:href>/caldav/v2/[calendarID]/events/[UID]</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop>
<D:getetag>"63701474571"</D:getetag>
<caldav:calendar-data>BEGIN:VCALENDAR
.....
</caldav:calendar-data>
</D:prop>
</D:propstat>
</D:response>
</D:multistatus>
I have the following Google Map located at :
http://www.ticketrich.com/uk-days-out-guide/
I am using a WP Plugin that uses shortcode to initiate the map with
[map kml=http://www.ticketrich.com/map5.kml]
This is the contents of the kml file :
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.google.com/earth/kml/2">
<Document>
<Folder>
<name>Folder.kml</name>
<open>1</open>
<description>
A folder is a container that can hold multiple other objects
</description>
<Placemark>
<name>Alton Towers</name>
<description>Alton Towers Information</description>
<Point>
<coordinates>-1.891,52.9898,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Chessington World of Adventures</name>
<description>Chessington World of Adventures Information</description>
<Point>
<coordinates>-0.31539,51.35013</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Banqueting House</name>
<description>Banqueting House</description>
<Point>
<coordinates>-1.0968,53.8937</coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml>
The problem is that it is only showing one of the placemarks. Whatever I've tried, I cannot get them all working. Can anyone see what the problem is?
I see a bunch of placemarks on the map at http://www.ticketrich.com/uk-days-out-guide/ although it seems to be using a different KML than the one you mention.
As for http://www.ticketrich.com/map5.kml (which currently has the same code as posted in your question), it seems to be fine when viewed with google maps: http://maps.google.com?q=http://www.ticketrich.com/map5.kml so I assume it would also work with your wordpress site. If it still is not working can you create a page that links to this kml so we can take a look?
I'm trying to spit out XML from an array.
So it almost work except that now I'm seeing this error "Resource interpreted as document but transferred with MIME type application/xml."
When I look at the source, what is being printed is
<?xml version="1.0" encoding="UTF-8" ?>
<response>
...
</response>
<?xml version="1.0" encoding="utf-8" ?>
How do I get rid of that second
<?xml version="1.0" encoding="utf-8" ?>
Seems like that automatically gets added.
This is the url I have constructed /services/config.xml
Thanks,
Tee
Your view template should be located in the xml subfolder
/app/views/services/xml/config.ctp
The xml tag <?xml version="1.0" encoding="utf-8" ?> is then automatically rendered by the cake framework, so you should NOT have this tag in you config.ctp template. All you need to do is render your <response></response>.
Also, your services controller should render the content type HTTP header in the afterFilter:
function afterFilter()
{
$this->header('Content-Type: application/xml');
}
Good luck!