Solved

how to add point to gis map using asp.net c#

Posted on 2010-09-05
4
2,028 Views
Last Modified: 2012-05-10
Hello,
I have this case ,
- I have asp.net c# web  application stores information about Incidents including the coordinates of that indecent The XY that he already taken by a GPS device ,all these info. is stored in sql server 2008 DB

what I want is to plot that XY point on the map with some info on it ,
the map should be web application too  

what I have : - ArcGis server 9.3.1 (installed )
                         ArcGis desktop 9.3 (installed )
                         ArcSde 9.2 (installed and successfully connected with sql server)
                         MS VS.NET 2008 (installed )
                        Sql server 2008 (installed on a remote machine )

the question is how to accomplish that , what is the steps should I walk through ?
thanks in advance  
0
Comment
Question by:palserv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Assisted Solution

by:AndyEastham
AndyEastham earned 250 total points
ID: 33609712
Hi,

Have you considered doing this with the Google Earth API?
http://code.google.com/apis/earth/

Andy
0
 
LVL 13

Accepted Solution

by:
Molnar István earned 250 total points
ID: 33644516
i didn't work with arcgis, but here is some idea how you can accomplish that in google map:
a.) you can use google map api
1. retrieve data from the database with asp.net (c#)
2. after you get the data from the database, create some variables for X and Y coordinates in C# and add the data from the database to these variables
3. pass these server variables to javascript which contains the coords
    (ex: java script:
                               var ClientVariableX = '<%= ServerVaraibleX %>';
                                var ClientVariableY = '<%= ServerVaraibleY %>';)
4. create markers with info window from the x, y data in google map
(see JS code below))
5. add the JS in the body of page
b.) you can use for free the Subgurim google map asp.net user control http://en.googlemaps.subgurim.net/ to accomplish the above

if you deside to use google map, here is a good starting site with many useful examples:
http://econym.org.uk/gmap/

hope it helps you
<script type="text/javascript">

    var ClientVariableLat = '<%= ServerVaraibleLat %>';
    var ClientVariableLng = '<%= ServerVaraibleLng %>';
    
    if (GBrowserIsCompatible()) 
    { 

      function createMarker(point,html) 
      {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});
        return marker;
      }

      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(43.907787,-79.359741),8); //set the initial location
    

      var point = new GLatLng(ClientVariableLat,ClientVariableLng);
      var marker = createMarker(point,'write here some stuff to display in the info Window')
      map.addOverlay(marker);

    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

    </script>

Open in new window

0
 

Author Comment

by:palserv
ID: 33661243
I appreciate your help , but the institution I work for is using ArcGis software and have its own maps and gis database , so google maps doesn't apply my needs

thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question