Select to view content in your preferred language

Siverlight Chrome on OSX, embedding maps in web pages

1158
6
03-02-2011 07:52 AM
DavidPratt
Emerging Contributor
Hi. Created my first map today but having some issues trying to do anything of value with it. First, to share with anyone, I get a url but cannot copy the url in the the link to this box using Chrome for OSX. This works with Safari but not Chrome.

Second, I would like my customers to create a map of their premises. I want them to be able to insert a link in a portlet where I would include a plugin or viewer that could use the url. I wanted them to be able to identify their buildings and specific features with labels/notes. I am only just experimenting with this at the moment to see what is possible at the moment with ArcGIS explorer. It could be that Google maps may be a better fit.

Third, I attempted to view the first map on my iphone. The map displayed without the map notes and told me in a dialog they cannot be displayed. This was greatly disappointing as I expected that if I drew something it could be displayed - if this is the case, what is the point of drawing these features.

Lastly. I have found a couple of utilities for Google Maps that provide me with coordinates for each point I place in a polygon that is drawn. Is there anyway of getting this information using explorer. For example if I have 10 points to create a polygon, I would like a reference to each point. Can explorer import any information from a KML file?


Hopefully someone can take time to answer these questions. On a positive note, I like the quality of the imagery map. It is very nice.
Tags (2)
0 Kudos
6 Replies
MikeMinami
Esri Notable Contributor
Can you clarify exactly what you are doing?

Are you making a map in arcgis.com and attempting to share it via its URL, but are having trouble copying the URL?

We are about to release the next update to arcgis.com that will allow you to add notes to the map. the iPhone app won't display them yet, until the next update.

Thanks,

Mike
0 Kudos
DavidPratt
Emerging Contributor
Hi Mike. Sure. I created a map using arcGIS explorer online. Used imagery map and drew a polygon shape note and labelled it. I saved it. In the info page, it offers a link in upper left of page, "Link to this map. Paste link in an email, document or IM" with the map link in a grey box. I am unable to copy this link when I use Google Chrome browser. Chrome is version 9.0.597.102  If I switch browsers and use Safari I am able to copy and paste the link.

The answer to you question is yes, I would like to share the map. As indicated, I would like to embed the map in a web page if possible in a similar way I can embed a Google Map. My objective is simply to create a portlet in my site code that would allow a user to insert an arcGIS map they created and to display it in their dashboard. I am not terribly familiar with Silverlight as I prefer to avoid plugins generally but anticipated their might be something available that I can use to display the map. With Google, it is simply a matter of a small snippet of javascript and an iframe. What are my options to embed this map on a site?

I would like the coordinates of the points of the polygon note I have draw as well. How do I get them?

David
0 Kudos
MikeMinami
Esri Notable Contributor
You can embed a map in a web page. Open your map inside arcgis.com to get the embed code. Here's how:

With the map open in arcgis.com...

1. Click the Share button.
2. Check the box to share the map with everyone.
3. Click the Embed in Personal Site button and copy the code.
4. Paste the code in your web page.

As of today, the notes won't work in the embedded map. We're just about to make an update to arcgis.com that will allow it to work. So it will work shortly. You'll need to open your map again in Explorer Online and save it again. Explorer Online is also changing, so you'll notice some differences there too.

There's no way in the user experience that I know of to get the coordinates of the shapes you entered. I'd imagine you can do it by writing some code, however. Unfortunately, I don't know how.

Thanks,

Mike
0 Kudos
DavidPratt
Emerging Contributor
Hi Mike. I appreciate your reply. I have to say I am puzzled as I cannot locate any 'Embed in Personal Site button' to carry out the last two steps. I have viewed arcGIS explorer in the 4 major Mac browsers and on IE 8 in an XP virtual machine. It sounds like we have our wires crossed.

When I open my map it takes me to the explorer app. I click on map centre tab and click on Info. It shows a Share this Map title and provides an text input so I can identify members of groups or a checkbox to allow 'Everyone (public)' to view. It gives me a commit button to click. I click it. There is no embed code to be found and nothing more happening.

As far as the coordinates. Can you provide a link to the API and endpoint. I am a programmer and will hopefully will be able to look into this for myself. I don't have any sort of license. Is the API free to use. If so, this could work really well for what I want to do along the lines of a portlet. Many thanks.

Regards,
David
0 Kudos
DavidPratt
Emerging Contributor
I have determined the problem and it is an issue with the system. If you create a map initially using explorer and make public, it will link only to explorer when retrieving on argis.com. It does not expose the user to the page with the embed code. If you first create your map first at arcgis.com, the link generated to the map is different and brings up the page with the map description with the embed code. You can then open in arcgis explorer to make edits, add notes etc, and you are good to go. In any case this is confusing. I am unlikely be the last to run into this and this ought to be corrected or clarified in some way.

I would appreciate an answer to the question I had about the api and to get a sense of when notes will be able to be viewed in the maps (both on arcgis.com and iphone).

Many thanks
David
0 Kudos
MikeMinami
Esri Notable Contributor
Maps created in Explorer Online will by default open in Explorer Online. However, there is an option on Open in arcgis.com that will allow you to open the map in the arcgis.com viewer. See attached image.

Once open in arcgis.com viewer, on the toolbar you should see the Share option. From here you can copy embed code into your html page.

Here's a sample map I just made and embedded in a blog. This required no programming on my part, just copy/paste into the blog. Click on the pushpin for a pop-up window.

Click here for embedded map.

As you can see, we just updated arcgis.com and notes are now available. However, the iPhone app does not currently support Map Notes. That is coming with the next update to the iPhone application.

ArcGIS.com map viewer is built using our ArcGIS API for JavaScript. You can build your own application that reads in the map you create in arcgis.com too. Development with the APIs is free. Deployment is also free under certain conditions. Here's a link to more information about when you would need to get a license.

http://www.esri.com/software/arcgis/web-mapping/index.html

Here's a link to the API reference.

http://help.arcgis.com/en/webapi/javascript/arcgis/

Map Notes is the term we present to end users, but in the API, they are Feature Layers. Feature Layers contain graphics. Graphics have geometry and attributes. So you will have to navigate the API to access the geometry of these graphics.

One thing you might also try is to download a template from arcgis.com map viewer (another option on the Share dialog). From this you can see some code to build your own web application using the JavaScript API. The API reference also has lots of samples, but I don't think there are any yet that show accessing geometry.

Thanks,

Mike
0 Kudos