Getting started and build your first application

1985
6
12-12-2012 02:17 AM
AndréWieghardt
New Contributor II
Hi, i'm currently try to build an application with the simple purpose to displays WMS services. I want to do it with the "ArcGIS API for JavaScript". I'm new on this terretory so i used a step-by-step tutorial from the 'ArcGIS Resource Center'. I'm on this site: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm (go to "getting started"->"Build your first application"). I tryed it, but it doesn't work.
I attached my html document as a .txt file. Is there anybody with a little clue for me?
Please don't be too judgmental to me 😉
0 Kudos
6 Replies
SunilPalkar
Occasional Contributor
Hi,

Please check this link I think you have misplaced the  dojo.addOnLoad(init); function

Link : http://jsfiddle.net/sunilspalkar/esZHc/

thanks and all the best : )
0 Kudos
SunilPalkar
Occasional Contributor
0 Kudos
AndréWieghardt
New Contributor II
Hi,

Please check this link I think you have misplaced the  dojo.addOnLoad(init); function

Link : http://jsfiddle.net/sunilspalkar/esZHc/

thanks and all the best : )


At first, thanks for your fast response and yes you're right, the function was misplaced. It was there because of some troubleshooting. But it doen't work when i put the function into the right place. See here:

------------------
    function init() {
..................... ........................................
                        }
  dojo.addOnLoad(init);
</script>
-------------------------
when i open the .html document, i only got an emty site.
Any other hints?
0 Kudos
ChrisSergent
Regular Contributor III

I see the map on jsfiddle. Did you add the site on IIS?

You also might want to try the newest example tutorial that uses AMD: Create a map | ArcGIS API for JavaScript

0 Kudos
ChrisSergent
Regular Contributor III
Attached is modification of your page. I placed the JavaScript below the body tag and before the html tag based on best practices, but you should be able to run this page with no problem.

Let me know if you have any questions.

Chris S.
0 Kudos
AndréWieghardt
New Contributor II
Allright, it was my bad at all. I didn't read the introduction properly so i ignored the fact, that i have to establish an IIS Server. Now the .html document works.
Thanks to you all