Maps API for JavaScript - Autocomplete and H.PlacesService - here-api

I'm writing a web application that should provide an autocomplete component.
So I was thinking to use H.PlacesService to access the low-level Places REST API.
PlacesService.suggest calls the suggest entry point that is deprecated (https://developer.here.com/documentation/places/topics_api/resource-suggest.html)
why?
what should I use? the autosuggest entry point?
Anyway, the autosuggest entry point (I guess should replace the suggest entry point) is not implemented by the placesServices.
So at the end
Is using PlacesService wrapper a good approach?

Go for HERE REST API.
See two examples, using typescript or jquery-ui

There is also a Geocoder Autocomplete API which could be a possibility:
https://developer.here.com/documentation/geocoder-autocomplete/topics/key-concepts.html
Here you can find some example with the JS API:
https://tcs.ext.here.com/examples/v3/geocoder_autocomplete

Related

Attribution requirements for Google Translate

I wish to use the results of the Google translation that results from right clicking on a web page in Chrome, as opposed to using the API. These results I will use as part of a web language learning tool. I have read this page: https://cloud.google.com/translate/attribution about adding a logo, and have also read the HTML markup requirements at https://cloud.google.com/translate/markup.
My question is as these terms and conditions pages are referring to the API, do they also apply to using the translation results of using the Chrome menu item? I could use the API but this is much simpler for my temporary need.
Yes, when you're using the Google Translate Tool in a page by using the right-click, you can see that it send a request to the Google Translate API.
In definition, you have to add Google Attribution.
I guess for a personal website or non-commercial use it might not be that big of an issue but still, it will avoid future ones.

Getting component fields without having to query the underlying XML

Using the Core Service API, is there any way to retrieve the fields of a component without having to resort to querying the underlying XML or using a third party(?) wrapper class?
It's fairly simple when using the TOM.NET API
Tridion.ContentManager.ContentManagement.Component component = [get a component];
var componentFields = new Tridion.ContentManager.ContentManagement.Fields.ItemFields(component.Content, component.Schema);
var summary = ((Tridion.ContentManager.ContentManagement.Fields.TextField)componentFields["summary"]).Value;
But when I start using the Core Service API it seems a little more complicated as there is no Tridion.ContentManager.ContentManagement.Fields.ItemFields class to wrap around the component.Content.
I understand Frank van Puffelen has written a set of classes to implement this wrapper functionality but I am a bit wary of using code that is not officially supported by SDL (or is it?).
At the moment it seems to me the functionality to gracefully retrieve fields from a component using the Core Service API has not been fully implemented. I hope I will be proved wrong!
If you are looking for an official wrapper to access the ComponentData content, there is not such a thing as that.
Frank's classes are not officially supported, it is open source code(under the MIT License), but it is built using a supported API, so you should be ok using it.
On the other hand it is not such an extensive piece of code, so if you have an issue, you can probably try to solve it yourself. As already other fellow developers did, as you can see on the page comments.
This question has been asked before, more than once actually..
For example: How to set content to a component without loading XML in SDL Tridion using core services?.

ASP.NET MVC3 generating google maps through address

I'm using ASP.NET MVC 3 Framework and I want to use Google Maps (v3) to display the location of my customers. I can take the value of their addresses/City from the database, but how can I combine these two? I'm using Razor engine.
If you are new to Google Maps I would suggest reading through their documentation and looking over the examples to get an idea on how the API works.
Another good tutorial to look at is the 4 guys from Rolla article on implementing a store locator application. The article was originally written in Web Forms and then later updated to MVC. There is relevant information in both. They do not use Razor views, but they do a good job at showing how to query the Google Maps API on the server side and packaging the results in a JSON object to display on the map.
Your View will be pretty simple if you just want markers on a map. The only HTML you would need is a div to store the map.
I suggest getting your addresses through AJAX. MVC has a lot of good JSON stuff (like JsonResult), so you'll be able to send objects instead of parsing HTML. Since you're doing AJAX, I'm obliged to mention JQuery, I don't make AJAX calls without it. You can add the HttpPost attribute to your JSON response function too, and even make it secure!

OpenStreetMap in ASP.NET

I'm interested in using OpenStreetMap in a web application developed using ASP.NET.
Anyone knows if there is a control, library or wrapper for using OpenStreetMap in ASP.NET? (C#, not using Javascript).
Thanks in advance.
I'm not sure whether they have any ASP specific tools, but Cloudmade have lots of tools & API you can use to get OpenStreetMap into your app. It's mostly done on the client though through JavaScript, so I don't think you'll find much in the way of C# tools.
I could be wrong though...
BruTile is a C# library for displaying a slippy map. It can be used on the web, displaying via silverlight.
In my opinion a silverlight requirement is not a sensible choice for a public website, and not very sensible for internal use either from a long term perspective, so this isn't a great solution. But this is the only thing I'm aware of which matches what you're asking for.
"not using Javascript" is a curious restriction, since most embedded web maps use javascript. Perhaps you mean you don't want to work with any javascript, but the website can use it. In which case... I'm still not aware of any C# solution, but a library which wraps OpenLayers or one of the other alternatives, hiding all javascript development from you, would be very feasible. Someone should build such a thing! In the meantime, the javascript to display a slippy map is quite simple I promise :-)
The other approach might be a Static Map Image generating library which fetches tile images, stitches them into a single image and caches it locally for you to display in an <img> tag. Again such a thing would be very feasible (easy!?) to build with C#. Someone should do it! In the meantime you can link to one of those services (e.g the new one from MapQuest) directly from an <img> tag on your site. ...No javascript, and no C# either!

how can i make google like intelligence searching system?

I want to make google like intelligence searching system for searching data from list in my project. i mean when i write something in google bar for searching it automatically start showing some related words in down side. how can i achieve that search in my project? should i use some API ?
With ASP.NET AJAX, you can use AutoComplete control which would give you that functionality 'as is' without writing any extra code.
You can use Jquery too

Resources