Select to view content in your preferred language

ArcGIS map overlay on top of Google Maps stopped working

4173
6
Jump to solution
05-23-2016 07:58 AM
RickCheney
Frequent Contributor

The three lines of JavaScript below add a map overlay on top of Google Maps.  It was working fine and suddenly stopped working.  Does anybody have any ideas on how to get this to work?   The reason I am combining Google Maps and ArcGIS is because I need the ArcGIS map but I also need a rectangle which the user can move around and re-size to select an area of the map.  If there is a way to create this type of rectangle with ArcGIS then I don't need to use Google Maps.

var url = 'http://www.giscoecache.lrc.gov.on.ca/ArcGIS/rest/services/LIO_Cartographic/LIO_Topographic/MapServer...

var agsType = new gmaps.ags.MapType(url,{name:'ArcGIS', opacity:9.5});

map.overlayMapTypes.insertAt(0, agsType);

The ArcGIS map is at this link:  LIO_Cartographic/LIO_Topographic (MapServer)

My demo map is at this link (I had to comment out the three lines above to get the rectangle to show:   demo_v6

0 Kudos
1 Solution

Accepted Solutions
RickeyFight
MVP Regular Contributor

Rick,

I know this can be done in javascript:

JS Extent Helper

Show current map extent | ArcGIS API for JavaScript

Look at these samples. They are not exactly what you want but they are a good start. 

View solution in original post

0 Kudos
6 Replies
RickeyFight
MVP Regular Contributor

Rick,

What do you need the rectangle for?

0 Kudos
RickCheney
Frequent Contributor

Check out the rectangle on this link:    demo     the user moves the rectangle around and changes the size to select an area of the map which the user wants a printed copy of.

0 Kudos
RickeyFight
MVP Regular Contributor

So when a user fills out the information, you get an email or notification for an area to print?

0 Kudos
RickCheney
Frequent Contributor

That's correct, the email contains the longitude, latitude extent for the area of the rectangle.

0 Kudos
RickeyFight
MVP Regular Contributor

Rick,

I know this can be done in javascript:

JS Extent Helper

Show current map extent | ArcGIS API for JavaScript

Look at these samples. They are not exactly what you want but they are a good start. 

0 Kudos
RickCheney
Frequent Contributor

Hey Rickey, thanks for your advice and suggestions.  The map is working fine again.  It stopped displaying the overylay for about two weeks and now it's showing the overlay and the rectangle again.

0 Kudos