Feature layer from arcmap to arcGIS for server? - javascript

I am just wondering how I can go about publishing a feature layer in arcmap, and save that as a service to arcGIS for server, so I can call the service in my code in order to generate the feature layer for a web map?
So far I can only find resources in regards to publishing a feature layer to ArcGIS online. I am wanting to publish the feature layer from arcmap to arcGIS for server and call from javascript API to generate a web map.

There are two main ways I use to do this. I first log into my server with the ArcGIS Server installation. Open up ArcMap on that system. It is basically the same thing as a regular ArcMap but has a couple more tools you will be using. Mainly, you will be using the Map Service Publishing toolbar. It contains tools that allow you to analyze, preview, and publish your map.
Set up your map document to show the layer in the manner you want it to appear when you're showing it in a web application. You can set symbology, scale dependencies, labeling, etc...
Once that is set, you need to publish it as a service. I work off 9.3.1 but 10.x should be pretty similar. I believe in the 10.x installations, you must analyze your map before it allows you to publish. It is a good idea to analyze it anyway because it gives you suggestions to get the app running faster.
You have two options when publishing a map to the ArcGIS Server. You can publish the map document as a service or save a map service definition file. I typically do the map service definition files because it is supposed to render faster (according to ESRI).
This ESRI link gives better, more precise information too: http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000003vt000000
Best thing to do when you're first starting out playing with this is to go to videos.arcgis.com and search through the developers presentations from ESRI's Developer Conferences. They are typically hour long segments that have presenters going through and describing how to do all sorts of things with ESRI software.
I am assuming you're using ESRI's JavaScript API to consume the map service. When you publish a service, you get the option to share it as a WMS service too. That would be more useful if you were using open source tools like OpenLayers to consume the map service.
This is a bit of an introduction into doing this. The major problems you may have is getting administrative privileges on your server and making sure the user accounts are set up properly. My biggest hiccups came from not having permission to administer the server.

Related

Google ads enhanced conversion with ads api for node JS

I am trying to implement Google ads enhanced conversions. I have the option of doing it using the gtag, google tag manager or using the Ads api. However, On the Ads api I don't see any documentation related to Node Js. I am not able to figure out how I can make use of the Ads api to implement enhanced conversions with Node Js.
This is the official documentation for enhanced conversion using Ads api and i don't see anything related to Node Js
https://developers.google.com/google-ads/api/docs/conversions/enhance-conversions
Google provides no official Node SDK currently for Google Ads API.
https://github.com/Opteo/google-ads-node is an open source node sdk. It's a bit bloated for Lambda environments, but could be fine for most people.
You'll also have to fill out a form and submit to Google for approval to use the Google Ads API. Takes 48+ hours to get approved.
Another option is Google can ping an http or sftp endpoint of yours and just get a csv file you supply of all conversions for the day. This might be a simple approach.
Let's hope Google provides an official node sdk with simple way to upload ad conversions from server.

Using Google App Scripts/Sheets for a website CMS / REST API

Is it possible to use either Google Apps Script or the Google Sheets API to host a REST API, so that I can make client-side content requests on a static web page? If so, how would I go about this?
I'm building a simple website hosted on GitHub, and I want to experiment with using a spreadsheet as a content management system, e.g. fetching a running list of projects with corresponding text, images, etc.
Forgive me if I completely misunderstood the capabilities of either/both of these applications, or overlooked a previous ask!
You can use the Sheets API with multiple languages.
Here you have the different quickstarts that show you how to do it: https://developers.google.com/sheets/api/guides/concepts
Also you can create a Web App with Apps Script and embed it in your website: https://developers.google.com/apps-script/guides/web

How to Integrate Google Map JavaScript API V3 without Internet in Web Application? [duplicate]

Like Nokia's OVI maps can be used offline, there must be some way of caching Google map tiles too. Any hints?
If you are trying to cache the tiles that Google serves, that may be a violation of Google's Terms of Service (unless, under certain circumstances, if you've purchased their enterprise Maps API Premier). That's why gmapcatcher has it crossed off their list. See http://code.google.com/p/gmapcatcher/issues/detail?id=210.
At the gmapcatcher URL above, you will also find a shell script that can download tiles (or so its author says).
There are also other projects that try to make Google Maps available offline:
http://code.google.com/p/ogmaps/
http://code.google.com/p/gmapoffline/
Lastly, if Google Earth can meet your needs, then you can use that. Offline usage of Google Earth requires a Google Earth Enterprise license according to http://www.google.com/permissions/geoguidelines.html.
Note that the preceding page also says: "You may not scrape or otherwise export Content from Google Maps or Earth or save it for offline use." So if you try to cache tiles, that will almost certainly be considered (by Google, anyway) a violation of the Terms of Service.
Unfortunately, I found this link which appears to indicate that we cannot cache these locally, therefore making this question moot.
http://support.google.com/enterprise/doc/gme/terms/maps_purchase_agreement.html
4.4 Cache Restrictions. Customer may not pre-fetch, retrieve, cache, index, or store any Content, or portion of the Services with the exception being Customer may store limited amounts of Content solely to improve the performance of the Customer Implementation due to network latency, and only if Customer does so temporarily, securely, and in a manner that (a) does not permit use of the Content outside of the Services; (b) is session-based only (once the browser is closed, any additional storage is prohibited); (c) does not manipulate or aggregate any Content or portion of the Services; (d) does not prevent Google from accurately tracking Page Views; and (e) does not modify or adjust attribution in any way.
So it appears we cannot use Google map tiles offline, legally.
update:
I found the terms of use from Google Map:
Section 10.5
No caching or storage. You will not pre-fetch, cache, index, or store
any Content to be used outside the Service, except that you may store
limited amounts of Content solely for the purpose of improving the
performance of your Maps API Implementation due to network latency
(and not for the purpose of preventing Google from accurately tracking
usage), and only if such storage: is temporary (and in no event more
than 30 calendar days); is secure; does not manipulate or aggregate
any part of the Content or Service; and does not modify attribution in
any way.
It means we can cache for limited time actually
On http://www.google.com/earth/media/licensing.html there is a "Mobile" section containing :
Similar to our online terms, if you use our APIs or a mobile device’s native Google Maps implementation (such as on an Android-powered phone or iPhone), no special permission is required, but you must always keep the Google name visible. Offline caching of our content is never allowed.
You can use Open Street Map : you will find dozens of different layers and map types, and this is absolutely free. You can download all the map tiles you want. And of course, as anyone can enhance the map, it displays more information than Google's maps.
If you need help, you can ask the community which is also very active.
On Android platforms, Oruxmaps (http://www.oruxmaps.com) does a great job at caching all WMS sources. It is available in the play store.
I use it daily in remote areas without any connectivity, works like a charm.

Use the standard google maps interface on embedded maps / google maps API

This surely sounds like a silly question in my head, but I want to put it out there nonetheless just to make sure I haven't missed anything.
I've got a page on my website that has a google map (currently 'embedded' through the google maps api v3).
While I'm perfectly capable of interacting with that map through a custom form (and the google map api):
an input box to set starting point
an input box to set endpoint
a dropdown list for transportation modes
I was wondering if it was possible (in comes the silliness) to use google's own interface for this (cause users are used to this).
Abstracting my question: Is there a way to "bring in" Google Maps' own UI on an embedded map and do some calculations on my own page, based on the routes (/modes of transportations, etc) that are being selected in that UI.
My guess: no. The google maps UI is something that can only show up on maps embedded with an iFrame (so only on maps.google.com) and no interaction with it is possible, at least not in a kosher way.
There is the direction API which you can use to obtain responses (JSON or XML) regarding useful information such as distance, start coordinate, travel mode, etc. You can interact with the response to obtain what is needed for your web page.
I have posted a link for the direction API. Hope this can help.
Direction API

Get iPhone location data into a Google Maps

I am looking to develop a feature for a browser app I am developing. I was hoping to get any advice on this topic:
A user walks around with their iphone.
During this time location data is recorded of their walk
This data can then be exported to Google Maps and I can see the route overlaid on a Google Map in my browser.
Is this possible? Where would I start and how would the data be recorded?
Yes, this is possible (assuming you want to use Javascript as it is tagged to your question).
Getting the location data on an iPhone is possible, see this question. You can use the Google Maps API to display a map and draw the recorded path on it. I would rather display the walked route direct in your app rather than exporting/importing coordinates of the recorded route.
Before implementing the App, I would take a look on both Google Maps API and OpenStreemMap API to find out which you like more and fits your needs best. Playing with some examples before implementing your app might be a good point to start with.

Categories

Resources