Custom (text) overlay on google map via KML - google-maps

Is it possible to draw a custom text overlay on a google map via a kml file. I'm drawing several polygons (e.g. linear ring) that separate a region into districts and I want to indicate what district the polygon is and without an marker pin.

KML does not have a native way to draw text or fonts directly on the map.
Your options include:
Add a Point/Placemark with a Label at the center of your polygon. In the IconStyle, set scale to zero, so that you only see the label.
Use a GroundOverlay image that contains the text and has a transparent background
Find a way to generate KML lines or polygons in the shape of your letters/text, and place those on the map.

Related

Drawing shapes in Here Maps and affect any markers that are within shape's boundaries

I am using the HERE Map Javascript tools and I have a map with various markers. I want users to be able to draw a shape using their mouse on the map. Any markers that are within the shape's bounds should be "touched" (i.e. updated with my prefs etc.).
I see that Google Maps users are able to do it, as in the following post: Box/Rectangle Draw Selection in Google Maps
I wonder if it's possible to do this easily using Here Maps?

Change Google Maps direction line to icons

Is there a way to change the default Google Maps direction line, the blue line that you are meant to follow, into a series of icons?
So instead of having a blue line showing the route on the map, I'd like to replace this with a series of small icons.
Or, if that isn't possible, can I place icons along the route in say 1km increments?
I see plenty of examples of replacing the start and end markers but not of the line.
Yes, it is possible. One option:
PolylineOptions to the DirectionsRenderer, you can also apply symbols to the Polyline
(example using a "dash" symbol)
or extract the route data and use it to put icons at all the vertices on the polyline (like the answer to this question, but with a transparent polyline)
example of a custom DirctionsRenderer
markers every 2km on a Polyline
markers at 2 arbitrary distances on a directions polyline

How to translate mercator map coordinates to relative screen coordinates?

I have a database with various map locations (latitude, longitude).
I've been using a map api (e.g. google maps) to plot these locations.
I am now experimenting to see if I can totally remove dependency of map apis and simply replace the map control with an image (an .png image).
Question:
How can I translate the map locations to be displayed properly onto this map image?
More details:
Basically, the map will be a rectangular area (i.e. Div element), where the top-left corner of the rectangle is obviously (0, 0). So basically the map locations will be displayed with respect to this top-left corner.
First off, where are you getting your geocodes from? If they are from Bing or Google Maps then you can only use those coordinates with those map controls. Using this coordinates without the map controls is against the terms of use of these API's. Assuming that these coordinates come from somewhere else you can overlay them on an image by first knowing some information about the image. At a minimium you will need to know two coordinates on the image and their relative pixel locations. From that you can then determine the scale and top left coordinate of the image. With this you can then fairly accurately position coordinates on the image using a lot of math. You can find a lot of useful math for this here: http://msdn.microsoft.com/en-us/library/bb259689.aspx I've writing a few blog posts on this a while back which you can find here: http://rbrundritt.wordpress.com/2008/10/25/ve-imagery-service-and-custom-icons/
If these coordinates come from Bing Maps you can easily display them on a map image using the Bing Maps Imagery Service: http://msdn.microsoft.com/en-us/library/ff701724.aspx

Data points to Colored Map

I have a set of Latlng coordinates that I want to place on a Google Map, but instead of the usual markers, I want to create an overlay where a higher density of these latlng points will create a redder color overlay, while a lower density will give a greener overlay, everywhere in between will be a shade in between red and green. How can I achieve this?
You could try to build heat map with data stored in Google Fusion Tables.
Also, have a look at this question from GIS SE:
How could I turn my data into a heatmap / intensity map?

Custom style to Google Map V3 overlays

I want to draw rectangles and polygon overlays on a map, but with more style than just a color and opacity. I'd like to add dotted lines for the boundary and line patterns in the polygon itself.
Is that possible?
You can add most any style to the polylines and polygons. Take a gander at the google API documentation https://developers.google.com/maps/documentation/javascript/overlays#PolylineOptions