Solved

Overlaying a PNG Mask over a Google MAP

Posted on 2010-09-06
8
2,469 Views
Last Modified: 2013-11-19
Hi,

As most of you know, the Google Map uses the javascript and then you put the following code in the HTML
<div id="map"></div>
and it inserts it on the fly - I would like to make the map have rounded corners by overlaying a PNG on the top, but cant seem to work out how to do it or even if its possible.

Thanks for your comments!

Ben
0
Comment
Question by:intangiblemedia
8 Comments
 
LVL 50

Expert Comment

by:Steve Bink
ID: 33615109
Duplicate of http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Microsoft_IIS/Q_26454485.html

Have you tried using CSS rounded corners, instead of a PNG? CSS3 has that functionality, and most browsers support it now.

http://jonraasch.com/blog/css-rounded-corners-in-all-browsers
0
 

Author Comment

by:intangiblemedia
ID: 33615555
Hi Routinet,

I did incorporating that styling to the DIV ID MAP of Google maps but it didnt work.

Regards,

Ben
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 33620816
What browser are you using (make and version)?  Please post the CSS you used for div#map.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:intangiblemedia
ID: 33623375
#map {
      width:982px;
      height: 499px;
      background-image: url(../images/map-loading.jpg);
      position: relative;
}

Using Firefox v 3.6.8
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 33817588
You can get a Google static map, and it may be more suitable for your needs.  Please see the article here.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3350-Using-the-Google-Maps-API-in-PHP.html

What I would envision goes something like this.

1. Create a "mask" PNG image with a transparent center and opaque corners in the color that matches your background.
2. Acquire the Google map.
3. Use z-index to control the overlay of the two images.
0
 
LVL 38

Accepted Solution

by:
puppydogbuddy earned 500 total points
ID: 33817862
From this link:
          http://code.google.com/u/Ben.Talberg/updates
               (see api issues # 1654)
          http://code.google.com/p/gmaps-api-issues/

 Load gmap with the following commands:
    var mask = new MTrickOverlay();
    gmap.addOverlay(mask);

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

914 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now