Getty Images APIs enable seamless integration of Getty Images expansive content, powerful search and rich metadata directly into your internal workflows, products and services. With Connect’s API solutions, you can fully control, customize and scale as you grow. The Connect API uses JSON over HTTP POST to allow you to build applications capable of search and download on Getty Images using an active download agreement.
Singsys is a leading Singapore Web Design, Mobile (iPhone, iPad, Android) Application Development Company
Tuesday, 22 October 2013
How to implement Getty Images api with Connect’s API solutions
Getty Images APIs enable seamless integration of Getty Images expansive content, powerful search and rich metadata directly into your internal workflows, products and services. With Connect’s API solutions, you can fully control, customize and scale as you grow. The Connect API uses JSON over HTTP POST to allow you to build applications capable of search and download on Getty Images using an active download agreement.
Tuesday, 15 October 2013
Use Mapkit framework to create a custom annotation view over map view
To create a custom annotation view over map view using
Mapkit framework just follow these simple steps.
Step
1- While adding annotation don’t give its title and subtitle. Just add
it with Latitude / Longitude and take an integer variable that starts with
100(so that its tag do not clash with others) and increases as per the loop for
adding notation.
annotationTag = 100;
for(NSDictionary* postLocateDict in mapData ) {
double lat =
[[postLocateDict objectForKey:@"location_dx"] doubleValue];
double longt =
[[postLocateDict objectForKey:@"location_dy"] doubleValue];
CLLocationCoordinate2D loc;
loc.longitude = longt;
loc.latitude = lat;
MKPointAnnotation
*annotationPoint = [[MKPointAnnotation alloc] init];
annotationPoint.coordinate = loc;
[mapViewHuanBao addAnnotation:annotationPoint];
annotationTag++;
}
Step
2- When you add a notation this will call an MKMapViewDelegate function,
just set a tag of that notation.
- (MKAnnotationView *)mapView:(MKMapView *)mapView
viewForAnnotation:(id<MKAnnotation>)annotation {
if([annotation isKindOfClass:[MKUserLocation class]]) {
return nil;
}
static NSString *identifier =
@"myAnnotation";
MKAnnotationView *
annotationView = (MKAnnotationView *)[self.mapViewHuanBao dequeueReusableAnnotationViewWithIdentifier:identifier];
if
(!annotationView)
{
annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:identifier];
annotationView.image = [UIImage imageNamed:@"pin.png"];
}else {
annotationView.annotation = annotation;
}
annotationView.tag = annotationTag;
return
annotationView;
}
Step
3 – When you tap on notation, a delegate function will call where you
can identify the notation by its tag.
(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
Here you will identify the notation by its tag using following
code-
NSInteger indexOfTheObject = [mapView.annotations indexOfObject:view.annotation];
In indexOfTheObject you will get the notation tag.
Step 4- Now create a custom view as
per your requirement, and give tag to every property you used in that view. We
used callout view name as calloutView.
Set its file owner to your view controller.
Step 5- After finding the tag of
selected notation, just use following method to create a custom call out view.
[[NSBundle mainBundle] loadNibNamed:@"calloutView" owner:self options:nil];
CGPoint hitPoint =
[view convertPoint:CGPointZero toView:mapView];
[annotationView2 setFrame:CGRectMake(hitPoint.x-94,hitPoint.y-73, 220, 73)];
annotationView2.tag = selectedAnnotation;
UILabel *nameLbl = (UILabel *)[annotationView2 viewWithTag:[here give
ur tag which u set in custom view]];
And so on....
Step 6- Finally just add it to the
view.
[view addSubview:annotationView2];
You can also navigate it to its detail but for that you have
to add it on map view, because when you are adding it on view it will remove it
from view, so the object is DE
allocated.
We are working on its navigation on click while moving
, comment here if you found any problem.
Monday, 14 October 2013
Dussehra Celebration @Singsys Lucknow Office
Dussehra (Vijaya Dashami, Dasara, or Dashain) is a Hindu festival that celebrates the victory of good over evil.
Team Singsys celebrated Dussehra this
year in unique way with a theme "AAJ KAA RAVAN" to symbolic burning of
all the evils and victory of truth over evil.
Tuesday, 8 October 2013
Weekly Technology Tip : How to make connection with database in a C# window based application using App.config file
Creating a database connection string from
app.config is a very common practice used in C# windows based application. Follow these
simple steps to make connection with database in C# window based application
using App.config file.
Step1. Open
Visual Studio and create a new Windows application. (Path : Start -> All
Programs -> Microsoft Visual Studio 2010-> Microsoft Visual Studio 2010)
Step2. Add a new Application Configuration
file App.config file
to the project.
Step3. Provide the connection string
name, database name and system related information in the App.config file.
<configuration>
<connectionStrings>
<add name="customConnection" connectionString="Data Source=Custom-PC;Initial
Catalog=customDB;User Id=sa;Password=" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
Step4. Making a separate
connection class.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
namespace customproject
{
public
class Class_custom
{
public
SqlConnection con ;
public
SqlCommand cmd;
public
Class_custom()
{
con = new SqlConnection(ConfigurationManager.ConnectionStrings["customConnection "].ConnectionString);
con.Open();
cmd = new SqlCommand();
cmd.Connection = con;
}
}
}
Using
above code, the user can make connection with database in a C# window using
App.config file.
Singsys is Singapore based custom website design, web applications
and mobile application development company. Services include Website,
Android Apps, iPhone and iPad Apps, CMS based websites using Drupal,
Joomla and Wordpress, Ecommerce solutions based on Magento,
Virtuemart, Ubercart, Prestashop and OSCommerce. Call us at +65-65613900 or email to
info@singsys.com
Subscribe to:
Posts (Atom)