i searched enough and didn't find any way to remove the sea routes from a port to another, what featureType should i use on map options?
This seems to remove ferry lines; are those your concern?
[
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{ "visibility": "off" }
]
}
]
It also removes other "transit lines" on the ground. which may be undesirable.
Related
When using Google Charts engine and producing a column chart, the Chart Settings -> Series Settings -> Number Format formatter in the chart editor is applied in the Chart Preview area in the wp admin panel but is not applied in the final rendered chart in my wp website page when using the following Manual Configuration:
{
"vAxes": {
"0": {
"title": "Notional Advised (bn)",
"ticks": [10, 30, 50],
"titleTextStyle": {"italic": "false"},
"gridlines": {"color": "light-gray"},
"maxValue": 50,
"format": "$#"
},
"1": {
"title": "Clients Advised",
"ticks": [10, 30, 50],
"titleTextStyle": {"italic": "false"},
"gridlines": {"color": "light-gray"},
"maxValue": 50
}
},
"series": {
"0": {
"targetAxisIndex": "0",
"color": "#b7d988"
},
"1": {
"targetAxisIndex": "1",
"color": "#aedeea"}
},
"italic": "false",
"fontName": "Arial",
"fontSize": 16,
"hAxis": {
"tickColor": "white"}
}
I've looked for a manual configuration option to get the series' number formatting back, but haven't come across anything in Google Charts' docs: https://developers.google.com/chart/interactive/docs/gallery/columnchart#dual-y-charts
Any ideas or workarounds?
NOTE: I've opened this as a potential issue on Visualizer's github repo (https://github.com/Codeinwp/visualizer/issues/542) in case it is a legitimate bug, but hoping for some interim guidance :)
Thanks!
These two questions are all about the AdaptiveCard Botframework.
Q1: I have set the default placeholder value in the adaptivecard :text1, but after triggering the event, the placeholder cannot be displayed correctly , the placeholder was blank. There is no hint information(text1) in the placeholder. And even I copied the MS sample code to my source, it still not working. I have tried in the Chrome the Firefox and also in IE11, but all failed.
The placeholder was blank
MS samplecode
MS sample linkage
Q2: I have set the width for two columns in the columnset using the adaptivecard(one was set as 40 and another one was set as 10), but it seems not working. The grid was not displayed correctly.
My source
Width limit seems not working
[
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "Test",
"weight": "bolder",
"size": "medium"
},
{
"type": "ColumnSet",
"spacing": "none",
"columns": [
{
"type": "Column",
"width": 40,
"items": [
{
"type": "Input.ChoiceSet",
"id": "country",
"style": "compact",
"placeholder": "Country",
"value": "1",
"choices": [
{
"title": "UnitedStates",
"value": "US"
}
]
}
]
},
{
"type": "Column",
"width": 10,
"items": [
{
"type": "Input.Number",
"placeholder": "text1",
"min": 0,
"id": "Text1"
}
]
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Button"
}
]
}
}
]
Q1:
The placeholder value is rendered depending on the host renderer. What you can see in this image, is a comparison of several different hosts, and you can see that two of them do render the placeholder.
Q2:
The columns are correctly set and the columnset does render correctly.
What you can see here is that columns width in numeric format is a % of overall width, after auto and stretch column widths have been taken into consideration
In the following, your first column is set to Auto, and the second remains at 10
The second column takes up the entire space because AUTO brings the first column to the slimmest width it can be rendered at.
Visualisers in different hosts may show this differently, but the certainly are intended to be the same regardless of the host.
Hope this helps.
I am using leaflet draw to create polygons.
My requirement is when a user draws a polygon ,it should not intersect/overlap with existing polygons.
I have used point in polygon leaflet to detect if point falls within the polygon and it is working,
but the problem is i am not able to detect if a line crosses another polygons.In this case points lie outside the existing polygons but overlapping exists.
Below attached image can give a better picture!
You can also probably use Turf.js. Turf is a new js GIS engine developed by the guys at Mapbox.
Here are few examples that may do the job:
Turf Intersects
Turf Overlaps
In leaflet.draw, you can pass options to individual draw handlers. One of them allowIntersection is a boolean type that "Determines if line segments can cross."
Your options would look something like this (excerpted from the leaflet.draw example config):
var options = {
position: 'topright',
draw: {
polygon: {
allowIntersection: false, // Restricts shapes to simple polygons
drawError: {
color: '#e1e100', // Color the shape will turn when intersects
message: '<strong>Oh snap!<strong> you can\'t draw that!' // Message that will show when intersect
},
shapeOptions: {
color: '#bada55'
}
},
},
edit: {
featureGroup: editableLayers, //REQUIRED!!
remove: false
}
};
var drawControl = new L.Control.Draw(options);
map.addControl(drawControl);
You can probably also use Terraformer Core, which is an open-source project done by the folks at ESRI. You would probably do something like this:
var polygon = new Terraformer.Primitive({
"type": "Polygon",
"coordinates": [ [ [ -101.46972656250001, 34.125447565116126 ],
[ -100.85449218750001, 33.760882000869195 ],
[ -101.09619140625, 33.19273094190692 ],
[ -102.12890625000001, 33.137551192346145],
[ -102.19482421875, 33.63291573870479 ],
[ -101.46972656250001, 34.125447565116126 ] ] ] });
var intersects = polygon.intersects({
"type": "Polygon",
"coordinates": [ [ [ -103.32539, 30.58608 ], [ -102.32083, 29.87894 ], [ -103.32539, 30.58608 ] ] ] });
// intersects is a bool.
I am trying to style the map which shows the directions of all roads without the road numbers on them.
{
featureType: "road.highway",
elementType: "labels.icon",
stylers: [
{color:"#979897"},
{ lightness: 50 },
{ visibility: "off" }
]
},
But this removes the directions on the road as well the numbers.I want to show only the directions without the highway numbers.
This code removes all icons as well as labels. I am not sure what you mean by directional arrows, is this an additional layer you have?
[
{
"featureType": "road",
"elementType": "labels",
"stylers": [
{ "visibility": "off" }
]
}
]
There's a very useful styling tool which allows you to visually tweak map settings, which then spits out the JSON you need for your settings:
https://mapstyle.withgoogle.com/
Jeremy's answer will remove labels from all roads, including highways, arterial roads and local roads. I suspect you only want to hide highway numbers, so use:
[
{
"featureType": "road.highway",
"elementType": "labels",
"stylers": [
{
"visibility": "off"
}
]
}
]
(This will also hide highway labels though).
You can also remove labels for arterial and local roads separately, if desired, by adding additional JSON objects using the following as the "featureType":
road.arterial
road.local
We are searching for a way to set the styles on google v3 map so that a given feature - such as water - is transparent (ie shows through to the background beneath the holding div)... ?
We have tried with setting the styling with something like this:
var styles = [
{
featureType: "water",
stylers: [
{ color: none }
]
}]
map.setOptions({styles: styles});
but this simply sets the color to the map default which is light blue... when what we want is to see the background layer underneath the whole map...
thanks
Check out the Styled Maps Wizard (works best in chrome). You can play with all options. So maybe this is what you need:
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{ "visibility": "off" }
]
}
Sadly it seems that opacity is not a supported styler.