I'm developing a fusion table map with filled areas. On the Google Fusion Table web app it works properly ( link ). But when I try to embed it, all the areas come out to be all red ( link ).
Why is this happening? I've tried to open the site from another computer - but same issue.
Thanks,
Elisa
This thread in the Fusion Tables Users Group (and the thread referenced in it) is probably applicable. There are now multiple styles available in the "new" look, if you don't reference the correct one, you won't get the style you configured.
You may need to set the style id appropriately. This query sets the style id to 2:
var layer = new google.maps.FusionTablesLayer({
query: {
select: locationColumn,
from: tableId
},
styleId: 2,
map: map
});
This is described in the Fusion Tables Documentation
I solved by rolling back to the Classic Look. Please, team, check what is going on with the new look.
Related
I am trying to exclude certain features from being clustered, by using the geometryfunction as described in the API here:
http://openlayers.org/en/latest/apidoc/ol.source.Cluster.html
It is recommended to return null, when the feature should not be considered for clustering. I would expect that to mean, that the feature would still be shown, but not included in clusters. What i see is, that the feature is not shown at all. Is this to be expected?
IconLayer.clusterSource = new ol.source.Cluster({
distance: 40,
geometryFunction: this.clusterFunction,
source: mySource,
});
private clusterFunction(icon: Icon) {
return icon.geo.isMoving ? null : icon.getGeometry();
}
Seems like it cant be done that way. See this answer on github:
https://github.com/openlayers/ol3/pull/4917#issuecomment-224875452
As describe in the above link, a possible solution is to create a 2nd vector layer and show the non clustered features there.
EDIT: For the record i ended up creating two vector layers. But instead of using geometryFunction to disable rendering on the first layer, i simply removed the feature in question from the source of the first layer and added it to the second.
I'm trying to set the Visitor ID in Adobe Analytics through DTM.
Above the s_code I have:
var visitor = new Visitor("xxxx")
visitor.trackingServer = "xxx.xx.xx.omtrdc.net"
I've created a data element where the legacy code used to call the
Visitor.getInstance("xxxx");
and set the Visitor ID to %Visitor ID%
That's not working however, and my visitor ID is always just set to %Visitor ID% and obviously not reading any values. I'd really appreciate any input that someone can give me.
Thanks,
Mike
The Visitor ID pops s.visitorID and is in general related to visitor id, but is not the same as s.visitor which is what gets popped for the VisitorAPI integration. DTM does not currently have a built-in field for the s.visitor variable, so you will have to set it yourself within the config, either in the Library Management code editor (assuming you are opting to c/p the core lib and not the "Managed by Adobe" option) or else in the Custom Page Code section.
Since you are popping it in a data layer first, you can reference the data layer like this:
s.visitor = _satellite.getVar('Visitor ID');
NOTE: A separate potential issue you may have is with whether or not the Visitor object is available for your data element. Since data elements are the first thing to be evaluated by DTM, you will need to ensure that the VisitorAPI.js library is output before your top page DTM script include.
If this is a problem for you, or if you are wanting to host VisitorAPI.js within DTM, then you may need to adjust where you are popping that stuff. For example, place the VisitorAPI core code above the custom code as the first stuff within the data element, before:
var visitor = new Visitor("xxxx") visitor.trackingServer = "xxx.xx.xx.omtrdc.net
Or, don't use the data element at all. Instead, put the VisitorAPI code within the Adobe Analytics custom code or core lib section and pop all that stuff (aboove the s.visitor assignment). Or a number of other methods; point is, VisitorAPI stuff must be loaded before the data element can make use of it, same as it must be loaded before Adobe Analytics can make use of it.
So DTM is changing pretty fast and furious right now. They have a "Marketing Cloud Service ID" that works well. Before I used that, however, I did find a way to fix the code. Crayon Violent was right, as usual, that the problem was that the script wasn't available yet. I fixed this by putting the following code in between the VisitorAPI.js and the AppMeasurement stuff in the DTM managed library.
var aA = new AppMeasurement();
aA.visitorNamespace="companyname";
aA.visitor = Visitor.getInstance("companyname");
In addition, there were also some issues using my localhost for testing while trying to see if I had this correct or not. If you are having issues and think you have it correct, it may be worthwhile to elevate it to a different environment.
I am fairly new to Umbraco and I am wondering where I should put pieces of random data.
I have a lot of experience with Sitecore, used it for several years, I am certified etc etc. But now I have to build something with Umbraco. At a first glance Umbraco looks inferior to Sitecore in every way, but I might be wrong about that.
So what I am wondering is, where should I put non-browsable pieces of data that are visible on several places throughout the website? I'd like to create data items in Umbraco for things like Testimonials, Offices? I'd like to have a centralized place in Umbraco where they can be maintained and reference them from a page node. But the way it looks now is that everything has to be on the page node. Which is sort ok, for your average family webpage.
Could someone please shed some light on this?
You could create another node under the man content and call it site settings and store them there that way all pages under the home page are just visible pages on the front end and all data nodes are in a separate area.
There is one property in umbraco that you can add to document types and name it "umbracoNaviHide" (for alias, the name can be anything). This allows wires in automatically to the .IsVisible() method.
var children = Model.Content.Children.Where(x => x.IsVisible());
I find this situation to be very frequent, think of slideshows. When I make an Umbraco website, under my root node I normalle havea Slideshow document type (that contains slides) and I programmatically traverse those to build the slideshow on the home page for example. This Slideshow document has that "umbracoNaviHide" property and I skip it from my menus either using the .IsVisible() method or by manually skipping specific document types.
var menuItems = Model.Content.Children.Where(x => x.DocumentTypeAlias != "Slideshow" && x.DocumentTypeAlias != "Search");
On the other hand, if you are looking for "labels", you can look at "Dictionnary" items under the "Settings" tab.
To directly answer your questions, I reccomend putting non-browsable pieces of data as children of the relevant browsable content node. (But there are other valid ways to do this, it really is up to you and what's best for your content editors.)
Hope this helps.
I'm trying to modify this code example for dynamic info windows to work for images instead of text:
https://developers.google.com/fusiontables/docs/samples/change_infowindow_content
I know that I can use this:
text
to make the images come up as links that open a new page using the Fusion Table custom InfoWindow UI, but some of the cells in my Fusion Table have an image URL, and others are empty. I want the InfoWindow to leave out the image link if there is no URL in the cell. Since I can't code this using the Fusion Table UI, I was wondering if it is possible to use the Fusion Tables Layer in the Google Maps API and modify this section of code:
// If the delivery == yes, add content to the window
if (e.row['delivery'].value == 'yes') {
e.infoWindowHtml += "Delivers!";
}
to test for the image URL instead testing for "yes"?? I would like the InfoWindow to display the link to the image if it is there, and I would like the link to be left out if the cell is empty.
Here is a link to my Fusion Table:
https://www.google.com/fusiontables/DataSource?docid=15wosKAeHC0gcpU_N6UPbxPL09RrEBKlQNEaCmnU#map:id=3
I would like to test all cells in the "y2012" column.
Any ideas??
You can also use what we call dynamic templating for the info windows. This lets you Closure Template syntax in an info window, including exactly your case of leaving out empty fields.
This should work in a click event listener on the layer:
// If the y2012 != "", add open the picture
if (e.row['y2012'].value != '') {
window.open(e.row['y2012'].value);
}
example
The scenario:
I have an ApEx page which pulls a record from a table. The record contains an id, the name of the chart (actually a filename) and the code for an image map as an NVARCHAR2 column called image_map.
When I render the page I have an embedded HTML region which pulls the image in using the #WORKSPACE_IMAGES#&P19_IMAGE. substitution as the src for the image.
Each chart has hot spots (defined in the image_map html markup) which point to other charts on the same ApEx page. I need to embed the:
Application ID (like &APP_ID.)
Session (like &APP_SESSION.)
My problem:
When I try to load the &APP_ID as part of the source into the database it pre-parses it and plugs in the value for the ApEx development app (e.g. 4500) instead of the actual target application (118).
Any help would be greatly appreciated.
Not a lot of feedback - guess I'm doing something atypical?
In case someone else is trying to do this, the workaround I ended up using was to have a javascript run and replace some custom replacement flags in the urls. The script is embedded in the template of the page and assigns the APEX magic fields to local variables, e.g.:
var my_app_id = '&APP_ID';
Not pretty, but it works...
Ok - I think I've left this open long enough... In the event that anyone else is trying to (mis)use apex in a similar way, it seems like the "apex way" is to use dynamic actions (which seem stable from 4.1.x) and then you can do your dynamic replace from there rather than embedding js in the page(s) themselves.
This seems to be the most maintainable, so I'll mark this as the answer - but if someone else has a better idea, I'm open to education!
I found it difficult to set a dynamic URL on a link to another page - directly - attempting to include the full URL as an individual link target doesn't work, at least in my simplistic world, I'm not an expert (as AJ said: any wisdom appreciated).
Instead, I set individual components of the url via the link, and a 'Before Header' PL/SQL process on the targeted page to combine the elements into a full url and assign it to the full url page-item:
APEX_UTIL.set_session_state(
'PG_FULL_URL',
'http...'||
v('PG_URL_COMPONENT1')||
v('PG_URL_COMPONENT2')||
'..etc..'
);
...where PG_FULL_URL is an item of Type 'Display Image', 'Based On' 'Image URL stored in Page Item Value'.
This is Apex 5.1 btw, I don't know if some of these options are new in this release.