Embed Points in Single HTML Map Page

2762
25
Jump to solution
05-16-2014 02:15 AM
glennlawrence
New Contributor
Can anyone advise where I might find a tutorial on how to create a simple Map and add Markers/Points with popup InfoWindows and have all the code embedded in a single HTML page?

I have been browsing the Developer Samples but cannot seem to find a sample or tutorial on how to do this.

Many thanks in advance...

Glenn
0 Kudos
25 Replies
glennlawrence
New Contributor
Actually Tim, I should have read your post correctly! I see now you gave a link to the marker types. I'll play around with this and let you know how I get on.

Cheers...
0 Kudos
glennlawrence
New Contributor
Hey Tim,

I haven't managed to figure out how to change the symbol to an image like a Pin or Buble etc. However I have just changed the shape and the colour so I can categorize this way. This should do fine for now, cheers for this...

Another quick one for you if you don't mind - There may be times that all my points won't be visable on the map due to users zooming/dragging the map etc. If I click on a button for a point that is not curretly visible on the map, the map doesn't auto move to that point and the infoWindow may only partially show, or not show at all, depending on how far the map has been zoomed or dragged away from the selected point. You can see this in your example, if you drag the map so your points are out of sight, then click on a button, you will see the points don't come back into view.

Do you have any idea how I can set the map to zoom/move back and show the current clicked point?

Many thanks in advance...
0 Kudos
TimWitt
Frequent Contributor
Glenn,

I have added that function to my application. The code I added is under //ZOOM TO

http://jsfiddle.net/timw1984/dfrCn/3/

Let me know if that works!

Tim
0 Kudos
glennlawrence
New Contributor
Works great,

Thanks again Tim...
0 Kudos
TimWitt
Frequent Contributor
Glenn,

Talking about a better marker variate, check out my latest version.

I am using PictureMarkerSymbols instead of simple points. You can either host your pictures and then replace the link that I used, or you can take advantage of the ArcGIS Online Markers that can be found here. Just grab the link of the marker you like and replace the one that I use.

Let me know if that helps!

Tim
0 Kudos
glennlawrence
New Contributor
That helps a lot Tim!

Thanks again for your effort and help on this...

Once I have the finished product I will post a link with a sample of what I have put together, in case anyone else finds it useful.

Cheers...

Glenn
0 Kudos