<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: new esri leaflet plugin samples in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780913#M514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've encountered a weird quirk with the Geocoding plugin for Leaflet. When I use the ESRI World Geocoder, the map zooms in to the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I use my organization's geocoding service and have the ESRI geocoder turned off, the marker is placed at the right location, but the map zooms out to a multi-state view. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample codes is on &lt;A href="http://www.codecademy.com/pmckinney/codebits/je1Gnm"&gt;Codeacademy&lt;/A&gt;. I couldn't get JS Fiddle to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or direction pointing is most helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 May 2015 18:59:32 GMT</pubDate>
    <dc:creator>PatrickMcKinney1</dc:creator>
    <dc:date>2015-05-06T18:59:32Z</dc:date>
    <item>
      <title>new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780910#M511</link>
      <description>&lt;P&gt;&lt;SPAN&gt;we've added some new plugin samples to the Esri Leaflet website that show renderers from ArcGIS Online, accessing GP services, and searching feature layers and map services at the same time as you geocode...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A class="generated-link" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #287433;" href="http://esri.github.io/esri-leaflet/examples" data-jive-statusinputadd="true" data-jive-truncation-flag="true" target="_blank"&gt;Esri Leaflet Quickstart | Esri Leaflet&lt;/A&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;enjoy!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 13:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780910#M511</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2023-08-28T13:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780911#M512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;The new samples are great!&amp;nbsp; I was looking at the geocoding sample (&lt;A href="http://esri.github.io/esri-leaflet/examples/geocoding-control.html"&gt;here&lt;/A&gt;)... very cool!&amp;nbsp; Do you guys have any plans for releasing a sample that shows how to integrate geocoding from a custom service instead of one from AGOL?&amp;nbsp; Don't want to reinvent the wheel here if it's already on your list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 18:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780911#M512</guid>
      <dc:creator>NickO_Day</dc:creator>
      <dc:date>2015-02-06T18:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780912#M513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the closest available &lt;A href="http://esri.github.io/esri-leaflet/examples/search-map-service.html"&gt;sample&lt;/A&gt; demonstrates how to plug in a MapService provider, but you could use similar logic to insert your own &lt;A href="https://github.com/esri/esri-leaflet-geocoder#lesrigeocodingservicesgeocoding"&gt;geocoding provider&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'd be happy to review a jsfiddle or jsbin if you get stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we get a simple sample together, i think it would be nice to add it to our website.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 18:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780912#M513</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2015-02-06T18:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780913#M514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've encountered a weird quirk with the Geocoding plugin for Leaflet. When I use the ESRI World Geocoder, the map zooms in to the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I use my organization's geocoding service and have the ESRI geocoder turned off, the marker is placed at the right location, but the map zooms out to a multi-state view. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample codes is on &lt;A href="http://www.codecademy.com/pmckinney/codebits/je1Gnm"&gt;Codeacademy&lt;/A&gt;. I couldn't get JS Fiddle to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or direction pointing is most helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 18:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780913#M514</guid>
      <dc:creator>PatrickMcKinney1</dc:creator>
      <dc:date>2015-05-06T18:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780914#M515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your geocoding service is returning a bogus extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.ccpa.net/arcgiswebadaptor/rest/services/CompositeLocator/GeocodeServer/find?text=1900+grantham+road&amp;amp;sourceCountry=&amp;amp;outFields=*&amp;amp;maxLocations=&amp;amp;bbox=&amp;amp;outSR=4326&amp;amp;f=html" title="http://gis.ccpa.net/arcgiswebadaptor/rest/services/CompositeLocator/GeocodeServer/find?text=1900+grantham+road&amp;amp;sourceCountry=&amp;amp;outFields=*&amp;amp;maxLocations=&amp;amp;bbox=&amp;amp;outSR=4326&amp;amp;f=html"&gt;http://gis.ccpa.net/arcgiswebadaptor/rest/services/CompositeLocator/GeocodeServer/find?text=1900+grantham+road&amp;amp;sourceCountry=&amp;amp;outFields=*&amp;amp;maxLocations=&amp;amp;bbox=&amp;amp;outSR=4326&amp;amp;f=html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have a couple different options to resolve the problem:&lt;/P&gt;&lt;P&gt;1. figure out how to fix the locator &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Geocode_services/01540000035t000000/"&gt;itself&lt;/A&gt; &lt;/P&gt;&lt;P&gt;2. override the plugin behavior in your leaflet app to just center on the address and a fixed zoom level instead of relying on the extent your service is passing back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 22:40:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780914#M515</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2015-05-06T22:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780915#M516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there sample code available to center the map on the geocode result at a specified zoom layer?&amp;nbsp; I added the code below, which moved the marker to the correct location.&amp;nbsp; However, the console log reports "Uncaught TypeError: Cannot read property 'lat' of null."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the marker does not redraw unless the location is within the current view.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;addressSearch.on('results', function(data){&lt;/P&gt;&lt;P&gt;&amp;nbsp; results.clearLayers();&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (var i = data.results.length - 1; i &amp;gt;= 0; i--) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; results.addLayer(L.marker(data.results[0].latlng));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; map.panTo(results);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed results&lt;I&gt; to results[0] to remove multiple markers from showing up, in case you were wondering.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 20:09:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780915#M516</guid>
      <dc:creator>PatrickMcKinney1</dc:creator>
      <dc:date>2015-05-13T20:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780916#M517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try map.&lt;A href="http://leafletjs.com/reference.html#map-setzoomaround" rel="nofollow noopener noreferrer" target="_blank"&gt;setZoomAround&lt;/A&gt;(&amp;lt;LatLng&amp;gt;, &amp;lt;zoom&amp;gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchControl.on('results', function(data){
&amp;nbsp;&amp;nbsp;&amp;nbsp; results.clearLayers();
&amp;nbsp;&amp;nbsp;&amp;nbsp; // no need to use a for loop if you just want a reference to first match
&amp;nbsp;&amp;nbsp;&amp;nbsp; // for (var i = data.results.length - 1; i &amp;gt;= 0; i--) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; results.addLayer(L.marker(data.results&lt;I&gt;.latlng));&lt;/I&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // }
&amp;nbsp;&amp;nbsp;&amp;nbsp; var resultLocation = data.results[0].latlng;
&amp;nbsp;&amp;nbsp;&amp;nbsp; results.addLayer(L.marker(resultLocation));
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://leafletjs.com/reference.html#map-setzoomaround" rel="nofollow noopener noreferrer" target="_blank"&gt;http://leafletjs.com/reference.html#map-setzoomaround&lt;/A&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setZoomAround(resultLocation, 10);
&amp;nbsp; });&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can find a working sample &lt;A href="https://dl.dropboxusercontent.com/u/59331579/js/geocode-fixed-zoom.html" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:49:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780916#M517</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-12T08:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: new esri leaflet plugin samples</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780917#M518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thanks for your assistance.&amp;nbsp; This resolves the issue when using the ArcGIS World Geocoder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 14:35:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/new-esri-leaflet-plugin-samples/m-p/780917#M518</guid>
      <dc:creator>PatrickMcKinney1</dc:creator>
      <dc:date>2015-05-14T14:35:16Z</dc:date>
    </item>
  </channel>
</rss>

