Map search

71 views
Skip to first unread message

David Osborne

unread,
Apr 25, 2019, 9:18:26 AM4/25/19
to Arches Project
We use the Mapbox 'Outside' OpenStreetMap layer as our basemap for the Arches site we are developing for Jersey Heritage. I've been asked why the search field in the top right hand corner of the map ('Locate a Place or Address') doesn't include place names on Jersey, apart from names of most of the twelve parishes on the island. Even Jersey postcodes cannot be found, although UK ones work — for those who don't know, Jersey is not part of the United Kingdom.

I'm guessing that the search box is linked to a gazetteer database connected with the OSM basemap. Is it possible to supplement the search with local place names, if we could obtain a list of them with their corresponding co-ordinates? In theory, we could even replace the gazetteer, as we would only be interested in searches for place names within the island's jurisdiction.

Thanks
David

Cyrus Hiatt

unread,
Apr 25, 2019, 2:43:55 PM4/25/19
to arches...@googlegroups.com, daosborne....@gmail.com
Hi David - 

The search box uses the mapbox geocoder by default. There are a few ways that you could customize this:

The best, but most difficult approach:
Create a new geocoder by writing a new geocoder component and registering that in Arches.  That would be similar to this file: `arches/app/media/js/views/components/geocoders/mapbox.js`.  Then you would need to create a new record in the geocoders table.  Then you would update the `DEFAULT_GEOCODER` setting in your project's settings file to use the geocoderid for your new record. 

The easier approach:
You could add a `js/views/components/geocoders/` directory to your project and create a component similar to: arches/app/media/js/views/components/geocoders/mapbox.js.  You would have to update the `component` field for the default geocoder (Mapbox) in the geocoders database table to point to your new component.

Even easier: 
Add a `js/views/components/geocoders/` directory to your project. Copy the `arches/app/media/js/views/components/geocoders/mapbox.js` file into that directory. That should override the file in arches. Then modify it to use whatever geocoding service best suits your needs. The drawback here of course is that you have to remember that the file called 'mapbox' isn't really using mapbox's service, but that might not be a concern for you.
 
 Hope that helps,

- Cyrus



--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to archesproject+unsubscribe@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups "Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archesproject+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Osborne

unread,
Apr 26, 2019, 5:36:49 PM4/26/19
to Arches Project
Thanks for the suggestions, Cyrus. I'll have a look at the code and see what I can do.

Regards,
David

On Thursday, 25 April 2019 19:43:55 UTC+1, Cyrus Hiatt wrote:
Hi David - 

The search box uses the mapbox geocoder by default. There are a few ways that you could customize this:

The best, but most difficult approach:
Create a new geocoder by writing a new geocoder component and registering that in Arches.  That would be similar to this file: `arches/app/media/js/views/components/geocoders/mapbox.js`.  Then you would need to create a new record in the geocoders table.  Then you would update the `DEFAULT_GEOCODER` setting in your project's settings file to use the geocoderid for your new record. 

The easier approach:
You could add a `js/views/components/geocoders/` directory to your project and create a component similar to: arches/app/media/js/views/components/geocoders/mapbox.js.  You would have to update the `component` field for the default geocoder (Mapbox) in the geocoders database table to point to your new component.

Even easier: 
Add a `js/views/components/geocoders/` directory to your project. Copy the `arches/app/media/js/views/components/geocoders/mapbox.js` file into that directory. That should override the file in arches. Then modify it to use whatever geocoding service best suits your needs. The drawback here of course is that you have to remember that the file called 'mapbox' isn't really using mapbox's service, but that might not be a concern for you.
 
 Hope that helps,

- Cyrus



On Thu, Apr 25, 2019 at 6:18 AM David Osborne <daosborne....@gmail.com> wrote:
We use the Mapbox 'Outside' OpenStreetMap layer as our basemap for the Arches site we are developing for Jersey Heritage. I've been asked why the search field in the top right hand corner of the map ('Locate a Place or Address') doesn't include place names on Jersey, apart from names of most of the twelve parishes on the island. Even Jersey postcodes cannot be found, although UK ones work — for those who don't know, Jersey is not part of the United Kingdom.

I'm guessing that the search box is linked to a gazetteer database connected with the OSM basemap. Is it possible to supplement the search with local place names, if we could obtain a list of them with their corresponding co-ordinates? In theory, we could even replace the gazetteer, as we would only be interested in searches for place names within the island's jurisdiction.

Thanks
David

--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to arches...@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en

---
You received this message because you are subscribed to the Google Groups "Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arches...@googlegroups.com.

David Osborne

unread,
Feb 29, 2020, 11:02:00 AM2/29/20
to Arches Project
Hi Cyrus

I'm finally revisiting our need for a new gazetteer service to replace the Mapbox one. I have an instance of Gisgraphy running in a Docker container but although I took your 'even easier' approach by modifying a local copy of the mapbox.js geocoder, I can't seem to override Arches using the Mapbox service. Is there something I need to do to make that local copy take effect?

David

On Thursday, 25 April 2019 19:43:55 UTC+1, Cyrus Hiatt wrote:
Hi David - 

The search box uses the mapbox geocoder by default. There are a few ways that you could customize this:

The best, but most difficult approach:
Create a new geocoder by writing a new geocoder component and registering that in Arches.  That would be similar to this file: `arches/app/media/js/views/components/geocoders/mapbox.js`.  Then you would need to create a new record in the geocoders table.  Then you would update the `DEFAULT_GEOCODER` setting in your project's settings file to use the geocoderid for your new record. 

The easier approach:
You could add a `js/views/components/geocoders/` directory to your project and create a component similar to: arches/app/media/js/views/components/geocoders/mapbox.js.  You would have to update the `component` field for the default geocoder (Mapbox) in the geocoders database table to point to your new component.

Even easier: 
Add a `js/views/components/geocoders/` directory to your project. Copy the `arches/app/media/js/views/components/geocoders/mapbox.js` file into that directory. That should override the file in arches. Then modify it to use whatever geocoding service best suits your needs. The drawback here of course is that you have to remember that the file called 'mapbox' isn't really using mapbox's service, but that might not be a concern for you.
 
 Hope that helps,

- Cyrus



On Thu, Apr 25, 2019 at 6:18 AM David Osborne <daosborne....@gmail.com> wrote:
We use the Mapbox 'Outside' OpenStreetMap layer as our basemap for the Arches site we are developing for Jersey Heritage. I've been asked why the search field in the top right hand corner of the map ('Locate a Place or Address') doesn't include place names on Jersey, apart from names of most of the twelve parishes on the island. Even Jersey postcodes cannot be found, although UK ones work — for those who don't know, Jersey is not part of the United Kingdom.

I'm guessing that the search box is linked to a gazetteer database connected with the OSM basemap. Is it possible to supplement the search with local place names, if we could obtain a list of them with their corresponding co-ordinates? In theory, we could even replace the gazetteer, as we would only be interested in searches for place names within the island's jurisdiction.

Thanks
David

--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to arches...@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en

---
You received this message because you are subscribed to the Google Groups "Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arches...@googlegroups.com.

David Osborne

unread,
Mar 1, 2020, 3:55:57 PM3/1/20
to Arches Project
Supplementary question: as the geocoder access is from a fragment of Javascript, I take it that the connection to the geocoder is from a user's browser, rather than from the Arches application itself?

David

On Thursday, 25 April 2019 19:43:55 UTC+1, Cyrus Hiatt wrote:
Hi David - 

The search box uses the mapbox geocoder by default. There are a few ways that you could customize this:

The best, but most difficult approach:
Create a new geocoder by writing a new geocoder component and registering that in Arches.  That would be similar to this file: `arches/app/media/js/views/components/geocoders/mapbox.js`.  Then you would need to create a new record in the geocoders table.  Then you would update the `DEFAULT_GEOCODER` setting in your project's settings file to use the geocoderid for your new record. 

The easier approach:
You could add a `js/views/components/geocoders/` directory to your project and create a component similar to: arches/app/media/js/views/components/geocoders/mapbox.js.  You would have to update the `component` field for the default geocoder (Mapbox) in the geocoders database table to point to your new component.

Even easier: 
Add a `js/views/components/geocoders/` directory to your project. Copy the `arches/app/media/js/views/components/geocoders/mapbox.js` file into that directory. That should override the file in arches. Then modify it to use whatever geocoding service best suits your needs. The drawback here of course is that you have to remember that the file called 'mapbox' isn't really using mapbox's service, but that might not be a concern for you.
 
 Hope that helps,

- Cyrus



On Thu, Apr 25, 2019 at 6:18 AM David Osborne <daosborne....@gmail.com> wrote:
We use the Mapbox 'Outside' OpenStreetMap layer as our basemap for the Arches site we are developing for Jersey Heritage. I've been asked why the search field in the top right hand corner of the map ('Locate a Place or Address') doesn't include place names on Jersey, apart from names of most of the twelve parishes on the island. Even Jersey postcodes cannot be found, although UK ones work — for those who don't know, Jersey is not part of the United Kingdom.

I'm guessing that the search box is linked to a gazetteer database connected with the OSM basemap. Is it possible to supplement the search with local place names, if we could obtain a list of them with their corresponding co-ordinates? In theory, we could even replace the gazetteer, as we would only be interested in searches for place names within the island's jurisdiction.

Thanks
David

--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to arches...@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en

---
You received this message because you are subscribed to the Google Groups "Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arches...@googlegroups.com.

Andrew Jones

unread,
Mar 2, 2020, 4:04:46 AM3/2/20
to Arches Project
We created an ESRI geocoder to use their World geocoding service.  The code and instructions for configuring it are here and might be helpful...

David Osborne

unread,
Mar 2, 2020, 11:42:47 AM3/2/20
to Arches Project
Thanks for reminding me of your ESRI geocoder, Andrew. I've got it working with our Arches installation and can use it as the basis for getting ours working.

One thing that caught me out is to remember, if using Apache to serve web resources, to copy the Javascript component into the appropriate location in the static web directory tree.

David

David Osborne

unread,
Mar 10, 2020, 4:51:25 PM3/10/20
to Arches Project
Hi Andrew

The ESRI geocoder does what exactly we need and is fast at finding results after I added the countryCode parameter to the Javascript, so thank you for mentioning it.

After a search, we get a red filled circle marking the point. I can't find where the styling of the marker is defined: is it possible to change it? At the moment, it's difficult to distinguish the geocoder marker from the sites in our Heritage Assets overlay, which are almost the same colour and size.

David

On Monday, 2 March 2020 09:04:46 UTC, Andrew Jones wrote:

Andrew Jones

unread,
Mar 11, 2020, 6:04:35 AM3/11/20
to Arches Project
David,

The BaseGeocoderViewModel has the code to do this but it was simple enough to pull it into the esrigeocoder.


You are limited to the Mapbox layer styling but you can easily set the size and colour of the point.

Andy
Reply all
Reply to author
Forward
0 new messages