palettes of icons in Google Earth (Mac) - macos
(Cross posted from the GE support groups - now defunct?)
Having trouble using the gs:x extensions to use palettes of icons in an icon
group.
I have loaded the appropriate xmlns:gx="http://www.google.com/kml/ext/2.2"
into the kml header but get the message "Unknown type gs:x
on my Macintosh under GE Google Earth 6.0.3.2197
I suspect this has not been implemented on the Mac version - anybody
with experience on this?
Final code was as follows and it fails on the first gx:s line.
It also fails in the same way if I use the now deprecated x (rather than gx:x)
Also, as shown it follows the kml documentation but I think all terminating terms should be of the form /gx:x rather than gx:x/
as shown in the KML reference. Making that change does not help as it never gets to that point anyway.
The header was copied from a GE placemark copied and pasted into the
editor.
Any help appreciated.
Bob J.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2"
xmlns:kml="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<StyleMap id="s_Ic_SP">
<Pair><key>normal</key><styleUrl>#sn_Ic_SP</styleUrl></Pair>
<Pair><key>highlight</key><styleUrl>#sh_Ic_SP</styleUrl></Pair>
</StyleMap>
<Style id="sn_Ic_SP">
<IconStyle>
<scale>1.8</scale>
<Icon>
<href>Icons/Traps.png</href>
<gx:x>0<gx:x/><gx:y>128<gx:y/> <gx:w>64<gx:w/><gx:h>64<gx:h/>
</Icon>
<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
<displayMode>default</displayMode><bgColor>ff00d0ff</bgColor>
<text><![CDATA[<font face="Comic Sans MS" /><table
bgcolor="#ff8000" cellspacing="3" width="160">
<tr bgcolor="#ffff80"><td><b>Sponsor $[name]</b><br/><br/>$
[description]</td></tr></table>]]></text>
</BalloonStyle>
<LabelStyle>
<scale>0.9</scale><color>ff00ffff</color>
</LabelStyle>
<LineStyle><color>ff00ffff</color><width>2.0</width></LineStyle>
<ListStyle>
<ItemIcon>
<href>Icons/Traps.png</href>
<gx:x>0<gx:x/><gx:y>128<gx:y/> <gx:w>64<gx:w/><gx:h>64<gx:h/>
</ItemIcon>
</ListStyle>
</Style>
etc.
Oooops
Seems my problem was a syntax problem
The gx:x set do work correctly. However, they are not operational inside the ItemIcon group as shown in my example. In fact they are ignored in that group.
Thanks for your tolerance of my stupidity
Bob J.
Related
Implementing adchoice for VAST 3.0 Wrapper
I'm trying to add adchoices for VAST 2.0 wrapper using jpeg image using nonlinear element under a creative element in VAST wrapper. I couldnt get it to working from 3 days. Can anybody help me in fixing below code, Below is my code. Thanks in advance. <NonLinearAds> <NonLinear height="200" width="300" minSuggestedDuration="00:00:30"> <StaticResource creativeType="image/png"> https://example.com/image.png </StaticResource> <NonLinearClickThrough> https://example.com </NonLinearClickThrough> </NonLinear> </NonLinearAds> Update: I'm trying to use icons to display adchoices which are supported in VAST3.0/4.0 here is the below example tag i'm using. According to vast 3.0 documentation here https://www.iab.com/wp-content/uploads/2015/06/VASTv3_0.pdf under 2.4.3.2 section icons are supported by both inline and wrappers but my code is working with inline ads but not working with wrapper ads. Am i doing something wrong. Please help me thanks in advance. <VAST version="3.0"> <Ad id="602833"> <Wrapper> <AdSystem>Testing</AdSystem> <VASTAdTagURI> <![CDATA[https://vast.inline.url]]> </VASTAdTagURI> <Impression>http://myTrackingURL/wrapper/impression</Impression> <Creatives> <Creative> <Linear> <VideoClicks> <ClickTracking>http://myTrackingURL/wrapper/click</ClickTracking> </VideoClicks> <Icons> <Icon program="AdChoices" height="15" width="100" xPosition="10" yPosition="20"> <StaticResource creativeType="image/png"> <![CDATA[https://www.amarley.com/skin/frontend/smartwave/porto/images/mini_logo.png.pagespeed.ce.-Dk9UNhwz-.png]]> </StaticResource> <IconClicks> <IconClickThrough> <![CDATA[ http://example.com/more_info ]]> </IconClickThrough> </IconClicks> </Icon> </Icons> </Linear> </Creative> </Creatives> </Wrapper> </Ad> </VAST> I'm using google vast inspector for testing https://developers.google.com/interactive-media-ads/docs/sdks/html5/vastinspector
QuickLink in UML Profile not displaying in Sparx enterprise Architect
I am trying to add a new item to the 'quick link' menu in Sparx Enterprise Architect. I have followed the instructions on the EA website: http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/add_quick_linker_definition_to.html and in despiration I have also tried a vanilla copy of the example from http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/quick_linker_example.html I have a new profile with a new stereotype of 'quick' which extends the metaclass 'Class'. I have added a 'QuickLink' artefact and copied the below entries into it (from the example above): Class,quick,,,,Component,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Component,0,,,,, Class,quick,,,,Component,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Component,0,,,TRUE,, Class,quick,Component,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,, Class,quick,Component,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,, Class,quick,Port,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,, Class,quick,Port,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,, Class,quick,Component,,,Port,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,,, Class,quick,Component,,,Port,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,TRUE,, I have then saved the UML Profile and generated an MDG from it. I have looked in the profile.xml and MDG xml files and in both cases the CSV information appears as I would expect in the QuickLink element: e.g. When I import the MDG, I can create a new diagram, the correct toolbox appears with my 'quick' stereotype on it. When I drag it onto the diagram however and try to create new links, the quicklinks menu is not showing any of my customisations. Is there anythink I am missing here to make this work?
The problem doesn't appear to be the quicklinker definition. I have created a working technology using that definition (below). It is likely that the problem is with the way the technology has been put together, rather than the quicklinks themselves. Hopefully you can see what is different by comparing this to your technology. If not then post your technology and I will take a look. <?xml version="1.0" encoding="windows-1252"?> <UMLProfile profiletype="uml2"> <Documentation id="C5186393-D" name="MyProfile" version="1.0" notes="MyProfile"/> <Content> <Stereotypes> <Stereotype name="quick" notes=""> <AppliesTo> <Apply type="Class"> <Property name="isActive" value=""/> </Apply> </AppliesTo> </Stereotype> </Stereotypes> <TaggedValueTypes/> <QuickLink data="Class,quick,,,,Component,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Component,0,,,,, Class,quick,,,,Component,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Component,0,,,TRUE,, Class,quick,Component,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,, Class,quick,Component,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,, Class,quick,Port,,,,,Dependency,,to,Dependency to,,TRUE,,TRUE,TRUE,,0,,,,, Class,quick,Port,,,,,Dependency,,from,Dependency from,,TRUE,,TRUE,TRUE,,0,,,TRUE,, Class,quick,Component,,,Port,,Dependency,,to,,Dependency to,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,,, Class,quick,Component,,,Port,,Dependency,,from,,Dependency from,TRUE,TRUE,TRUE,TRUE,Port,0,,TRUE,TRUE,, "/> </Content> </UMLProfile>
Adding Images or Thumbnails to Atom 1.0 Entries
This StackOverflow answer suggests that you should use HTML entry content and use a standard <img> tag to link to your images. <content type="html"> <![CDATA[ <a href="http://test.lvh.me:3000/listings/341-test-pics?locale=en"> <img alt="test_pic" src="http://test.lvh.me:3000/system/images/20/medium/test_pic.jpg?1343246102" /> </a> ]]> </content> I have also found something called the Yahoo media extensions here which allows you to add custom additional elements. <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"> <!-- ommitted --> <entry> <!-- ommitted --> <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="path_to_image.jpg" /> </entry> </feed> Google also seems to have its own similar extensions. See here. <?xml version="1.0"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0"> <!-- ommitted --> <entry> <!-- ommitted --> <g:image_link>http://www.google.com/images/google_sm.gif</g:image_link> </entry> </feed> My own intuition tells me I should simply be able to add links to images like so: <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <!-- ommitted --> <entry> <!-- ommitted --> <link rel="enclosure" type="image/png" length="1337" href="http://example.org/image.png"/> </entry> </feed> What is the correct approach for maximum compatibility?
The best practice is to do what Wordpress RSS 2.0 feeds do — if you want your post image to appear in feedly for example, put the <p><img...></p> at the top of the content. My eleventy setup has post header image inside article, but outside content variable's contents which are used in the feed. I solve the problem adding the image back: <item> ... <content:encoded> <![CDATA[<p>{% include "src/components/partials/post-hero-img.njk" %}</p>{{ post.templateContent | textDeletePresentationDivs | htmlToAbsoluteUrls(absolutePostUrl) | safe }}]]> </content:encoded> source in git I checked, neither Atom nor RSS 2.0 feeds have post images set anywhere as standalone tags. They're simply at the top of the article's content. With regards to your examples... The "vanilla" Atom RSS feed has a schema xmlns="http://www.w3.org/2005/Atom" and its documentation is defined in RFC4287. According to it, "vanilla" Atom RSS feed strictly can have <logo> which is the 2:1 ratio image, the logo of the feed. Sadly, it is placed in the root of XML (notice atom:logo in the spec, it's not atom:entry:logo). Practically, this means, you can put a picture of your RSS feed itself, but not per-article. If you do put <logo> inside <entry>, the feed won't pass the validators and post image won't appear in feedly (I tried). Also, spec defines <icon> which is vaguely defined as a small, square image, also placed in the root. Feedly seem to detect the website's favicon anyway, although it doesn't hurt to set this tag up in rss explicitly. That's all there is — Atom spec doesn't officially define a way how to put images per-article. Here's where additional namespaces come in (or RSS 2.0, different spec, different XML). You mentioned xmlns:media="http://search.yahoo.com/mrss/" in example. I tried it, post images won't show in feedly. Plus, spec link http://search.yahoo.com/mrss/ is not showing any specs. Google namespace you quoted, xmlns:g="http://base.google.com/ns/1.0" also doesn't work, post images don't show up in feedly. The link approach, <link rel="enclosure" type="image/png" length="1337" href="http://example.org/image.png"/> would be promising except length is meant to state the filesize in bytes. In Eleventy that's problematic value to get, for example. To sum up, the best practice is put post header image at the top of the content, inside <content>.
Add image to Welcome.aml with Sandcastle
First of, I've searched far and wide about this issue, and it should be working. I want to add a picture to my Welcome.aml with Sandcastle. Inside the Welcome.aml: <section> <title>Short process description</title> <content> <para> A short description </para> <para> <medialinkInLine> <image xlink:href="ShortProcess"/> </medialinkInLine> </para> </content> </section> I've added the image to my media folder and uses the Image ID in xlink:href. But nothing appears. Log files mention it here: Copying images and creating the media map file... C:\blaablaaa\blaaaa\Doc\Doc\Media\ShortProcess.jpg -> C:\blaablaaa\blaaaa\Doc\Doc\Help\Working\Media\ShortProcess.jpg Generating conceptual topic files Anyone got an idea?
I did some documentations for my own projects and tumbled acros a very important fact [cite]... Also, make sure the href ID on the image element matches the ImageId property on the image file in the project explorer window. If you use the Entity References window to list the images in the project, you can drag and drop them from there into the documents and they will be added with the proper element name and ID[/cite] citation taken from Sandcastle discussion forum Usage in my latest demo project For further details you may have a look at mediaLink description at sandcastle itself.
Apperantly medialinkInLine didn't work for me. Even though it worked for a co-worker. <section> <title>Short process for BladeSet</title> <content> <para> A rough description of the BladeSet application. </para> <mediaLink> <image xlink:href="Short process for BladeSet"/> </mediaLink> </content> </section>
Make Cocoa application respond to simple AppleScript command
I am trying to add a trivial AppleScript support to a Cocoa application. The application performs a check periodically and I just want to be able to tell it to perform it on demand. I am trying to follow the SimpleScriptingVerbs Apple example. I have subclassed NSScriptCommand as follows: Header: #import <Cocoa/Cocoa.h> #interface rdrNotifierUpdateCommand : NSScriptCommand { } -(id)performDefaultImplementation; #end Implementation: #import "rdrNotifierUpdateCommand.h" #import "rdrNotifierAppDelegate.h" #implementation rdrNotifierUpdateCommand -(id)performDefaultImplementation { NSLog(#"Works at last"); [((rdrNotifierAppDelegate *)[[NSApplication sharedApplication] delegate]) checkForNewItems]; // This just fires the timer return nil; } #end My .sdef file goes as follows (and the problem seems to be there, but I cannot find it): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> <dictionary title="Dictionary" xmlns:xi="http://www.w3.org/2003/XInclude"> <xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" xpointer="xpointer(/dictionary/suite)"/> <suite name="rdrNotifier Suite" code="rdrN" description="rdrNotifier application specific scripting facilities."> <command name="do update" code="rdrNUpdt" description="Check for new items"> <cocoa class="rdrNotifierUpdateCommand"/> </command> </suite> </dictionary> The Info.plist is set up appropriately. But, when I try to run the following script in AppleScript editor: tell application "rdrNotifier" do update end tell I receive an error about variable "update" not being defined. I can open the dictionary for my application from AppleScript Editor (i.e. it is successfully registered). Edit: Found a solution The problem was indeed in the sdef file: I was not specifying that the application can reply to the command. My final definition goes as follows (Obj-C code unchanged): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> <dictionary title="Dictionary" xmlns:xi="http://www.w3.org/2003/XInclude"> <!-- I have removed the standard suite as the application does not open, print... --> <suite name="rdrNotifier Suite" code="rdrN" description="rdrNotifier application specific scripting facilities."> <command name="do update" code="rdrNUpdt" description="Check for new items"> <cocoa class="rdrNotifierUpdateCommand"/> </command> <class name="application" code="Capp"> <cocoa class="NSApplication"/> <responds-to name="do update"> <!-- Note you need to specify a method here, although it is blank --> <cocoa method=""/> </responds-to> </class> </suite> </dictionary> Any improvements/tips/criticisms are still welcome.
Thanks for making the effort of adding applescript support to your app! Just a quick observation / criticism: When constructing terminology, by all means include spaces, but if that terminology takes the form of 'verb noun' (like 'do update') appleScripters will be irritated if the noun 'update' is not a properly modelled object, and if 'do' is not a proper command. I would argue that 'do' is a poor choice for a command name, because it is very vague. What's wrong with just using 'update' as the command? (i.e. treat it as a verb). This issue is treated in some detail by Apple's own technote 2106 (currently here), which you definitely should read and digest if you hope to please your AppleScripting user community. Apple themselves are not beyond stupid terminology choices such as updatePodcast and updateAllPodcasts (in iTunes). These are stupid choices because (according to tn2106) they contain no spaces, and because the better choice would be to have a proper podcast class and then have an update command which could be used on an individual podcast, all podcasts, or a particular chosen set of podcasts.