Skip to content

Titanium.Map.Annotation の画像を拡大縮小できるようにするモジュール

License

Notifications You must be signed in to change notification settings

mountposition/Titanium-Scalable-Map-Annotation

Repository files navigation

Titaium Scalable Map Annotation Project
===========================================

The map annotation will be able to reduce expanding and this module is done. 

The annotation can expanding reduce additionally to the expansion rate of Map by using this module 
though Titanium doesn't support the expansion reduction of the map annotation in the standard. 


MODULE NAMING
--------------

Module Name: scalable-map-annotation

Module ID: jp.co.mountposition.map

COMPONENTS
-----------

	JpCoMountpositionMapMapViewProxy.h
	JpCoMountpositionMapMapViewProxy.m
	JpCoMountpositionMapMapView.h
	JpCoMountpositionMapMapView.m

INSTALL THIS MODULE
--------------------

1. Run `build.py` which creates your distribution
2. cd to `/Library/Application Support/Titanium`
3. copy this zip file into the folder of your Titanium SDK

REGISTER THIS MODULE
---------------------

Register this module with your application by editing `tiapp.xml` and adding your module.
Example:

<modules>
	<module version="0.1">jp.co.mountposition.map</module>
</modules>

When you run this project, the compiler will know automatically compile in this module
dependencies and copy appropriate image assets into the application.

USING THIS MODULE IN CODE
-------------------------

To use this module in code, you will need to require it. 

For example,

  var mapModule = require("jp.co.mountposition.map");

  var mapView = mapModule.createMapView({
    mapType: Titanium.Map.STANDARD_TYPE,
    animate: true,
    regionFit: true,
    userLocation: true,
    annotations: [],
    region: {
      latitude: currentLat,
      longitude: currentLng,
      latitudeDelta: basicLatitudeDelta,
      longitudeDelta: basicLongitudeDelta
    },
    top: 0,
    left: 0,
    bottom: 44
  });
  currentWindow.add(mapView);
  
  var circle = Titanium.Map.createAnnotation({
    latitude: lat,
    longitude: lng,
    image: "../icons/circle.png",
    animate: false,
    scale: 0.5      // <-- pin image scale 
  });
  mapView.addAnnotation(circle);

About

Titanium.Map.Annotation の画像を拡大縮小できるようにするモジュール

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages