<?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 Automatically Switch a basemap to NightTime Basemap if it is night? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295629#M7022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a Flex (2.5 API - yes, I know, but that is the way it is) app that the Police are using on their MDTs and they want to have a nighttime basemap for use at night.&amp;nbsp; We've built the cache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of Police having to manually switch the basemap, I was wondering if any one has utilized some web service to determine if a location (ie. Greenville, SC) was within daylight hours to automatically switch the basemap on application startup?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Feb 2013 19:49:29 GMT</pubDate>
    <dc:creator>CarmenDurham</dc:creator>
    <dc:date>2013-02-26T19:49:29Z</dc:date>
    <item>
      <title>Automatically Switch a basemap to NightTime Basemap if it is night?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295629#M7022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a Flex (2.5 API - yes, I know, but that is the way it is) app that the Police are using on their MDTs and they want to have a nighttime basemap for use at night.&amp;nbsp; We've built the cache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of Police having to manually switch the basemap, I was wondering if any one has utilized some web service to determine if a location (ie. Greenville, SC) was within daylight hours to automatically switch the basemap on application startup?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 19:49:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295629#M7022</guid>
      <dc:creator>CarmenDurham</dc:creator>
      <dc:date>2013-02-26T19:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically Switch a basemap to NightTime Basemap if it is night?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295630#M7023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Carmen,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You could do this all client side by setting up a timer to fire off every hour and check if it is time to switch the basemap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 20:00:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295630#M7023</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2013-02-26T20:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically Switch a basemap to NightTime Basemap if it is night?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295631#M7024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply Robert.&amp;nbsp; I understand utilizing the timer and that maybe I can see if system time is between say 6am and 6pm,&amp;nbsp; then switch to night basemap.&amp;nbsp; But a static time range won't always be good.&amp;nbsp; In the summer, it isn't dark at 6pm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, my question is really whether anyone has already utilized some web service that returns sunrise and sunset to determine whether or not to switch basemaps&amp;nbsp; -- AND has already posted the code somewhere and I cannot find it.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this web service:&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://www.earthtools.org/webservices.htm#sun"&gt;http://www.earthtools.org/webservices.htm#sun&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If no one offers up any existing code or a better web service, I will maybe try using the above and write something. I am not asking anyone to write it for me, but if the code is already out there, then it would save some time!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 14:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/automatically-switch-a-basemap-to-nighttime/m-p/295631#M7024</guid>
      <dc:creator>CarmenDurham</dc:creator>
      <dc:date>2013-02-27T14:08:49Z</dc:date>
    </item>
  </channel>
</rss>

