I've defined a KML layer for my Maps API mashup. The boundary poly is showing up fine, but I can't get it to honor the styling. Any idea why it's not picking up on my Styles element.
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="defaultStyles">
<PolyStyle>
<color>7dff0000</color>
</PolyStyle>
<LineStyle>
<width>3</width>
</LineStyle>
</Style>
<Placemark id="myBoundary">
<name>Boundary</name>
<styleUrl>#defaultStyles</styleUrl>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>-0.981550665136288,52.204573365561728 ....
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Document>
</kml>
The KML is being cached by Google's servers. Add a query parameter to the URL to bust the cache. (http://new.bugbrooke-village.co.uk/assets/kml/bugbrooke-boundary.kml?a=0)
Related
I successfully submitted a batch geocoding request...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SearchBatch xmlns:ns2="http://www.navteq.com/lbsp/Search-Batch/1">
<Response>
<MetaInfo>
<RequestId>CAOxHo4SFaj17sSB2UyTxeoDKHZR77f9</RequestId>
</MetaInfo>
<Status>accepted</Status>
<TotalCount>0</TotalCount>
<ValidCount>0</ValidCount>
<InvalidCount>0</InvalidCount>
<ProcessedCount>0</ProcessedCount>
<PendingCount>0</PendingCount>
<SuccessCount>0</SuccessCount>
<ErrorCount>0</ErrorCount>
</Response>
</ns2:SearchBatch>
And when I GET status, the job is completed....
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SearchBatch xmlns:ns2="http://www.navteq.com/lbsp/Search-Batch/1">
<Response>
<MetaInfo>
<RequestId>CAOxHo4SFaj17sSB2UyTxeoDKHZR77f9</RequestId>
</MetaInfo>
<Status>completed</Status>
<JobStarted>2019-10-31T00:11:58.000Z</JobStarted>
<JobFinished>2019-10-31T00:12:26.000Z</JobFinished>
<TotalCount>13291</TotalCount>
<ValidCount>13291</ValidCount>
<InvalidCount>0</InvalidCount>
<ProcessedCount>13291</ProcessedCount>
<PendingCount>0</PendingCount>
<SuccessCount>13291</SuccessCount>
<ErrorCount>0</ErrorCount>
</Response>
However, when I then go to get the response, I get 403 forbidden
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
</body>
</html>
I am using the endpoint outlined here: https://developer.here.com/documentation/batch-geocoder/topics/example-get-results.html
In this case you need to pass correct apikey to download the result.
https://batch.geocoder.ls.hereapi.com/6.2/jobs/CAOxHo4SFaj17sSB2UyTxeoDKHZR77f9/result?apiKey={}
Also refer https://developer.here.com/documentation/batch-geocoder/dev_guide/topics/example-get-results.html
I am tryng to upload a picture and store it in exist-db but i get the next error when opening the stored picture:
Cannot open specified file: Could not recognize image encoding.
I have tryed the next code with a small adjustment for normal txt files and it works fine but not with pictures.
picture.xhtml
<?xml-model href="http://www.oxygenxml.com/1999/xhtml/xhtml-xforms.nvdl" schematypens="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<title/>
<xf:model>
<xf:instance xmlns="">
<data>
<image xsi:type="xs:base64Binary"/>
</data>
</xf:instance>
<xf:submission id="save" action="save.xquery" method="post"/>
</xf:model>
</head>
<body>
<xf:upload ref="image">
<xf:label>Upload Photo:</xf:label>
</xf:upload>
<br/>
<xf:submit submission="save">
<xf:label>Save</xf:label>
</xf:submit>
</body>
</html>
save.xquery
xquery version "3.1";
declare option exist:serialize "method=xhtml media-type=text/html indent=yes";
let $login:=xmldb:login('xmldb:exist:///db/apps/places','admin','admin')
(: The small adjusment i refer is just to change file extension from .jpeg to .txt :)
return xmldb:store("/db/apps/places/",concat("pic",".jpeg"), util:base64-decode(request:get-data()//image))
If you want to store images to the eXist-db you should probably replace xmldb:store() with xmldb:store-as-binary().
I'm unable to configure translations. My config.yml has (among others) this entry:
easy_admin:
entities:
Blog:
label: app.blog
class: AppBundle\Entity\Blog
I've also created a translation resorce: messages.es.xliff with this entry:
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="es" target-language="es" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="app.blog">
<source>app.blog</source>
<target>Blog</target>
</trans-unit>
</body>
</file>
</xliff>
but the translated literal doesn't appear in the left menu.
Thank you very much for your help.
At last I've changed the name of translation ressource to EasyAdminBundle.es.yml and now everything works fine.
Ensure you have the translator service enabled. In app/config/config.yml:
framework:
translator: { fallbacks: ["en"] }
I am using Symfony2, Twig and xliff based translations.
Now, I want to show text based on a numerical value which is between [-Inf,Inf]. To do that, I use transchoice.
My problem: I want to display 7 days ago if count=-7. However, I get -7 days ago. I can't use twig filters like abs inside transchoice fields, right? How do I remove the leading minus sign.
Here is my message.en.xliff...
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="1">
<source>todo.days-difference</source>
<target>{0} today|{1} tommorow|]1,14] %count% days before|]14,Inf] far away|{-1} yesterday|[-14,-1[{{ count }}%count% days after|[-Inf,-14[ long after</target>
</trans-unit>
</body>
</file>
</xliff>
passing the absolute value of the count variable as argument solves the problem:
{{ "todo.days-differences"|transchoice(task.getDueDateDifference(), {'%count_abs%': task.getDueDateDifference()|abs}) }}
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="1">
<source>todo.days-difference</source>
<target>{0} today|{1} tommorow|]1,14] %count_abs% days before|]14,Inf] far away|{-1} yesterday|[-14,-1[ %count_abs% days after|[-Inf,-14[ long after</target>
</trans-unit>
</body>
</file>
</xliff>
I'm trying to hook up a blog with some xml namespaces and xml stylesheets.
The ugly way that I'm doing this currently looks like so:
!!! XML
= partial('xmlstyle')
%channel
......blah.....
= partial('xmlend')
where
_xmlstyle.xml.erb looks like:
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>
<?xml-stylesheet type="text/css" media="screen"
href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
_xmlend.xml.erb looks like:
</rss>
Should I just stick with erb for now?
There has to be a way of doing this in haml right?
Haml doesn't have syntax for XML stylesheet directives, but there's no reason you can't include them directly. As for the xmlns:blah attributes, you can either use strings as the attribute names, like so:
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>
%rss{"xmlns:content" => "http://purl.org/rss/1.0/modules/content/",
"xmlns:wfw" => "http://wellformedweb.org/CommentAPI/",
"xmlns:dc" => "http://purl.org/dc/elements/1.1/",
"xmlns:atom" => "http://www.w3.org/2005/Atom",
"xmlns:sy" => "http://purl.org/rss/1.0/modules/syndication/",
"xmlns:slash" => "http://purl.org/rss/1.0/modules/slash/",
"xmlns:feedburner" => "http://rssnamespace.org/feedburner/ext/1.0",
:version => "2.0"}
%channel
blah
You could also use HTML-style attributes with ():
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>
%rss(xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"
version="2.0")
%channel
blah