When we search route through Google Map web site, like this route:
http://goo.gl/maps/2mg8
Google Map will draw the route with nice style, something like as transparent light blue.
Now I want to simulate that style, something like,
new google.maps.Polyline({
path: routePath,
strokeColor: "#0000ff",
strokeOpacity: 0.69,
strokeWeight: 4
});
But I found it is quite difficult to simulate Google's own style. Anyone has similar experience and help? Thank you.
I found this in the code:
q.ra=function(a,b,c,d,e){
this.color=b||"#0000ff";
this.weight=Ug(c,5);
this.opacity=Ug(d,0.45);
...
so reasonable options would appear to be
strokeColor: "#0000ff",
strokeOpacity: 0.45,
strokeWeight: 5
Related
Between Here Maps Api for Javascript version 3.1 and Here Maps Api for Javascript version 3 is a big difference.
The loading time, zooming, routes displaying is much much slower , up to 3 times.
We are usisng the default settings, but even so, on half of our computers on which we used HERE version 3 we cannot use the new version 3.1. It is not loading (cannot be used).
What can be done? I cannot afford to change all the computer to another computers of last generation.
Are there some settings which can be used to reduce the responsive time of the maps?
What you could do is to load legacy packages and use legacy rendering engine (no tilting/rotation, only raster base layer):
load legacy core package:
<!DOCTYPE html>
<html>
<head>
.....
<script src="https://js.api.here.com/v3/3.1/mapsjs-core-legacy.js" type="text/javascript" charset="utf-8"></script>
.....
create map with legacy rendering engine:
// assuming platform is instantiated
// Obtain the default map types from the platform object:
let defaultLayers = platform.createDefaultLayers();
let map = new H.Map(
document.getElementById('mapContainer'),
defaultLayers.raster.normal.map,
{
zoom: 10,
center: { lat: 52.5, lng: 13.4 },
engineType: H.map.render.RenderEngine.EngineType.P2D
});
by default, fractional zoom levels are enabled in 3.1, therefore to have crisp map it is recommended to disable it:
//assuming that UI and mapevents behavior are instantiated
// disable fractional zooming for Behavior
behavior.disable(H.mapevents.Behavior.Feature.FRACTIONAL_ZOOM);
// add H.ui.ZoomControl with the disabled fractional zooming
var zoomControl = new H.ui.ZoomControl({fractionalZoom: false});
ui.addControl('zoom', zoomControl);
For more information check the Migration guide
I am trying to develop a navigation application with Qt and Qt location plugins. Right now, I am testing using Here plugin.
Since the Map plugin allows me to set up tilt, bearing, zoomLevel etc. I am well able to do what I am trying to do, except with a flaw in the line that is constructed by RouteModel and MapRoute that is viewed on the screen. The following is how I am able to display the route:
MapItemView {
model: routeModel
delegate: Component {
MapRoute {
route: routeData
line.color: "#d0021b"
line.width: 7
antialiasing: true
smooth: true
}
}
}
As I increase the zoom level and take a closer look at the route, I can see that the route flickers, and on some parts even not very well displayed.
An example of this situation is as follows:
I could see that the picture corrects itself and the flickering stops if I change zoomLevel from around 18 to 10. But this is not what I want since I want the navigation feel. I am looking for better ways to draw this route, simply.
I don't know how to solve this problem and I would appreciate if I could get some advice. Thanks in advance.
EDIT: Added an alternative link to the image
EDIT2: I tried with both Qt 5.8.0 and Qt 5.10.1, with Here map plugin. Step to reproduce would be getting a route map from Dortmund,Germany to Izmir,Turkey, and zooming in with zoomLevel 18, 19 or 20 at Königswall street. (This flickering happens in many occasions, this is just one example to reproduce)
I'm doing a report using Qliksense but when using a proyector you can barely see the numbers on the graphs.
Any ideas on how to modify the code of the program to increase number/text size overall?
A possible way to do that would be to use the themes in QlikSense. Yet they have limited functionality, but they may be able to help in your case.
You will have to go into your QlikSense themes directory, mine is under C:\Users\user\AppData\Local\Programs\Qlik\Sense\Client\themes. Here you will find the default themes (you can also create your own ones).
Create a copy of the folder sense which is the default theme (let's name this new folder senseModif from now on). Open the file theme.json from the new directory and play around with the values. For example if you want to set text sizes in a pie chart you can modify this segment:
"pieChart": {
...
"item": {
"name": {
"fontSize": {
"default": "50px",
"large": "50px",
"medium": "50px",
"small": "50px",
"tiny": "50px"
},
...
I already changed the fontSize values here for 50px. To see the result of this just go to the QS web interface, open your app, and open a sheet in it. You will have a similar url for the app: http://localhost:4848/sense/app/filenameofapp.qvf/sheet/GPUNXF/state/analysis/. Now just put theme/senseModif at the end of the url and it will now display the objects with your new styles.
As I said, at least for me, it's not working for every object type right now, but at least it's a start.
Much more on the themes and on their usage can be found here.
I'm just starting to learn the v3 API and am trying to understand how to style the default map at construction. The documentation is somewhat vague (or I'm too much of a noob to understand it) and I can't seem to find any example code on how to add map styles to the MapOptions object.
Could someone show how to add styles directly in mapOptions?
Have you tried the styles property of the MapOptions object?
var map = new google.maps.Map(document.getElementById("map_canvas"),
{center: new google.maps.LatLng(0,0),
styles: [{featureType:"administrative", elementType:"all", stylers:[{hue:"#dae6c3"},{saturation:22},{lightness:-5}]}]
});
Documentation is at http://code.google.com/apis/maps/documentation/javascript/reference.html.
(Edited to fix small syntax error)
I've run into a small problem with the semi-new KML Overlay functionality with Google Maps API v3, wherein while I am able to use "suppressInfoWindows: true;", the cursor still appears as though the overlay(s) are clickable.
Is there a way at this time to change the css on the overlay(s) so that the cursor is the default cursor, so that they are purely visual, and don't confuse the user?
You can do this through javascript (not sure about a purely CSS solution) using something along the lines of...
var ctaLayer = new google.maps.KmlLayer({
url: 'myKmlFile.kml',
suppressInfoWindows: true
});
if (ctaLayer.suppressInfoWindows) ctaLayer.setOptions({clickable:false});
ctaLayer.setMap(map);
This sounds like a bug. You should file it at the Google Maps API's issue tracker.