16,012,759 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by S.M.Arsalan (Top 13 by date)
S.M.Arsalan
11-Dec-13 16:01pm
View
where can i put the conditions in j son? I have already made the c# function to call on j son in HTML but i don't know how to switch between those functions?
S.M.Arsalan
6-Dec-13 13:42pm
View
sir i am using j son to view all events markers but i don't now how to filter it by j son? please tell me?
S.M.Arsalan
6-Dec-13 13:34pm
View
sir i am using j son to view all events markers but i don't now how to filter it by j son? please tell me?
S.M.Arsalan
4-Dec-13 16:41pm
View
could you please tell how to add conditions in javascript for Google Map markers? when the parameters changes by query markers appear on map as query(filtered)?
S.M.Arsalan
2-Dec-13 16:28pm
View
please see the code below
S.M.Arsalan
2-Dec-13 16:27pm
View
at map.aspx
<script type="text/javascript" src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyDr1aftH-xmixjAyUBfumW886tqSk_vo-4&sensor=true">
</script>
<script type="text/javascript">
function initialize() {
var markers = JSON.parse('<%=ConvertDataTabletoString() %>');
var markers = JSON.parse('<%=ConvertDataTabletoString1() %>');
var mapOptions = {
center: new google.maps.LatLng(markers[0].lat, markers[0].lng),
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
// marker:true
};
var infoWindow = new google.maps.InfoWindow();
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
for (i = 0; i < markers.length; i++) {
var data = markers[i]
var myLatlng = new google.maps.LatLng(data.lat, data.lng);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: data.title
});
(function (marker, data) {
// Attaching a click event to the current marker
google.maps.event.addListener(marker, "click", function (e) {
infoWindow.setContent(data.description);
infoWindow.open(map, marker);
});
})(marker, data);
}
}
</script>
S.M.Arsalan
2-Dec-13 16:24pm
View
protected void Page_Load(object sender, EventArgs e) {
}
public string ConvertDataTabletoString()
{
DataTable dt = new DataTable();
using (SqlConnection con = new SqlConnection("Data Source=arsalan\\sqlexpress;Initial Catalog=FindEvent;Integrated Security=true"))
{
using (SqlCommand cmd = new SqlCommand("select title=Chief-guest,lng=longitude,lat=Latitude,Comment from Event", con))
{
con.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
List<dictionary<string, object="">> rows = new List<dictionary<string, object="">>();
Dictionary<string, object=""> row;
foreach (DataRow dr in dt.Rows)
{
row = new Dictionary<string, object="">();
foreach (DataColumn col in dt.Columns)
{
row.Add(col.ColumnName, dr[col]);
}
rows.Add(row);
}
return serializer.Serialize(rows);
}
S.M.Arsalan
28-Nov-13 6:54am
View
please review a solution i am using
S.M.Arsalan
28-Nov-13 6:54am
View
please review a solution i am using
S.M.Arsalan
28-Nov-13 6:44am
View
In the upper solution i was getting the result on grid view but now i want to show it on map with markers
S.M.Arsalan
24-Nov-13 15:14pm
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FindEvent
{
public partial class map2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//if (!this.IsPostBack)
//{
// DataTable dt = this.GetData("select * from Locations");
// rptMarkers.DataSource = dt;
// rptMarkers.DataBind();
//}
}
protected void UpdatePanel1_Load(object sender, EventArgs e)
{
//Linq is used to load the table to the code
GoogleDataClassesDataContext data = new GoogleDataClassesDataContext();
//Select all from the table
List<city> lst = (from u in data.City select u).ToList();
//add the table contents to the javascript array so that new locations will be loaded
foreach (City item in lst)
{
ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "infoarray", "'" + item.C_ID.ToString() + "'");
ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "lonarray", item.Longitude.ToString());
ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "latarray", item.Latitude.ToString());
ScriptManager.RegisterArrayDeclaration(UpdatePanel1, "bounce", item.Bounce.ToString());
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
//update the update panel every 10 seconds
UpdatePanel1.Update();
}
}
}
S.M.Arsalan
24-Nov-13 14:58pm
View
Bring data to show on marker Sir
S.M.Arsalan
24-Nov-13 12:19pm
View
Yes Sir i have seen this all before but i need to place all details which are coming from the database tables? When every time Event is added by the Guest its marker will automatically shown on the Map?
Show More