Select to view content in your preferred language

How to create a thumbnail map and export it as an image?

1013
0
08-26-2016 07:58 AM
ShaningYu
Honored Contributor

I want to do such a job:

1)  After adding a point on the Street Map, zoom the map into the level as the point is on it (like a shopping store on a map).

2)  Export this thumbnail map in a JavaScript code.

I coded as below:

    var thumbMap = new Map( {
        basemap: "street",
        center: [x, y],       // x = 38.0; y = -77.0;
        visible: false,
        zoom: 10
    });
    thumbMap.addLayer(gLayer);     // runtime error

But I got runtime error: addLayer not supported.  I checked the object in VS Watch and observed that it does not contain any method.  What's wrong in my code?  How can I refer it to the existing map (this.map) in this project?  Appreciate if you can provide your advisory..

0 Kudos
0 Replies