Search in Google Map v2 with marker - search

How Can I Geocode/Search a location or a certain place/point in Google Maps V2 Map Fragment
and then,place a marker on that point of the mapfragment.

You can use the Google Maps Javascript API v3 here http://vdw.staytuned.gr/get-coordinates-of-google-map-draggable-marker-using-google-maps-javascript-api-v3/ and then go here https://developers.google.com/maps/articles/phpsqlajax_v3 so you can save your data's in your database

Related

Using azure maps fuzzy search returns duplicate results

I'm building a smart search that will be used to lookup the Town/City of the user using Azure Maps Address Fuzzy Search API.
For some reason I'm getting duplicate results where the Municipality and MunicipalitySubdivision are reversed:
This is when using the following:
https://atlas.microsoft.com/search/fuzzy/json?subscription-key=<<KEY_HERE>>&api-version=1.0&query=Walsall%20Birmingham&typeahead=false&limit=50&countrySet=gb&idxSet=GEO
I'm interested in storing the following:
Country
Municipality
MunicipalitySubdivision
Latitude
Longitude
I don't want to display street level data, purely GEO (town, city etc).
Is there a setting which I'm missing for the fuzzy search, or would I be better off using one of the other search services?

How to set a value in a list as the key for Azure Cognitive Search

The data I have is of the form
{"event": {"custom": {"dimensions": [{"Id": ....}, {},...{}]}, ...},...}
The key that I need to index by is in the list. However, Cognitive Search does not seem to let me access the value within the list. Azure Cog. Search also fails to access any content from the list while trying to index.
Are there any solutions you can think?
Not sure how you're trying, but Azure Cognitive Search supports Complex types. Take a look in the following link:
https://learn.microsoft.com/en-us/azure/search/search-howto-complex-data-types
As an Alternative, you can project the internal dimensions (assuming they have a fixed number of dimensions) to fields in your index.
When using Indexers to import the data, key fields are limited to what can be expressed in a field mapping which has some support for mapping functions but wont allow you to select a value of an object in a collection. Your only options are to pre-process and transform the data (such as a query if this is coming from Cosmos DB, or azure function trigger if coming from blobs) or use a different field as the id and put the dimension id in another field that is queryable.
To make the data queryable you can use complex types or if the dimensions are always in the same ordinal you can use output field mappings to map it to a field by collection ordinal such as /document/event/custom/dimensions/1.

Search for multiple attributes with forge viewer

The AutoDesk Forge Viewer has a search function that takes in a search text, callbacks and an array of attributes to look at:
but what I want to do is search for a certain value in the "Level" attribute and a certain value in the "Category"-attribute of element at the same time.
Is this possible with the existing search-function or am I missing something in the API?
Cannot be done, the search feature in the viewer API is pretty basic, will let you search a text only in the property values and you cannot use combined queries ... The best suggestion for what you are looking for would be to read all the properties, which can be done using Model Derivatives API (see /GET :urn/metadata/:guid/properties endpoint) and store those in your own database/system, where they can be indexed and exposed through a more powerful query mechanism. Sorry for the bad news ...

Google Datastore partial string matching

I have read that there is the Search API. But it seems like this API does not exist for Node.JS.
How can I partially match strings for querying entities without knowing the full name of the attribute?
For example I want to select all users that start with a G. How can I accomplish this?
Thank you for your help!
While you cannot do a "true" partial string matching (i.e. contains) with Datastore, you can do a "begins with" query as described in this post:
Basically, create a composite inequality filter like this:
SELECT * FROM USER WHERE USERNAME >= 'G' AND USERNAME < 'G\ufffd'.
Here, \ufffd is the last valid unicode character.
This would return all entities with their usernames starting with 'G'. You can use the same technique for matching multiple characters (e.g. >= 'JA' and < 'JA\ufffd').
Note that the string values/indexes in the Datastore are case sensitive, so you need an indexed property with all characters in either lower case or upper case so you can perform the search accordingly.
You can also mimic a word search like this -
Let's say you have a property named name that stores the following values:
John Doe
John Smith
James Mike Murphy
To do a word search (find entities with word smith or james and murphy) - create another property (e.g. nameIndex) and store the words from name as an array property (note that all words are converted to lower case).
["john","doe"]
["john", "smith"]
["james", "mike" "murphy"]
Now you can do a word search using the nameIndex property -
SELECT * FROM Entity WHERE nameIndex = 'smith'
SELECT * FROM Entity WHERE nameIndex = 'james' AND nameIndex='murphy'
Again, note that the nameIndex need to store the data in a fixed case (lower or upper) and your query parameters should use that case. Also, OR queries not supported unless the client library you are using supports it (typically done by running multiple queries).
This approach won't work if your property has more than 1500 bytes of data (limit for indexed properties)
Again, the proposed solutions are not replacement for full text search engines, rather a couple of tricks you could do with Datastore alone and may satisfy simple requirements.
You can't perform partial match searches on the Datastore entities (let alone without knowing the name of the property/attribute). See Appengine Search API vs Datastore
And the Search API is, indeed, not available in the flexible environment (that includes Node.JS). A potential alternative is indicated the Search section in Migrating Services from the Standard Environment to the Flexible Environment:
The Search service is currently unavailable outside of the standard
environment. You can host any full-text search database such as
ElasticSearch on Google Compute Engine and access it from both
the standard and flexible environments.
UPDATE:
Node.JS is currently available in the standard environment as well, see:
Now, you can deploy your Node.js app to App Engine standard environment
Google App Engine Node.js Standard Environment Documentation

Drupal 7 GeoField Proximity using Search API Index

I've created a view that utilizes Search API integration and allows searching node fields. I have related content to ol_locator_location (Location) which is comprised of Address and GeoField. I have indexed the GeoField (ALL possibile iterations including WKT). I'd like to perform Proximity (Distance) searches against the indexed nodes based on the WKT data that is available. The problem is that GeoField:Proximity doesn't seem to relate well.
I'm able to add the GeoField of the related nodes and I'm able to see this on the OpenLayers map but I'm not offered any option for Proximity searching. How can I get this working?
You need to use the search_api_location module. That module adds new abilities to your geopoint filter, namely, being able to specify a point and search for nearby (proximity) places based on a radius.
Alternatively, if you like to program, you can query the solr search yourself and create the view you want using PHP or Javascript.
http://wiki.apache.org/solr/SpatialSearch
http://docs.lucidworks.com/display/solr/Spatial+Search

Resources