I have tired to create kml file and load it into google maps. using javascript and html. I got this but i unable to display placemark lists as sidebar.
Now i tried to do that. This is my xml:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Darwill sample kml file</name>
<description>Create sample kml file</description>
<Style id="downArrowIcon">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon21.png</href>
<color>4365b5</color>
</Icon>
</IconStyle>
</Style>
<Style id="downArrowIcon1">
<IconStyle>
<color>CEF3D8</color>
<Icon>
<href>https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="downArrowIcon2">
<IconStyle>
<color>DBB177</color>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal4/icon28.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name>Simple Placemark</name>
<description>
<![CDATA[
<h2>Description of simple placemark</h2>
Click
]]>
</description>
<styleUrl>#downArrowIcon</styleUrl>
<Point>
<coordinates>10.082680,70.270718,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Floating Placemark</name>
<description>
<![CDATA[
<h2>Description of floating placemark</h2>
<p>This is the floating placemark</p>
Click
]]>
</description>
<LookAt>
<longitude>13.082680</longitude>
<latitude>80.270718</latitude>
<altitude>0</altitude>
<heading>20</heading>
<tilt>45</tilt>
<range>250</range>
</LookAt>
<styleUrl>#downArrowIcon1</styleUrl>
<Point>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>13.082680,80.270718,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Extruded Placemark</name>
<description>
<![CDATA[
<h2>Description of Extruded placemark</h2>
<p>This is the floating placemark</p>
Click
]]>
</description>
<LookAt>
<longitude>-113.082680</longitude>
<latitude>10.270718</latitude>
<altitude>0</altitude>
<heading>120</heading>
<tilt>150</tilt>
<range>250</range>
</LookAt>
<styleUrl>#downArrowIcon2</styleUrl>
<Point>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-113.082680,10.270718,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
This is my html and javascript code for display kml file in google maps:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>KML Layers</title>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script type="text/javascript" src="http://geoxml3.googlecode.com/svn/branches/polys/geoxml3.js"> </script>
<script type="text/javascript" src="http://geoxml3.googlecode.com/svn/trunk/ProjectedOverlay.js"> </script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
<script>
function initialize() {
var chicago = new google.maps.LatLng(41.875696,-87.624207);
var mapOptions = {
zoom: 11,
center: chicago
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var ctaLayer = new google.maps.KmlLayer({
url: 'my kml file here'
});
ctaLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>
How to displayed google maps with sidebar?
You can't do it with KmlLayer. You can do it (depending on the complexity of your KML) with a third party parser like geoxml3 or geoxml-v3 or by importing the data into FusionTables and querying that for the data to create the sidebar.
example using geoxml3
Related
Having a geopandas dataframe with points with different properties, I would like to generate a KML file with markers with different colors depending on parameter value.
First, I tried to export the dataframe with simple command:
gdf.to_file(f'elevation_cluster.kml', driver='KML')
As I didn't find the way to directly export geopandas dataframe with colored markers, I tried the following:
from simplekml import Kml
colormap = ['37AB65', '3DF735', 'AD6D70', 'EC2504', '8C0B90']
vals = list(df_mo_110['value'])
longitudes = list(df_mo_110['geometry'].x)
latitudes = list(df_mo_110['geometry'].y)
colors = list(df_mo_110['k5cls'].apply(lambda x: colormap[x]))
kml = Kml()
fol = kml.newfolder()
for _, row in df_mo_110.iterrows():
longitude = row.geometry.x
latitude = row.geometry.y
val = row.value
color = colormap[row.k5cls]
pnt = fol.newpoint(name=val, coords = [(longitude, latitude)])
pnt.style.iconstyle.color = color
kml.save('test_kml.kml')
When I import the kml file to google maps, it seems that the colors haven't been taken into account as all the markers are colored with the same (default) color
The output looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document id="1">
<Folder id="2">
<Style id="5">
<IconStyle id="6">
<color>37AB65</color>
<colorMode>normal</colorMode>
<scale>1</scale>
<heading>0</heading>
<Icon id="7">
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="10">
<IconStyle id="11">
<color>AD6D70</color>
<colorMode>normal</colorMode>
<scale>1</scale>
<heading>0</heading>
<Icon id="12">
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="15">
<IconStyle id="16">
<color>EC2504</color>
<colorMode>normal</colorMode>
<scale>1</scale>
<heading>0</heading>
<Icon id="17">
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="20">
<IconStyle id="21">
<color>8C0B90</color>
<colorMode>normal</colorMode>
<scale>1</scale>
<heading>0</heading>
<Icon id="22">
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
</IconStyle>
</Style>
...
<Placemark id="4">
<name>77.9385518904762</name>
<styleUrl>#5</styleUrl>
<Point id="3">
<coordinates>20.194198360555102,45.30681051976343,0.0</coordinates>
</Point>
</Placemark>
<Placemark id="9">
<name>77.3221460340015</name>
<styleUrl>#10</styleUrl>
<Point id="8">
<coordinates>20.195525984640607,45.30630142056596,0.0</coordinates>
</Point>
</Placemark>
<Placemark id="14">
<name>78.0660057592034</name>
<styleUrl>#15</styleUrl>
<Point id="13">
<coordinates>20.1985008143972,45.30460932455468,0.0</coordinates>
</Point>
</Placemark>
...
Does anyone know how to colorize the markers?
Color component in KML has 4-components. IconStyle color should be length 8 not 6.
The order of color value is aabbggrr, where aa=alpha (00 to ff);
bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff).
For example, if you want to apply a blue color with 50 percent opacity
to an overlay, you would specify the following: <color>7fff0000</color>,
where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.
Source: https://developers.google.com/kml/documentation/kmlreference#iconstyle
Add "ff" to each of the colors to make them fully opaque.
<Style id="15">
<IconStyle>
<color>ffEC2504</color>
<scale>1</scale>
<heading>0</heading>
<Icon id="17">
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
</IconStyle>
</Style>
Change colormap to
colormap = ['ff37AB65', 'ff3DF735', 'ffAD6D70', 'ffEC2504', 'ff8C0B90']
If, however, the original colors are in RGB order then must reverse the color RGB values:
colormap = ['ff65AB37', 'ff35F73D', 'ff706DAD', 'ff0425EC', 'ff900B8C']
I have generated a map in the Google MyMaps web-application. Now I want to include it to my page (but not as an embedded map!).
I have downloaded a kml file and added it to a html page. Everything is okay except markers are not showing. Does anybody know what the problem is?
Here are my 3 files:
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Map</title>
<script src="http://maps.googleapis.com/maps/api/js?key=MY-KEY"></script>
<script src="script.js"></script>
</head>
<body onload="initialize()">
<h1>Map</h1>
<div id="map" style="width:750px;height:520px;"></div>
<div id="capture"></div>
</body>
</html>
Script.js:
var map;
var src = 'http://my-website.com/map.kml';
function initialize() {
map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.MapTypeId.TERRAIN
});
loadKmlLayer(src, map);
}
function loadKmlLayer(src, map) {
var kmlLayer = new google.maps.KmlLayer(src, {
suppressInfoWindows: true,
preserveViewport: false,
map: map
});
google.maps.event.addListener(kmlLayer, 'click', function(event) {
var content = event.featureData.infoWindowHtml;
var testimonial = document.getElementById('capture');
testimonial.innerHTML = content;
});
}
google.maps.event.addDomListener(window, 'load', initialize);
KML:
<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://www.opengis.net/kml/2.2'>
<Document>
<name>My Map</name>
<description><![CDATA[]]></description>
<NetworkLink>
<name>locations</name>
<Link>
<href>http://mapsengine.google.com/map/kml?mid=zVGRYK81syB4.kFYbbKCtNMQw</href>
</Link>
</NetworkLink>
</Document>
</kml>
See the KML documentation
<StyleMap> is not supported by KmlLayer.
Your kmz is using <StyleMap> to define the icons:
<Style id='icon-960-F8971B-normal'>
<IconStyle>
<color>ff1B97F8</color>
<scale>1.1</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/960-wht-star-blank.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0.0</scale>
</LabelStyle>
</Style>
<Style id='icon-960-F8971B-highlight'>
<IconStyle>
<color>ff1B97F8</color>
<scale>1.1</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/960-wht-star-blank.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>1.1</scale>
</LabelStyle>
</Style>
<StyleMap id='icon-960-F8971B'>
<Pair>
<key>normal</key>
<styleUrl>#icon-960-F8971B-normal</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#icon-960-F8971B-highlight</styleUrl>
</Pair>
</StyleMap>
You need to remove those, use "standard icons" if you want it to work with KmlLayer (at least currently):
<Style id='icon-960-F8971B'>
<IconStyle>
<color>ff1B97F8</color>
<scale>1.1</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/960-wht-star-blank.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0.0</scale>
</LabelStyle>
</Style>
example with (partially) modified KMZ
I can able to display KML on Google Earth.
Now I want to display the same on the Map..
How is this possible ?
Here is my KML attached...
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Hide and show labels</name>
<Style id="sn_hide">
<IconStyle>
<scale>0</scale>
</IconStyle>
</Style>
<StyleMap id="msn_hide">
<Pair>
<key>normal</key>
<styleUrl>#sn_hide</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>Placemark 1</name>
<description>Label hidding</description>
<styleUrl>#sn_hide</styleUrl>
<Point>
<coordinates>-119.232195,36.016021</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Placemark 2</name>
<description>Label hidding</description>
<styleUrl>#sn_hide</styleUrl>
<Point>
<coordinates>-119.232195,36.0162</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Thanks in advance ..
To display KML on a Google Map, it needs to be on a publicly accessible web server.
Then either use the Google Maps API v3 KmlLayer or Google Maps
Google Maps API v3 KmlLayer example from the documentation
Code to display the KML file:
var chicago = new google.maps.LatLng(41.875696,-87.624207);
var mapOptions = {
zoom: 11,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
var ctaLayer = new google.maps.KmlLayer('http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml');
ctaLayer.setMap(map);
Here is the same KML file displayed on Google Maps.
UPDATE:
http://www.geocodezip.com/geoxml3_test/Point_Placemarks.Descriptive_HTML_kml.xml">Here is a local copy of the file from your comment displayed using the Google Maps API v3 geoxml3 third party parser
(KmlLayer seems to think it is an invalid document)
Here is that KML displayed on Google Maps
I downloaded a KML file and tried to load it into my project, which uses the Google maps API.
When I load this KML I don't see any results. Other KML files work.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: KmlLayer KML</title>
<link href="/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js? sensor=false"></script>
<script type="text/javascript" src="http://geoxml3.googlecode.com/svn/branches/polys/geoxml3.js"></script>
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript">
function initialize() {
var chicago = new google.maps.LatLng(41.875696,-87.624207);
var myOptions = {
zoom: 2,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP }
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var geoXml = new geoXML3.parser({map: map, singleInfoWindow: true});
geoXml.parse('doc2.kml'); }
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>
Here's the KML file. I think they look different from the other KML files I found.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Continents.kmz</name>
<Style id="khStyle646">
<LineStyle id="khLineStyle649">
<antialias>0</antialias>
</LineStyle>
<PolyStyle id="khPolyStyle648">
<fill>0</fill>
<outline>0</outline>
</PolyStyle>
<IconStyle id="khIconStyle650">
<Icon>
<href>root://icons/palette-3.png</href>
<x>160</x>
<y>128</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Style id="khStyle653">
<LineStyle id="khLineStyle656">
<antialias>0</antialias>
</LineStyle>
<PolyStyle id="khPolyStyle655">
<fill>0</fill>
<outline>0</outline>
</PolyStyle>
<IconStyle id="khIconStyle657">
<Icon>
<href>root://icons/palette-3.png</href>
<x>96</x>
<y>160</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Folder>
<description>All information from www.wikipedia.org</description>
<name>Continents</name>
<Placemark>
<LookAt>
<longitude>69.34975938772639</longitude>
<latitude>-85.51850370658478</latitude>
<range>4660494.527334587</range>
<tilt>1.489515791197339</tilt>
<heading>-94.23630609027376</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>80.29122647597791,-85.36965069939549,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>North America</name>
<LookAt>
<longitude>-92.38030591736974</longitude>
<latitude>41.60040029662515</latitude>
<range>6572383.886462871</range>
<tilt>1.489515791197389</tilt>
<heading>5.091613582461503</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>-98.11233984563178,45.32023029701742,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>South America</name>
<LookAt>
<longitude>-62.99013711154147</longitude>
<latitude>-21.48589474193573</latitude>
<range>7218561.25099345</range>
<tilt>1.489515791197348</tilt>
<heading>14.48258802805428</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>-58.60850163074399,-15.26868557309036,0</coordinates>
</Point>
</Placemark>
<Placemark>
<description>The primary use of the term Oceania is to describe a continental region (like Europe or Africa) that lies between Asia and the Americas, with Australia as the major land mass. The name Oceania is used, rather than Australia, because unlike the other continental groupings, it is the ocean rather than the continent that links the nations together. Oceania is the smallest continental grouping in land area and the second smallest, after Antarctica, in population.</description>
<name>Australasia / Oceania</name>
<LookAt>
<longitude>149.9280610479762</longitude>
<latitude>-19.96203640214011</latitude>
<range>5948094.214726813</range>
<tilt>1.489515791197347</tilt>
<heading>-3.233441994279863</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>153.0281098590235,-19.81023956617555,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Europe</name>
<LookAt>
<longitude>13.36662252078061</longitude>
<latitude>47.49923408453745</latitude>
<range>2926553.150350343</range>
<tilt>1.489515791197361</tilt>
<heading>5.315432286214211</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>7.703642655915047,48.19165017141015,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Asia</name>
<LookAt>
<longitude>88.44296071080763</longitude>
<latitude>29.02076366275569</latitude>
<range>5948094.214726811</range>
<tilt>1.489515791197341</tilt>
<heading>4.339173834203948</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>88.87769612972068,35.90237786706015,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Africa</name>
<LookAt>
<longitude>20.16987332895207</longitude>
<latitude>1.368208952904757</latitude>
<range>8150113.588222869</range>
<tilt>1.489515791197357</tilt>
<heading>-4.536422889821256</heading>
</LookAt>
<styleUrl>#khStyle646</styleUrl>
<Style>
<IconStyle>
<Icon>
<href>root://icons/palette-3.png</href>
<x>96</x>
<y>160</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Point>
<coordinates>21.06451559663505,6.103658771972451,0</coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml>
I think that the file is relevant for Google Earth. Is it possible to convert it to Google maps KML? Could you please advise me why it is not working ?
Regards,
Yossi
So you're KML file is pretty far out of date. Looking at the namespace, it's a KML 2.0 file, which was never really a codified spec. KML 2.1 was the earliest, KML 2.2 is the current version. So there's lots of elements that are unsupported, such as antialias and x,y etc. Plus some of the elements are out of order. You could try validating it against the schema: http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd
That will give you an idea of which elements aren't supported and which ones are out of order. You could use a validator like Oxygen, which has a free trial.
Also, you're using geoxml3 which is an open source project rather than using KmlLayer which is Google's KML renderer for maps. So yo could ask the geoxml3 folks for help as well.
Maybe this link could help you, some of the elements on kml are not supported:
https://developers.google.com/kml/documentation/kmlelementsinmaps
KML file:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Name</name>
<description><![CDATA[]]></description>
<Style id="style140"><IconStyle>
<Icon>
<name>Name</name>
<href>icon/green.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name>Name</name>
<description>Desc Name</description>
<styleUrl>#style140</styleUrl>
<Point>
<coordinates>12.7548360932222,59.2701399304516,0.000000</coordinates>
</Point>
</Placemark>
</Document>
</kml>
And i get this output:
but I want this:
So you can see the name of the point. What Is wrong in the kml file?
Thx!
I don't know if this helps, but I found that the method that you want to use does not work. I was able to set this programmatically in javascript. This allows you to have a label just above the redcircle icon that you create yourself.
Hope this helps!
javascript (minus other code to build map object etc):
function addLayer(){
var myStyles = new OpenLayers.StyleMap({
"default": new OpenLayers.Style({
strokeColor: "#FFCC33",
strokeWidth:10,
strokeOpacity:1,
fillColor:"#003399",
fillOpacity: 1,
externalGraphic: "icons/redcircle.png",
labelYOffset: 15,
pointRadius: 5,
label:"${label}",
})
});
currentLayer = new OpenLayers.Layer.Vector("KML", {
styleMap: myStyles,
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "/kml/mymap.kml",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
})
});
KML file:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<description><![CDATA[]]></description>
<Placemark>
<label>Name</label>
<description>Desc Name</description>
<Point>
<coordinates>-122.98676101, 49.16702016,0.000000</coordinates>
</Point>
</Placemark>
</Document>
</kml>
I see the tag of the placemark name rendered in white with full opacity by default in Google Earth. Try specifying a Label Style element in your style to get that color and opacity.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Name</name>
<description><![CDATA[]]></description>
<Style id="style140">
<IconStyle>
<Icon>
<name>Name</name>
<href>icon/green.png</href>
</Icon>
</IconStyle>
<LabelStyle>
<color>ffff55ff</color>
</LabelStyle>
</Style>
<Placemark>
<name>Name</name>
<description>Desc Name</description>
<styleUrl>#style140</styleUrl>
<Point>
<coordinates>12.7548360932222,59.2701399304516,0.000000</coordinates>
</Point>
</Placemark>
</Document>
</kml>
This is how I solved my problem...hope this helps.
var layerData = new OpenLayers.Layer.Vector("test1", {
renderers: ["SVG", "Canvas", "VML"],
strategies: [new OpenLayers.Strategy.Save({
auto:true
}),new OpenLayers.Strategy.Cluster({
distance: clusteringDistance,
threshold: clusteringThreshold,
shouldCluster: function(cluster, feature) {
updateFeatureStyle(feature);
if (feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point" && boundArea >= maxBoundAreaForClustering) {
return OpenLayers.Strategy.Cluster.prototype.shouldCluster.apply(this, arguments);
} else {
return false;
}
}
})],
styleMap: clusterStyle
});
blankLayer = true;
layerData.setVisibility(false);
function updateFeatureStyle(feature) {
feature.style.label = "\n\n " + feature.attributes.name;
feature.style.labelAlign = 'ct';
feature.style.fontColor = 'red';
feature.style.fontFamily = 'Arial';
feature.style.fontSize = '10px';
feature.style.fontOpacity = 1;
feature.style.graphicTitle = feature.attributes.name;
}