Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Google Maps KML markers

Posted on 2009-05-01
2
Medium Priority
?
2,087 Views
Last Modified: 2013-11-19
I am generating a Google KML file with a number of points.  For some set of these points I want to have markers which are say Red and for the others I want markers which are say Blue.   For all the markers I want a unique label eg: 'A', 'B', 'C'.

I found a downloaded a large set of markers from the net, with different colors and labels.. eg all red A-Z, all blue, A-Z.  so it is fairly easy to generate a url to select the correct marker eg .../markers/blue_markerB.png. and this is what I was in the process of doing.   However, when the marker is displayed Google has distorted the shape (squat and wide).

So my question(s) are:  

Why is Google doing this?  
Can I fix it.?  

Or:

Is there a set of compound/layered markers which Google supplies eg Blue+Letter that I can use and how are they used (code example please)?

Hope this make sense.

Attached is my test KLM code, a png of a distorted marker and a png of a marker as it should be.

Thanks
Phil


<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
	<name>test.kml</name>
	<Style id="marker1">
		<IconStyle>
			<scale>1.1</scale>
			<Icon>
				<href>http://97.85.145.94/joomla/CourseDetails/mapMarkers/green_MarkerA.png</href>
			</Icon>
		</IconStyle>
	</Style>
	<Style id="marker2">
		<IconStyle>
			<scale>1.5</scale>
			<Icon>
				<href>http://97.85.145.94/joomla/CourseDetails/mapMarkers/blue_MarkerA.png</href>
			</Icon>
		</IconStyle>
	</Style>
	<Placemark>
		<name>Newport</name>
		<description>Newport beach golf club</description>
		<styleUrl>#marker1</styleUrl>
		<Point>
			<coordinates>-117.88117110729218,33.610348371131316,0</coordinates>
		</Point>
	</Placemark>
	<Placemark>
		<name>Bar</name>
		<description>Nice Bar</description>
		<styleUrl>#marker2</styleUrl>
		<Point>
			<coordinates>-117.87686884403229,33.60939229911372,0</coordinates>
		</Point>
	</Placemark>
</Document>
</kml>

Open in new window

t1.png
t2.png
0
Comment
Question by:BeerFizz
  • 2
2 Comments
 

Author Comment

by:BeerFizz
ID: 24295516
Anybody any ideas?
0
 

Accepted Solution

by:
BeerFizz earned 0 total points
ID: 24453494
KLM has a bug in that it re sizes to a minimum of 32px.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question