MKMapKit and google tile location - objective-c

i am trying to add some MKOverlays to a MKMapKit. I'll be using our WMS server to fetch tiles based on google's grid location standard and adding them. To make the call, i need to tell our WMS server the google tile (x, y, and zoom level).
i've looked over apple's TileMap sample code which looks like it uses google's tile system.
Does MKMapKit return this information or do i need to derive it from GPS coords?

You have to derive it yourself. I found this sample very useful:
https://github.com/mtigas/iOS-MapLayerDemo

Related

How to use external data when using ArcGIS API for JavaScript

I am building a dashboard(web app) to present the landslide related data. I have some external maps (slope, drainage and etc). I want to show them as layers in the web app. I was unable to find a correct way of doing so. Can someone suggest a solution?
You mentioned in your comment that you're trying to map Shapefiles. If you want to load your Shapefiles into the map from the JavaScript API, there's a sample here that shows you how to load that file into the map.
If you'd like to add it to your Web Map so that you can view it in an app, you can do that too, just go to the Arcgis.com Map page and click Add > Layer from File (more info).

Google Map Integration in OS X Application

I would like to use use Google Map in my MAC application.
I found the iOS SDK of Google Maps but not for OS X.
I want to show two annotation and a line connecting them on Google Map. Coordinate of both annotation are dynamic as per user selection.
Below is the way I find out that can work:
Call a API and pass the location coordinate for both annotation.
Now Server side a html form is generate using javascript and create a page which is showing the 2 annotation and line connecting them.
In Api Response I will get the URL of that html page.
I will show this page in UIWebView.
I want to know is there any other way I can achieve this.
I want to distribute application outside the mac app store and to distribute outside mac store I need to sign app with Developer ID which does not support the MAPs.
I didn't find anything related to this that's why I created this thread.
Thanks in advance.
I recently ported the Mapbox iOS SDK over to OS X. It has a lot of the features of MapKit, but it’s open source and should also work in a developer-signed application such as yours. To use the Mapbox OS X SDK, download the latest release from the GitHub repository (look for releases beginning with “osx-”) and follow the instructions in README.md. An API reference is included.
I want to show two annotation and a line connecting them on Google Map. Coordinate of both annotation are dynamic as per user selection.
To display the annotations on-screen, you’ll need the MGLPointAnnotation and MGLPolyline classes. You can move the point annotations dynamically by setting their coordinate properties. The polyline, however, is immutable; to change its path, remove the existing polyline and add a new one with the new coordinates.
You will have to make it with WebKit and the Google Maps API.
MapKit is available in OS X 10.9 Mavericks: https://developer.apple.com/library/mac/documentation/MapKit/Reference/MapKit_Framework_Reference/index.html
There are of course many ways of hiding the fact that you're using WebKit but if they violate Apple's or Google's TOS then submission to the App Store won't be possible.
Hope this will be helpful!

Setting up coordinate system in Map Tiler

I am creating Map tiles based on Map Image using Map Tiler software.
Now in that as a first step i selected Map Image from system.
Than i have to set the coordinate system for that i have following options :
See this image:
I choose second option from it. that is WGS84 - Latitude and longitude (EPSG:4326)
In that i have this type of algo to fill up with the coordinate values :
GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137,
298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]]
But its not working for me. The tiles are creating well but when i am trying to create the database using Map2Sqlite software than it takes always static lat-long although i specified the Lat-Long of particular region.
Can anyone suggest which of the option mentioned in above Image should i choose ?
Also if there is any alternate way to create tiles & convert it to Sq Lite db than please suggest me.
As i checked map2sqlite is working well. But when i create tiles at that time passing the coordinates is somewhere wrong.
So anyone can please suggest me while creating tiles from Map image how to pass Coordinates of our region.
Any suggestions or hints will be highly appreciated.
Thanks.
Have a look at this video:
https://www.youtube.com/watch?v=eJxdCe9CNYg
It shows a step by step guide how to overlay an image on top of Google Maps or OpenStreetMap.
MapTiler (http://www.maptiler.com/) generates tiles compatible with the popular global mercator system automatically - these are compatible with most of the API and SDKs.

Show users heading location(north,east west,soth) using Google Map SDK for iOS

I am working on an application where is want to show the user his heading location, like in Apple maps (magnetic direction) which is a small triangle and will rotate as the user moves physically using the app. I am using Google Maps SDK and would like to know if Google provides this option, i have researched a bit but dint get. Also, their official Google Map App doesn't have the feature.
Also i would like to know if there is any other better option for the same.
Simply add mapView.myLocationEnabled = YES; should works for your require.
Except you want this feature works well in China.

generate geo tiles from vector data

i am facing this problem : I have in my database some vector data (polylines ...) which describe many world/country/region/cities boundaries.
I would like to have an interactive map on thoses areas.
When i render those data in the browser (data are sent in geojson) this is slow (i'am not surprised).
The next reason, is to generate some raster tiles to represent the areas at different zoom level and to have a way to make the relation between a click on a area and the area selected (to display more info).
I am a newbie in geo tiles :
What is the best tool to generate png/jpg tiles from vector data?
How to make relation between an area clicked and a "id" in database?
I know my questions are very large, but if you have some advices ...
Thanks!
I recently wrote a blog posting on how to improve the rendering speed of raster tiles:
http://blog.webfoot.com/2013/03/12/optimizing-map-tile-generation/
As for connecting a click to a jurisdiction ID, I don't think there is a shortcut: you need to translate the click into lat/lng (or Vast Coordinate System, as I describe in the blog post) and then do a point-in-polygon check. If you are using PostGIS, then you can do an ST_Intersects.
NOTE: if you are using MySQL, the intersection is done with bounding boxes, not the polygons. It still is possible: you just need to grab a point-in-polygon function from somewhere to check which polygon if a bounding-box check gets you more than one.
Here is an example of dots you can click on:
http://maps.webfoot.com/demos/CanadianStimulus/CanadianStimulus.html
Note that because people aren't precise with clicking (especially with tiny dots), I actually make a few pixels around the dots "live" as well as the single-pixel dots. You can also click away from the dot, and then it will show the polygon (which in this example's case, is the federal electoral district).
There is a MongoDB Plugin datasource for Geoserver, a full featured WebGIS Server. You can use it to build up a map rendering service (a WMS actually) ofyour data. Then use Geowebcache to generate tiles of your map.
This way you can use fully featured WebGIS stack, which allows you to manage additional datasources, and easy tile subset recreation if portions of your data get updated.
Also querying features on a map (relation map position to element in database) is provided through Geoservers WFS implementation.