How to make map border thicker in Google Geomap?


Nicholas R.

I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map

enter image description here

My model is as follows

enter image description hereCan we try to make my map look more like a mockup? My code so far is this.

<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
  </head>

  <body>
    <style xmlns="http://www.w3.org/2000/svg">
        path { fill: #ffc801; }
        :hover { fill: #fcafff; }
      </style>

    <script type='text/javascript' src='http://www.google.com/jsapi'></script>
    <script type='text/javascript'>google.load('visualization', '1', {'packages': ['geochart']});

      google.setOnLoadCallback(drawVisualization);

        function drawVisualization() {var data = new google.visualization.DataTable();

       data.addColumn('string', 'Country');
       data.addColumn('number', 'Value'); 
       data.addColumn({type:'string', role:'tooltip'});var ivalue = new Array();

       var options = {
       backgroundColor: {fill:'#FFFFFF',stroke:'#FFFFFF' ,strokeWidth:25 },
       colorAxis:  {minValue: 0, maxValue: 0,  colors: []},
       legend: 'none',    
       backgroundColor: {fill:'#FFFFFF',stroke:'#FFFFFF' ,strokeWidth:25 },   
       datalessRegionColor: '#ffc801',
       displayMode: 'regions', 
       enableRegionInteractivity: 'true', 
       resolution: 'provinces',
       sizeAxis: {minValue: 1, maxValue:1,minSize:10,  maxSize: 10},
       region:'IN',
       keepAspectRatio: true,
       width:600,
       height:400,
       tooltip: {textStyle: {color: '#444444'}, trigger:'focus', isHtml: false}   
       };
        var chart = new google.visualization.GeoChart(document.getElementById('visualization')); 
        google.visualization.events.addListener(chart, 'select', function() {
        var selection = chart.getSelection();
        if (selection.length == 1) {
        var selectedRow = selection[0].row;
        var selectedRegion = data.getValue(selectedRow, 0);
        if(ivalue[selectedRegion] != '') { document.location = ivalue[selectedRegion];  }
        }
        });
       chart.draw(data, options);
     }
     </script>

     <div id='visualization'></div>>
  </body>

</html>

Updates

I changed to code based on the answer. Now I am not getting the expected result. This is the current code.

<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
  </head>

  <body>
    <style xmlns="http://www.w3.org/2000/svg">
        path { fill: #ffc801; }
        :hover { fill: #fcafff; }
      </style>

    <script type='text/javascript' src='http://www.google.com/jsapi'></script>
    <script type='text/javascript'>google.load('visualization', '1', {'packages': ['geochart']});

      google.setOnLoadCallback(drawVisualization);

        function drawVisualization() {var data = new google.visualization.DataTable();

       data.addColumn('string', 'Country');
       data.addColumn('number', 'Value'); 
       data.addColumn({type:'string', role:'tooltip'});var ivalue = new Array();

       var options = {
       backgroundColor: { fill: '#FFF', stroke: '#000', strokeWidth: 75 },
       colorAxis:  {minValue: 0, maxValue: 0,  colors: []},
       legend: 'none',
       datalessRegionColor: '#ffc801',
       displayMode: 'regions', 
       enableRegionInteractivity: 'true', 
       resolution: 'provinces',
       sizeAxis: {minValue: 1, maxValue:1,minSize:10,  maxSize: 10},
       region:'IN',
       keepAspectRatio: true,
       width:600,
       height:400,
       tooltip: {textStyle: {color: '#444444'}, trigger:'focus', isHtml: false}   
       };
        var chart = new google.visualization.GeoChart(document.getElementById('visualization')); 
        google.visualization.events.addListener(chart, 'select', function() {
        var selection = chart.getSelection();
        if (selection.length == 1) {
        var selectedRow = selection[0].row;
        var selectedRegion = data.getValue(selectedRow, 0);
        if(ivalue[selectedRegion] != '') { document.location = ivalue[selectedRegion];  }
        }
        });
       chart.draw(data, options);
     }
     </script>

     <div id='visualization'></div>
  </body>

</html>

When I run the code above, I get a dark area around the map instead of a thicker border. what to do?

Updates

If used, iframezooming does not crop the map area and hovering does not work properly.

path {
  stroke: #555;
}
#wrapper2 { width: 450px; height: 450px; padding: 0; overflow: hidden; }

#scaled-frame { width: 400px; height: 400px; border: 0px; }

#scaled-frame {

zoom: 0.61;
overflow: hidden;
-moz-transform: scale(0.61);

-moz-transform-origin: 0 0;

-o-transform: scale(0.61);

-o-transform-origin: 0 0;

-webkit-transform: scale(0.61);

-webkit-transform-origin: 0 0;

}



@media screen and (-webkit-min-device-pixel-ratio:0) {

#scaled-frame  { zoom: 1;  }

}



<div id="wrapper2">
    <iframe id="scaled-frame" src="/_/mapframe.html" height="300" width="500" ></iframe>
</div>

enter image description here

Farhad

Use CSS properties on strokeelement <path>to get thicker borders, which is an SVG HTML5 feature.

Add the following to your file:.css

path {
  stroke: #555;
}

To display only India, you need to set the scaleattribute to what works best for your HTML5 canavas. Check the framework API you use and figure out how to manage scale.

Related


How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is like this.

How to make map border thicker in Google Geomap?

Nicholas R. I am using a dhtml map to deploy to google appengine . Now, I want to make the border darker and thicker. How to do it? I have deployed this map My model is as follows Can we try to make my map look more like a mockup? My code so far is this. <!DOC

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make a plane thicker in RGL?

what for I'll try to make some nice visual illustrations for the binary classification example using the 3D printed data. Here is my 3D plot: require(rgl) #Get example data from mtcars and normalize to range 0:1 fun_norm <- function(k){(k-min(k))/(max(k)-min(k

surfc: how to make contours thicker?

wet lab student I've been reading the documentation and surfcI can't find an option to make the contour thicker, as the contour is shown below the surface. Is there anyway to do this? and Can't really find any documentation on this, but playing around I found

gnuplot: make only one border thicker in surface plot

Ramgorur So I am trying to draw a 3D sphere on the first quadrant like this - I want to make this line BCbold/bold. How do I do this? Here is my gnuplot script: set term wxt 0 set parametric set urange[0:0.5 * pi] set vrange[0:0.5 * pi] r = 1 fx(v,u) = r * cos

gnuplot: make only one border thicker in surface plot

Ramgorur So I am trying to draw a 3D sphere on the first quadrant like this - I want to make this line BCbold/bold. How do I do this? Here is my gnuplot script: set term wxt 0 set parametric set urange[0:0.5 * pi] set vrange[0:0.5 * pi] r = 1 fx(v,u) = r * cos

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make thicker stem lines in Matplolib

Yanping Island Crab I want to make thicker stemming in python when using plt.stem. this is my code import matplotlib.pyplot as plt import numpy as np N = 20 n = np.arange(0, 2*N, 1) x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n) plt.stem(n,x.real) plt.show()

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make two lines thicker in Chart JS

Stijn Westerhof As you can see in my fiddle , I have made the chart using Chart JS . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line means it is correct. I searched everywhere and

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to use css to make font thicker then 900

Gianluca I want to make the font extra bold due to the background color of my friend's image in the website header. I found it online, but unfortunately it doesn't work. Is there any other way? h1{ text-shadow: 1px 0 #888888; letter-spacing:1px; font-wei

How to make bars thicker in Kendo UI charts?

sony My graph contains calorie vs time data. Calories have a value every 15 minutes. I want to pull the bar closer. I am posting a sample of the data along with a link to jsFiddle. Also, is it possible to display the entire 24 hours on the graph and only show

How to make two lines thicker in Chart JS

Stijn Westerhof: As you can see in the fiddle , I have used Chart JS to make the chart . There are three lines in this chart. I'm going to make the orange and yellow lines thicker than they are. The green dotted line is good. I searched everywhere and tried a

How to make the outline of a radio button thicker

Sanjo I'm trying to add something like https://design-system.service.gov.uk/components/radios/ for radio buttons . The problem is that, on the radio button's focus, mine looks like this: enter image description here It should look like this: enter image descri

How to make thicker stem lines in Matplolib

Yanping Island Crab I want to make thicker stemming in python when using plt.stem. this is my code import matplotlib.pyplot as plt import numpy as np N = 20 n = np.arange(0, 2*N, 1) x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n) plt.stem(n,x.real) plt.show()

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev

How to make underline text thicker in Flutter

Shulsh Shukla After reading the Flutter documentation, I got information on how to underline text. But my problem is, I need a simple text style with bold underline. Vinos Vino Try adding a property called decorationThicknessin TextStyle . Text( 'Flutter Dev