Google Map + SVG overlay

In this tutorial, we will overlay a custom SVG on Google Map.

You need to have 2 Google API keys to continue: How to get Google API keys

Click on Download SVG with Google map button on the MapSVG start screen.

01

Enter the address of location where you want to add a vector overlay. Select the address from the drop-down list. Adjust the map position as needed. Click on Download SVG button. 1

What happens next: MapSVG makes a screenshot of the Google Map part that is visible on the screen. Then MapSVG inserts the screenshot to an empty SVG file and adds the map geo-boundaries data to the file (left/top/right/bottom latitude/longitude coordinates) and downloads the file to your local disk. When you upload the file back to MapSVG - geo-data embedded in the file allows MapSVG to position all vector objects on the live Google Map.

Now you have 2 options:

  1. If you need to add complex drawings, circles, rectangles, gradients, curves - use Inkscape or Adobe Illustrator
  2. If you need to draw only simple polygons - you can do that in MapSVG by clicking on Edit SVG file button in the map editor

SVG Editing in Inkscape or Adobe Illustrator

You can't set IDs for individual SVG objects in AI, so Inkscape is recommended.

Open your SVG file in Inkscape: 2

If you edit the file in Inkscape or AI - don't change the map width/height and don't move the Google Map screenshot - it breaks the geo-calibration.

Before editing the SVG file, read the following page about requirements for custom SVG files: Using a custom SVG file

Click on the pen tool on the left and add a polygon. Change to color fill to semi-transparent or transparent to show the Google Map underneath: 3

Add one more polygon. Now right-click on a polygon, choose Object properties and change the Object ID in the form on the right side and click Set: 4

Don't remove the Google Map screenshot in Inkscape/AI before saving the SVG file.

Once you finish drawing, save the file as "Plain SVG", go to MapSVG start screen and click on Upload SVG file button. Click OK when asked if you want to remove the screenshot from the background. When you see "File is uploaded" message, click on New SVG map drop-down list, enter "user-uploads" in the search box to see all uploaded files, find the file "user-uploads/mapsvg.svg" and click on it to create a new map 5

You will see the polygons you've drawn an a grey background: 6

Go to Menu > Google maps and enable Google Maps: 7

Go to Menu > Settings and enable zoom & scroll. Try to move the map around. Go to Menu > Regions and you'll 2 rows with your objects there:
8

SVG editing in MapSVG

  • Upload the file you've just downloaded back to MapSVG by clicking on Upload SVG file
  • Click OK when asked if you want to remove the screenshot from the background
  • When you see "File is uploaded" message, click on New SVG map drop-down list, enter "user-uploads" in the search to see all uploaded files, find the file "user-uploads/mapsvg.com" and click on it to create a new map
  • When the new map is created, enable Google Maps - Menu > Google maps > Enable > On
  • Click on Edit SVG file button in the top toolbar
  • Draw polygons, then click on Save SVG file and go back to the map settings
  • See the list of Regions - it should contain SVG object that you've drawn Regions > List