Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 145
Registered: ‎02-17-2016
Accepted Solution

Add Google Location API in the livesearch control

I have implemented Google Maps search to the live search control, as detailed in https://sdk.hexagongeospatial.com/index.php?title=Add_Google_Location_API_in_the_livesearch_control

 

My questions are - 

  • does this dll pass a Google API key, and if so where is that in the code on the above webpage?
  • Can this search be altered to rank its results based on teh geographic extents of the current map view?

When using the 'real' Google Maps, when searching for a street name with the United Kingdom displayed in the map view, you get different returns to when having the United States displayed, for example, even when searching for the same street name.

 

Thanks

Richard

 

Super Contributor
Posts: 358
Registered: ‎10-12-2015

Re: Add Google Location API in the livesearch control

Hi Richard,

 

Currently we use a local tool that searches google address rather the live search community example you are using, so can't comment directly on the community example at this point. Based on our experience with our local tool:

  • Map google API key and the search google API key must be the same or it won't work. (we had the portal web.config google api key set to value A and our custom google location API tool set to api key value B and it failed.)
  • There are two options in the google location API - Region (e.g. UK, NZ, US etc) and/or geographic bounding box. We had good success with region code, limited success with the geographic bounding box. No idea if you can define that in the community example Add_Google_Location_API_in_the_livesearch_control

Shaun

Highlighted
Frequent Contributor
Posts: 145
Registered: ‎02-17-2016

Re: Add Google Location API in the livesearch control

Thanks Shaun. I do not have any Google API key set in the Portal web.config, so presume the example I have used is not passing any API key.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.