Need to know the procedure for overlaying multiple KML files on a single Google Map that is displayed in the browser. The KML files intended for this can point to different locations. Ex:KML1 for North America & KML2 for Asia. Could anyone help me out in this.
I think you are looking for this:
http://code.google.com/apis/kml/documentation/kml_tut.html#network_links
example:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Folder>
<name>Network Links</name>
<visibility>0</visibility>
<open>0</open>
<description>Network link example 1</description>
<NetworkLink>
<name>Random Placemark</name>
<visibility>0</visibility>
<open>0</open>
<description>A simple server-side script that generates a new random
placemark on each call</description>
<refreshVisibility>0</refreshVisibility>
<flyToView>0</flyToView>
<Link>
<href>http://yourserver.com/map1.kml</href>
</Link>
</NetworkLink>
<NetworkLink>
<name>Random Placemark</name>
<visibility>0</visibility>
<open>0</open>
<description>A simple server-side script that generates a new random
placemark on each call</description>
<refreshVisibility>0</refreshVisibility>
<flyToView>0</flyToView>
<Link>
<href>http://yourserver.com/map2.kml</href>
</Link>
</NetworkLink>
</Folder>
</kml>
You can do it with Google Maps JS API. You need to create overlays with google.maps.KmlLayer for each KML files.
See this example: http://code.google.com/apis/maps/documentation/javascript/examples/layer-kml.html
API Documentation:
http://code.google.com/apis/maps/documentation/javascript/overlays.html#KMLLayers
Related
I'm trying to convert a CSV to XML, which works perfectly fine when I test the map file in Visual Studio as I made sure the XSLT1.0 contains indent="yes". But for some reason when I repeat the steps in my Azure Logic App everything gets exported to one line:
<?xml version="1.0" encoding="utf-8"?><enfinity xsi:schemaLocation="http://www.fakewebsite.com/xml/ns/enfinity/7.1/bc_pricing/impex bc_pricing.xsd" major="6" minor="1" family="enfinity" branch="enterprise" build="build" xmlns="http://www.fakewebsite.com/xml/ns/enfinity/7.1/bc_pricing/impex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dt="http://www.fakewebsite.com/xml/ns/enfinity/6.5/core/impex-dt"><product-price-list id="DEMarkdown" priceType="ES_SalePrice" import-mode="UPDATE"><display-name>DE Markdown</display-name><description /><enabled>true</enabled><priority>1</priority><target-groups><customer-segments><customer-segment id="Everyone" repository-id="WhiteStuff-DE-Anonymous" /><customer-segment id="IG_RegisteredUsers" repository-id="WhiteStuff-DE-Anonymous" /></customer-segments></target-groups><product-price-list-entry sku="433493126" import-mode="REPLACE"><price-scale-table type-code="1" currency="EUR"><valid-from>2021-07-06T00:00:00+00:00</valid-from><valid-to>2099-07-13T00:00:00+00:00</valid-to><price-scale-entries><fixed-price-entry quantity="1" unit=""><value>44.95</value></fixed-price-entry></price-scale-entries></price-scale-table><price-scale-table type-code="1" currency="GBP"><valid-from>2021-07-06T00:00:00+00:00</valid-from><valid-to>2099-07-13T00:00:00+00:00</valid-to><price-scale-entries><fixed-price-entry quantity="1" unit=""><value>39.50</value></fixed-price-entry></price-scale-entries></price-scale-table></product-price-list-entry></product-price-list></enfinity>
I have 2 ways for this
WAY-1
You can use the XML Validation connector before the process which parses the content into the right format.
WAY-2
Just for viewing purposes, you can do a request-response method using Postman then use XML format in order to achieve your requirement.
For those interested, I've found a setting within the Logic App, simply select Apply XSLT output attributes and that's it, no validation needed either!
I have two product XML look like:
1:- product-1.xml
.
.
.
.
<images merge-mode="add">
<image-group view-type="large">
<image path="product-123.jpg" />
</image-group>
</images>
.
.
2:- product-1-1.xml
.
.
.
.
<images merge-mode="add">
<image-group view-type="large">
<image path="product-124.jpg" />
<image path="product-125.jpg" />
</image-group>
</images>
.
.
I am importing both the files and I want to append the images for the same product (PRODUCT123) as
<images merge-mode="add">
<image-group view-type="large">
<image path="product-123.jpg" />
<image path="product-124.jpg" />
<image path="product-125.jpg" />
</image-group>
</images>
but it's not appending the images.
I used merge-mode="merge" also for the same but not getting the result as I expected.
Could anyone help me out that where I am doing wrong?
Sadly, what you want to achieve is currently not supported by the Salesforce B2C Commerce platform.
You cannot split the images of an image group into several files and expect that they will be merged.
Indeed, the file import mode should be MERGE, but what you have tried as element merge-mode="add" is not supported, and you should have received a warning when you have imported the file.
If you look at catalog.xsd schema from the documentation you would see the following under complexType.Product.Images type definition:
<xsd:attribute name="merge-mode" type="simpleType.MergeMode" default="merge" use="optional">
<xsd:annotation>
<xsd:documentation>
Used to control if specified image groups will be merged to or replace the existing image specification.
The values "merge" and "replace" are the only ones supported for the "merge-mode" attribute.
Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not
sensible, because existing image groups will always be removed before importing the image groups
specified in the import file.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
P.S. I would suggest that you look for an alternative solution for merging the data about images before sending it to Salesforce B2C Commerce instance.
Are you using ImportCatalog pipelet? Please check job configuration, import mode should be MERGE.
I am a kml "newbie" trying to attach a balloon to a placemark.
The default behavior of a balloon associated with a placemark is to display text in a box with a tail pointing to the placemark's location after you click on the placemark. I import my kml files into Google Earth online to test. My balloons appear when I click on the placemarks, but I never get the "tail". Instead, the balloons appear in the upper left corner of the screen.
I've been reading about BallonStyle in the kml reference doc:
https://developers.google.com/kml/documentation/kmlreference
I have copied and loaded examples from: https://developers.google.com/kml/documentation/extendeddata
among other places, and the tail never appears.
I wrote this simple kml file that I think SHOULD use the default balloon behavior, but doesn't. The placemark has valid coordinates. What am I missing?
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="Piper">
<IconStyle>
<color>ff0000ff</color>
</IconStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Placemark>
<name>Piper 2018-08-01T16:45:16</name>
<description>Accuracy = 10m</description>
<styleUrl>#Piper</styleUrl>
<Timestamp>
<when>2018-08-01T16:45:16</when>
</Timestamp>
<Point>
<coordinates>-110.766531000,43.851320000</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Thanks for any insights.
I'm trying to add a custom global action to a Flexipage in Salesforce1, but I can't see any button showing up on the bottom of my Flexipage like the tutorial. I'm on API version 32.
<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
<flexiPageRegions>
<componentInstances>
<componentInstanceProperties>
<name>entityName</name>
<value>MUSW__Inspection__c</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>filterName</name>
<value>Mobile_Inspection_List</value>
</componentInstanceProperties>
<componentName>flexipage:filterListCard</componentName>
</componentInstances>
<name>main</name>
</flexiPageRegions>
<masterLabel>Mobile Inspection List</masterLabel>
<quickActionList>
<quickActionListItems>
<quickActionName>New_Inspection</quickActionName>
</quickActionListItems>
<quickActionListItems>
<quickActionName>NewNote</quickActionName>
</quickActionListItems>
</quickActionList>
<type>AppPage</type>
</FlexiPage>
Any thought? All I see on my Flexipage is,
Please make sure you marked the VisualForce page as "Available for Salesforce mobile apps".
I need to add an 'export' function to an existing web app using seam. The purpose is to export search results to a csv file. I have no problem generating a csv, but I do not know how the send the csv back to the user.
I do not want to store the csv on the server because that would be waisted storage space. How could I achieve this in jboss seam?
Use the Document Store Servlet provided by Seam.
Almost copying and pasting from the reference doc, declare the servlet in web.xml like this:
<servlet>
<servlet-name>Document Store Servlet</servlet-name>
<servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Document Store Servlet</servlet-name>
<url-pattern>/seam/docstore/*</url-pattern>
</servlet-mapping>
Then create a export.xhtml file with only <s:resource> tag:
<s:resource xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
data="#{myComponent.csvData}"
contentType="application/vnd.ms-excel"
fileName="#{myComponent.csvFileName}"/>
Generate link for downloading the file in your page with <s:download>:
<s:download src="/csv/export.xhtml">
<h:outputText value="Download CSV"/>
<f:param name="param1" value="somevalue"/>
<f:param name="param2" value="someOtherValue"/>
</s:download>
Finally, implement getCsvData() and getCsvFileName() methods in your component:
// could be byte[], File or InputStream
public InputStream getCsvData() {
// generate data to be downloaded
}
public String getCsvFileName() {
return "myfile.csv";
}
Note that <s:download> propagates conversation (unless you set propagation=none). If you propagate the conversation context probably you won't need to pass any parameter. For large data set it may be preferable to not propagate the conversation and pass parameter to select the data in a request scoped component.
There's a couple of ways:
1) Check the Seam docs for info on using Seam-Excel to programmatically generate your file and then write it out using a mime-type set for CSV - this is all detailed in the docs.
However, I could not get this to work in the latest version of Seam, as it requires a response object, which used to be available from the Seam context but now only returns null.
2) Code the CSV file you want as an Excel xhtml template (see the Seam docs and example projects) and simply render this as normal using an tag.
I do this regularly and it works well, bar the restriction that you cannot supply a filename.
HTH.